diff --git a/analysis_options.yaml b/analysis_options.yaml index 0d290213..0d87f43e 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -7,6 +7,11 @@ # The following line activates a set of recommended lints for Flutter apps, # packages, and plugins designed to encourage good coding practices. +analyzer: + exclude: + - build/** + - android/** + - ios/** include: package:flutter_lints/flutter.yaml linter: diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index f0e3c730..aeac3dd9 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -2070,5 +2070,6 @@ "downloadApp": "حمل التطبيق", "unread": "غير مقروء", "read": "مقروءة", - "pendingMedicalReportRequest": "لديك بالفعل طلب معلّق للحصول على تقرير طبي خاص بهذا الموعد. يرجى الانتظار حتى اكتمال الطلب قبل تقديم طلب جديد." + "pendingMedicalReportRequest": "لديك بالفعل طلب معلّق للحصول على تقرير طبي خاص بهذا الموعد. يرجى الانتظار حتى اكتمال الطلب قبل تقديم طلب جديد.", + "AllergyReactions": "ردود الفعل التحسسية" } diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 06a2742c..d6929f1b 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -2060,7 +2060,8 @@ "downloadApp": "Download App", "unread": "Unread", "read": "Read", - "pendingMedicalReportRequest": "You already have a pending medical report request for this appointment. Please wait for the request to be completed before submitting a new one." + "pendingMedicalReportRequest": "You already have a pending medical report request for this appointment. Please wait for the request to be completed before submitting a new one.", + "allergyReactions": "Allergy Reactions" } diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c0d2bb74..783f7639 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -12,20 +12,8 @@ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 478CFA942E638C8E0064F3D7 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */; }; 5D5A1F80D389375644C4D0DC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56E413AB2A2E9765749CACD1 /* Pods_Runner.framework */; }; - 61243B492EC5FA3700D46FA0 /* PenguinModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B422EC5FA3700D46FA0 /* PenguinModel.swift */; }; - 61243B4C2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B3D2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift */; }; - 61243B502EC5FA3700D46FA0 /* PenguinView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B452EC5FA3700D46FA0 /* PenguinView.swift */; }; - 61243B542EC5FA3700D46FA0 /* PenguinPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */; }; - 61243B562EC5FA3700D46FA0 /* PenguinNavigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */; }; - 61243B572EC5FA3700D46FA0 /* PenguinViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 76AA18AE2F3B2A4D00DC8DFC /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */; }; - 76B1D2512F91BF8000DBBD1B /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76B1D24E2F91BF8000DBBD1B /* Penguin.xcframework */; }; - 76B1D2522F91BF8000DBBD1B /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 76B1D24E2F91BF8000DBBD1B /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 76B1D2532F91BF8000DBBD1B /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76B1D24F2F91BF8000DBBD1B /* PenguinINRenderer.xcframework */; }; - 76B1D2542F91BF8000DBBD1B /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 76B1D24F2F91BF8000DBBD1B /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 76B1D2552F91BF8000DBBD1B /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76B1D2502F91BF8000DBBD1B /* PenNavUI.xcframework */; }; - 76B1D2562F91BF8000DBBD1B /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 76B1D2502F91BF8000DBBD1B /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; @@ -49,9 +37,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 76B1D2542F91BF8000DBBD1B /* PenguinINRenderer.xcframework in Embed Frameworks */, - 76B1D2522F91BF8000DBBD1B /* Penguin.xcframework in Embed Frameworks */, - 76B1D2562F91BF8000DBBD1B /* PenNavUI.xcframework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -77,22 +62,14 @@ 478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 478CFA952E6E20A60064F3D7 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 56E413AB2A2E9765749CACD1 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 61243B3D2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMGPenguinInPlatformBridge.swift; sourceTree = ""; }; - 61243B422EC5FA3700D46FA0 /* PenguinModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinModel.swift; sourceTree = ""; }; - 61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinNavigator.swift; sourceTree = ""; }; - 61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinPlugin.swift; sourceTree = ""; }; - 61243B452EC5FA3700D46FA0 /* PenguinView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinView.swift; sourceTree = ""; }; - 61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinViewFactory.swift; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = ""; }; 76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = ring_30Sec.caf; sourceTree = ""; }; - 76B1D24E2F91BF8000DBBD1B /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = ""; }; - 76B1D24F2F91BF8000DBBD1B /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = ""; }; - 76B1D2502F91BF8000DBBD1B /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = ""; }; 76B714CF300E58B1004DE37A /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; 76B714D1300E58B1004DE37A /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; @@ -112,10 +89,9 @@ buildActionMask = 2147483647; files = ( 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, - 76B1D2512F91BF8000DBBD1B /* Penguin.xcframework in Frameworks */, - 76B1D2552F91BF8000DBBD1B /* PenNavUI.xcframework in Frameworks */, - 76B1D2532F91BF8000DBBD1B /* PenguinINRenderer.xcframework in Frameworks */, 5D5A1F80D389375644C4D0DC /* Pods_Runner.framework in Frameworks */, + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, + 37D27FAF2C38AC83B852680C /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -133,7 +109,6 @@ 61243B412EC5FA3700D46FA0 /* Helper */ = { isa = PBXGroup; children = ( - 61243B3D2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift */, ); path = Helper; sourceTree = ""; @@ -141,11 +116,6 @@ 61243B472EC5FA3700D46FA0 /* Penguin */ = { isa = PBXGroup; children = ( - 61243B422EC5FA3700D46FA0 /* PenguinModel.swift */, - 61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */, - 61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */, - 61243B452EC5FA3700D46FA0 /* PenguinView.swift */, - 61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */, ); path = Penguin; sourceTree = ""; @@ -153,12 +123,10 @@ 766D8CB22EC60BE600D05E07 /* Frameworks */ = { isa = PBXGroup; children = ( - 76B1D24E2F91BF8000DBBD1B /* Penguin.xcframework */, - 76B1D24F2F91BF8000DBBD1B /* PenguinINRenderer.xcframework */, - 76B1D2502F91BF8000DBBD1B /* PenNavUI.xcframework */, 76B714CF300E58B1004DE37A /* WidgetKit.framework */, 76B714D1300E58B1004DE37A /* SwiftUI.framework */, 56E413AB2A2E9765749CACD1 /* Pods_Runner.framework */, + A83C76CFF9D3F92EDE3B22B4 /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -211,7 +179,6 @@ children = ( 76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */, 61243B412EC5FA3700D46FA0 /* Helper */, - 61243B472EC5FA3700D46FA0 /* Penguin */, 769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */, 478CFA952E6E20A60064F3D7 /* Runner.entitlements */, 478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */, @@ -369,6 +336,7 @@ "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( ); outputPaths = ( @@ -444,12 +412,6 @@ buildActionMask = 2147483647; files = ( 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 61243B492EC5FA3700D46FA0 /* PenguinModel.swift in Sources */, - 61243B4C2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift in Sources */, - 61243B502EC5FA3700D46FA0 /* PenguinView.swift in Sources */, - 61243B542EC5FA3700D46FA0 /* PenguinPlugin.swift in Sources */, - 61243B562EC5FA3700D46FA0 /* PenguinNavigator.swift in Sources */, - 61243B572EC5FA3700D46FA0 /* PenguinViewFactory.swift in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6cf27c0f..3b3a47cd 100644 --- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/app-check.git", "state" : { - "revision" : "3e33dd27dd4c69bd81c7c81fe61d8ccf58846902", - "version" : "11.3.1" + "revision" : "97f7d74dd0e8f3d0fe5fc75cc8957aa73bdc948a", + "version" : "11.3.2" } }, { @@ -50,17 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/firebase/firebase-ios-sdk", "state" : { - "revision" : "fdc352fabaf5916e7faa1f96ad02b1957e93e5a5", - "version" : "11.15.0" - } - }, - { - "identity" : "flutterfire", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/flutterfire", - "state" : { - "revision" : "dadb0fd27bc9afe4dee4f23326a4a9ba238258ac", - "version" : "3.15.2-firebase-core-swift" + "revision" : "27eaab3918e0bf78711cf1abf240577176326432", + "version" : "12.19.0" } }, { @@ -68,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/googleads/google-ads-on-device-conversion-ios-sdk", "state" : { - "revision" : "a2d0f1f1666de591eb1a811f40b1706f5c63a2ed", - "version" : "2.3.0" + "revision" : "0208e2681ec81f8a9c81084696f60fcce26cb7ee", + "version" : "3.7.0" } }, { @@ -77,8 +68,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleAppMeasurement.git", "state" : { - "revision" : "45ce435e9406d3c674dd249a042b932bee006f60", - "version" : "11.15.0" + "revision" : "b8455dd2ff55cc269fda7a4f9eac6c1e3588c53f", + "version" : "12.19.2" } }, { @@ -95,8 +86,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleUtilities.git", "state" : { - "revision" : "9f183ae842be978784f2963a343682e0c46d8fb3", - "version" : "8.1.2" + "revision" : "cc31f5ed464b111f877ce8554cbef4455d410d91", + "version" : "8.1.4" } }, { @@ -113,8 +104,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/gtm-session-fetcher.git", "state" : { - "revision" : "c756a29784521063b6a1202907e2cc47f41b667c", - "version" : "4.5.0" + "revision" : "724a52eea6329b7e12d3ad8300d76ca9f3895fcc", + "version" : "5.3.1" } }, { @@ -162,15 +153,6 @@ "version" : "5.21.7" } }, - { - "identity" : "swift-protobuf", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-protobuf.git", - "state" : { - "revision" : "55d7a1cc5666b85c13464aea1c4b4a90feccb4c8", - "version" : "1.38.1" - } - }, { "identity" : "swiftygif", "kind" : "remoteSourceControl", diff --git a/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6cf27c0f..54619d3b 100644 --- a/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -50,17 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/firebase/firebase-ios-sdk", "state" : { - "revision" : "fdc352fabaf5916e7faa1f96ad02b1957e93e5a5", - "version" : "11.15.0" - } - }, - { - "identity" : "flutterfire", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/flutterfire", - "state" : { - "revision" : "dadb0fd27bc9afe4dee4f23326a4a9ba238258ac", - "version" : "3.15.2-firebase-core-swift" + "revision" : "27eaab3918e0bf78711cf1abf240577176326432", + "version" : "12.19.0" } }, { @@ -68,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/googleads/google-ads-on-device-conversion-ios-sdk", "state" : { - "revision" : "a2d0f1f1666de591eb1a811f40b1706f5c63a2ed", - "version" : "2.3.0" + "revision" : "0208e2681ec81f8a9c81084696f60fcce26cb7ee", + "version" : "3.7.0" } }, { @@ -77,8 +68,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleAppMeasurement.git", "state" : { - "revision" : "45ce435e9406d3c674dd249a042b932bee006f60", - "version" : "11.15.0" + "revision" : "b8455dd2ff55cc269fda7a4f9eac6c1e3588c53f", + "version" : "12.19.2" } }, { @@ -95,8 +86,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleUtilities.git", "state" : { - "revision" : "9f183ae842be978784f2963a343682e0c46d8fb3", - "version" : "8.1.2" + "revision" : "cc31f5ed464b111f877ce8554cbef4455d410d91", + "version" : "8.1.4" } }, { @@ -113,8 +104,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/gtm-session-fetcher.git", "state" : { - "revision" : "c756a29784521063b6a1202907e2cc47f41b667c", - "version" : "4.5.0" + "revision" : "724a52eea6329b7e12d3ad8300d76ca9f3895fcc", + "version" : "5.3.1" } }, { @@ -162,15 +153,6 @@ "version" : "5.21.7" } }, - { - "identity" : "swift-protobuf", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-protobuf.git", - "state" : { - "revision" : "55d7a1cc5666b85c13464aea1c4b4a90feccb4c8", - "version" : "1.38.1" - } - }, { "identity" : "swiftygif", "kind" : "remoteSourceControl", diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 8a0a6208..13ac16ec 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -7,13 +7,13 @@ import GoogleMaps @objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { func didInitializeImplicitFlutterEngine(_ engineBridge: any FlutterImplicitEngineBridge) { GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) - + // GMSServices.provideAPIKey("AIzaSyB6TERnxIr0yJ3qG4ULBZbu0sAD4tGqtng") // FirebaseApp.configure() // initializePlatformChannels() - + } - + override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? @@ -26,36 +26,36 @@ import GoogleMaps } func initializePlatformChannels(){ - DispatchQueue.main.async { [weak self] in - guard let self = self else { return } - - // 1. Try accessing window via AppDelegate (legacy/single-window setup) - var controller = self.window?.rootViewController as? FlutterViewController - - // 2. Fallback to UIWindowScene active window (modern iOS architecture) - if controller == nil { - controller = UIApplication.shared.connectedScenes - .compactMap { $0 as? UIWindowScene } - .flatMap { $0.windows } - .first(where: { $0.isKeyWindow })? - .rootViewController as? FlutterViewController - } - - // 3. Perform initialization once FlutterViewController is available - if let mainViewController = controller { - HMGPenguinInPlatformBridge.initialize(flutterViewController: mainViewController) - } else { - print("⚠️ FlutterViewController not ready yet for initializePlatformChannels.") - } - } - - +// DispatchQueue.main.async { [weak self] in +// guard let self = self else { return } +// +// // 1. Try accessing window via AppDelegate (legacy/single-window setup) +// var controller = self.window?.rootViewController as? FlutterViewController +// +// // 2. Fallback to UIWindowScene active window (modern iOS architecture) +// if controller == nil { +// controller = UIApplication.shared.connectedScenes +// .compactMap { $0 as? UIWindowScene } +// .flatMap { $0.windows } +// .first(where: { $0.isKeyWindow })? +// .rootViewController as? FlutterViewController +// } +// +// // 3. Perform initialization once FlutterViewController is available +// if let mainViewController = controller { +// HMGPenguinInPlatformBridge.initialize(flutterViewController: mainViewController) +// } else { +// print("⚠️ FlutterViewController not ready yet for initializePlatformChannels.") +// } +// } + + // if let mainViewController = window?.rootViewController as? FlutterViewController{ // platform initialization suppose to be in foreground // HMGPenguinInPlatformBridge.initialize(flutterViewController: mainViewController) // } - + } - + override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken:Data){ // Messaging.messaging().apnsToken = deviceToken super.application(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken) diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 85d84646..8bf02667 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -2,6 +2,27 @@ + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneClassName + UIWindowScene + UISceneDelegateClassName + FlutterSceneDelegate + UISceneConfigurationName + flutter + UISceneStoryboardFile + Main + + + + CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion diff --git a/lib/core/api/api_client.dart b/lib/core/api/api_client.dart index 1bccb154..317134e2 100644 --- a/lib/core/api/api_client.dart +++ b/lib/core/api/api_client.dart @@ -210,7 +210,7 @@ class ApiClientImp implements ApiClient { } // body['TokenID'] = "@dm!n"; - // body['PatientID'] = 1009156; + // body['PatientID'] = 2101020; // body['PatientID'] = 53320; // body['PatientTypeID'] = 1; // body['PatientOutSA'] = 0; @@ -248,7 +248,7 @@ class ApiClientImp implements ApiClient { if (kDebugMode) { debugPrint("uri: ${Uri.parse(url.trim())}"); var requestBodyJSON = json.encode(body); - debugPrint("body: $requestBodyJSON", wrapWidth: 2048); + debugPrint("body: $requestBodyJSON", wrapWidth: 10000); // log("body: $requestBodyJSON"); } diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 72a97884..aa265931 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -6,6 +6,7 @@ import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; class ApiConsts { static const maxSmallScreen = 660; + static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.preProd; static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT diff --git a/lib/extensions/string_extensions.dart b/lib/extensions/string_extensions.dart index 06d590cf..95ad376c 100644 --- a/lib/extensions/string_extensions.dart +++ b/lib/extensions/string_extensions.dart @@ -1,5 +1,6 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter_markdown_plus/flutter_markdown_plus.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; @@ -486,6 +487,10 @@ extension EmailValidator on String { : 'Poppins'), ), ); + Widget toText14Markdown() => + MarkdownBody( + data: this, + ); Widget toSectionHeading({String upperHeading = "", String lowerHeading = ""}) { String upper = ""; diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart index cb164a0c..05f4ac73 100644 --- a/lib/features/authentication/authentication_view_model.dart +++ b/lib/features/authentication/authentication_view_model.dart @@ -277,6 +277,7 @@ class AuthenticationViewModel extends ChangeNotifier { // Check if field is empty if (nationalIdController.text.isEmpty) { _nationalIdError = LocaleKeys.pleaseEnterAnationalID.tr(); + print("the controller is emtpy so the error is $_nationalIdError"); notifyListeners(); return false; } @@ -286,6 +287,7 @@ class AuthenticationViewModel extends ChangeNotifier { if (cleanedId.length == 10) { if (!Utils.isSAUDIIDValid(cleanedId)) { _nationalIdError = LocaleKeys.enterValidNationalId.tr(); + print("the controller is not valid so the error is $_nationalIdError"); notifyListeners(); return false; } @@ -296,6 +298,7 @@ class AuthenticationViewModel extends ChangeNotifier { if (cleanedId.length == 10) { if (!ValidationUtils.validateIqama(nationalIdController.text)) { _nationalIdError = LocaleKeys.pleaseEnterAValidIqamaID.tr(); + print("the controller is not valid so the error is $_nationalIdError"); notifyListeners(); return false; } @@ -305,6 +308,7 @@ class AuthenticationViewModel extends ChangeNotifier { } else if (selectedCountrySignup == CountryEnum.unitedArabEmirates) { if (!ValidationUtils.validateUaeNationalId(nationalIdController.text) && cleanedId.length == 15) { _nationalIdError = LocaleKeys.pleaseEnterAValidNationalID.tr(); + print("the controller is not valid so the error is $_nationalIdError"); notifyListeners(); return false; } diff --git a/lib/features/lab/lab_view_model.dart b/lib/features/lab/lab_view_model.dart index 90ceacfe..64484831 100644 --- a/lib/features/lab/lab_view_model.dart +++ b/lib/features/lab/lab_view_model.dart @@ -522,7 +522,7 @@ class LabViewModel extends ChangeNotifier { labOrderResponseByAi = null; navigationService.push( MaterialPageRoute( - builder: (_) => LabResultDetails(recentLabResult: recentResult, testDescription: testDescription), + builder: (_) => LabResultDetails(recentLabResult: recentResult, testDescription: testDescription, labOrder: laborder), ), ); notifyListeners(); @@ -897,6 +897,8 @@ class LabViewModel extends ChangeNotifier { } // } orderData["results"] = testResults; + orderData["clinic_name"] = labOrder.clinicDescription ?? ""; + orderData["specialty_name"] = labOrder.speciality?.toString().replaceAll("[", "").replaceAll("]", "") ?? ""; results.add(orderData); final result = await labRepo.getPatientAiOverViewLabOrders(payload: results, langId: langId); @@ -927,7 +929,7 @@ class LabViewModel extends ChangeNotifier { // LoadingUtils.hideFullScreenLoader(); } - Future getAiOverviewSingleLabResult({required int langId, required LabResult recentLabResult, required String loadingText}) async { + Future getAiOverviewSingleLabResult({required int langId, required LabResult recentLabResult, required String loadingText, required PatientLabOrdersResponseModel labOrder}) async { LoaderBottomSheet.showLoader( loadingText: loadingText, showCloseButton: true, @@ -942,9 +944,9 @@ class LabViewModel extends ChangeNotifier { "UOM": recentLabResult.uOM ?? '', "ReferanceRange": recentLabResult.referanceRange ?? '', }); - + var speciality = labOrder.speciality?.toString().replaceAll("[", "").replaceAll("]", "") ?? ""; // var payload = {"patient_id": currentlySelectedPatientOrder!.patientID, "language_id": langId, "lab_results": results}; - var payload = {"patient_id": getIt.get().getAuthenticatedUser()!.patientId, "language_id": langId, "lab_results": results}; + var payload = {"patient_id": getIt.get().getAuthenticatedUser()!.patientId, "language_id": langId, "lab_results": results, "specialty_name": speciality, "clinic_name": labOrder.clinicDescription ?? ""}; final result = await labRepo.getPatientAiOverViewLabOrder(payload); result.fold( (failure) async { diff --git a/lib/features/lab/models/resp_models/ai_overview_labresults_by_ai_model.dart b/lib/features/lab/models/resp_models/ai_overview_labresults_by_ai_model.dart index 2353cf82..29d9aa38 100644 --- a/lib/features/lab/models/resp_models/ai_overview_labresults_by_ai_model.dart +++ b/lib/features/lab/models/resp_models/ai_overview_labresults_by_ai_model.dart @@ -35,21 +35,15 @@ class LabOrdersResponseByAi { class Analysis { List? aiGeneratedAttributes; List? aiPredictions; - List? aiRecommendations; - List? prevention; String? rawMessage; List? riskFactors; - List? suggestedDoctors; String? summary; Analysis({ this.aiGeneratedAttributes, this.aiPredictions, - this.aiRecommendations, - this.prevention, this.rawMessage, this.riskFactors, - this.suggestedDoctors, this.summary, }); @@ -60,22 +54,16 @@ class Analysis { factory Analysis.fromJson(Map json) => Analysis( aiGeneratedAttributes: json["ai_generated_attributes"] == null ? [] : List.from(json["ai_generated_attributes"]!.map((x) => AiGeneratedAttribute.fromJson(x))), aiPredictions: json["ai_predictions"] == null ? [] : List.from(json["ai_predictions"]!.map((x) => x)), - aiRecommendations: json["ai_recommendations"] == null ? [] : List.from(json["ai_recommendations"]!.map((x) => AiRecommendation.fromJson(x))), - prevention: json["prevention"] == null ? [] : List.from(json["prevention"]!.map((x) => x)), rawMessage: json["raw_message"], riskFactors: json["riskFactors"] == null ? [] : List.from(json["riskFactors"]!.map((x) => RiskFactor.fromJson(x))), - suggestedDoctors: json["suggested_doctors"] == null ? [] : List.from(json["suggested_doctors"]!.map((x) => x)), summary: json["summary"], ); Map toJson() => { "ai_generated_attributes": aiGeneratedAttributes == null ? [] : List.from(aiGeneratedAttributes!.map((x) => x.toJson())), "ai_predictions": aiPredictions == null ? [] : List.from(aiPredictions!.map((x) => x)), - "ai_recommendations": aiRecommendations == null ? [] : List.from(aiRecommendations!.map((x) => x.toJson())), - "prevention": prevention == null ? [] : List.from(prevention!.map((x) => x)), "raw_message": rawMessage, "riskFactors": riskFactors == null ? [] : List.from(riskFactors!.map((x) => x.toJson())), - "suggested_doctors": suggestedDoctors == null ? [] : List.from(suggestedDoctors!.map((x) => x)), "summary": summary, }; } diff --git a/lib/features/lab/models/resp_models/patient_lab_order_response_by_ai_model.dart b/lib/features/lab/models/resp_models/patient_lab_order_response_by_ai_model.dart index 7ad3d543..b3dd2900 100644 --- a/lib/features/lab/models/resp_models/patient_lab_order_response_by_ai_model.dart +++ b/lib/features/lab/models/resp_models/patient_lab_order_response_by_ai_model.dart @@ -4,20 +4,14 @@ class LabOrderResponseByAi { String? summary; List? aiGeneratedAttributes; List? aiPredictions; - List? aiRecommendations; List? riskFactors; - List? prevention; - List? suggestedDoctors; String? rawMessage; LabOrderResponseByAi({ this.summary, this.aiGeneratedAttributes, this.aiPredictions, - this.aiRecommendations, this.riskFactors, - this.prevention, - this.suggestedDoctors, this.rawMessage, }); @@ -29,10 +23,7 @@ class LabOrderResponseByAi { summary: json["summary"], aiGeneratedAttributes: json["ai_generated_attributes"] == null ? [] : List.from(json["ai_generated_attributes"]!.map((x) => AiGeneratedAttribute.fromJson(x))), aiPredictions: json["ai_predictions"] == null ? [] : List.from(json["ai_predictions"]!.map((x) => x)), - aiRecommendations: json["ai_recommendations"] == null ? [] : List.from(json["ai_recommendations"]!.map((x) => AiRecommendation.fromJson(x))), riskFactors: json["riskFactors"] == null ? [] : List.from(json["riskFactors"]!.map((x) => RiskFactor.fromJson(x))), - prevention: json["prevention"] == null ? [] : List.from(json["prevention"]!.map((x) => x)), - suggestedDoctors: json["suggested_doctors"] == null ? [] : List.from(json["suggested_doctors"]!.map((x) => x)), rawMessage: json["raw_message"], ); @@ -40,10 +31,7 @@ class LabOrderResponseByAi { "summary": summary, "ai_generated_attributes": aiGeneratedAttributes == null ? [] : List.from(aiGeneratedAttributes!.map((x) => x.toJson())), "ai_predictions": aiPredictions == null ? [] : List.from(aiPredictions!.map((x) => x)), - "ai_recommendations": aiRecommendations == null ? [] : List.from(aiRecommendations!.map((x) => x.toJson())), "riskFactors": riskFactors == null ? [] : List.from(riskFactors!.map((x) => x.toJson())), - "prevention": prevention == null ? [] : List.from(prevention!.map((x) => x)), - "suggested_doctors": suggestedDoctors == null ? [] : List.from(suggestedDoctors!.map((x) => x)), "raw_message": rawMessage, }; } diff --git a/lib/features/lab/models/resp_models/patient_lab_orders_response_model.dart b/lib/features/lab/models/resp_models/patient_lab_orders_response_model.dart index 1c437a48..8275771d 100644 --- a/lib/features/lab/models/resp_models/patient_lab_orders_response_model.dart +++ b/lib/features/lab/models/resp_models/patient_lab_orders_response_model.dart @@ -45,7 +45,7 @@ class PatientLabOrdersResponseModel { dynamic? projectNameN; String? qR; String? setupID; - // List? speciality; + List? speciality; int? status; String? statusDesc; String? strOrderDate; @@ -98,7 +98,7 @@ class PatientLabOrdersResponseModel { this.projectNameN, this.qR, this.setupID, - // this.speciality, + this.speciality, this.status, this.statusDesc, this.strOrderDate, @@ -151,7 +151,7 @@ class PatientLabOrdersResponseModel { projectNameN = json['ProjectNameN']; qR = json['QR']; setupID = json['SetupID']; - // speciality = json['Speciality'].cast(); + speciality = json['Speciality'] != null ? List.from(json['Speciality']) : null; status = json['Status']; statusDesc = json['StatusDesc']; strOrderDate = json['StrOrderDate']; @@ -211,7 +211,7 @@ class PatientLabOrdersResponseModel { data['ProjectNameN'] = this.projectNameN; data['QR'] = this.qR; data['SetupID'] = this.setupID; - // data['Speciality'] = this.speciality; + data['Speciality'] = this.speciality; data['Status'] = this.status; data['StatusDesc'] = this.statusDesc; data['StrOrderDate'] = this.strOrderDate; diff --git a/lib/features/prescriptions/models/resp_models/patient_prescriptions_response_model.dart b/lib/features/prescriptions/models/resp_models/patient_prescriptions_response_model.dart index 7b1d879d..0f06af7a 100644 --- a/lib/features/prescriptions/models/resp_models/patient_prescriptions_response_model.dart +++ b/lib/features/prescriptions/models/resp_models/patient_prescriptions_response_model.dart @@ -36,7 +36,7 @@ class PatientPrescriptionsResponseModel { int? noOfPatientsRate; String? qR; - // List? speciality; + List? speciality; String? strAppointmentDate; PatientPrescriptionsResponseModel( @@ -76,7 +76,7 @@ class PatientPrescriptionsResponseModel { this.nationalityFlagURL, this.noOfPatientsRate, this.qR, - // this.speciality, + this.speciality, this.strAppointmentDate}); PatientPrescriptionsResponseModel.fromJson(Map json) { @@ -116,7 +116,7 @@ class PatientPrescriptionsResponseModel { nationalityFlagURL = json['NationalityFlagURL']; noOfPatientsRate = json['NoOfPatientsRate']; qR = json['QR']; - // speciality = json['Speciality'].cast(); + speciality = json['Speciality'] != null ? List.from(json['Speciality']) : null; strAppointmentDate = json['StrAppointmentDate']; } @@ -158,7 +158,7 @@ class PatientPrescriptionsResponseModel { data['NationalityFlagURL'] = this.nationalityFlagURL; data['NoOfPatientsRate'] = this.noOfPatientsRate; data['QR'] = this.qR; - // data['Speciality'] = this.speciality; + data['Speciality'] = this.speciality; data['StrAppointmentDate'] = this.strAppointmentDate; return data; } diff --git a/lib/features/prescriptions/models/resp_models/prescription_analysis_response_model.dart b/lib/features/prescriptions/models/resp_models/prescription_analysis_response_model.dart index c0c63f40..e3fe80cb 100644 --- a/lib/features/prescriptions/models/resp_models/prescription_analysis_response_model.dart +++ b/lib/features/prescriptions/models/resp_models/prescription_analysis_response_model.dart @@ -1,17 +1,13 @@ class PrescriptionAnalysisResponse { String? prescriptionSummary; List? medicinesAnalysis; - List? importantWarnings; - List? medicineInteractions; - String? followUpNeeded; + List? importantNotes; int? languageId; PrescriptionAnalysisResponse({ this.prescriptionSummary, this.medicinesAnalysis, - this.importantWarnings, - this.medicineInteractions, - this.followUpNeeded, + this.importantNotes, this.languageId, }); @@ -23,9 +19,7 @@ class PrescriptionAnalysisResponse { medicinesAnalysis!.add(MedicineAnalysis.fromJson(v)); }); } - importantWarnings = json['important_warnings'] != null ? json['important_warnings'].cast() : []; - medicineInteractions = json['medicine_interactions'] != null ? json['medicine_interactions'].cast() : []; - followUpNeeded = json['follow_up_needed']; + importantNotes = json['important_notes'] != null ? json['important_notes'].cast() : []; languageId = json['language_id']; } @@ -35,9 +29,7 @@ class PrescriptionAnalysisResponse { if (medicinesAnalysis != null) { data['medicines_analysis'] = medicinesAnalysis!.map((v) => v.toJson()).toList(); } - data['important_warnings'] = importantWarnings; - data['medicine_interactions'] = medicineInteractions; - data['follow_up_needed'] = followUpNeeded; + data['important_notes'] = importantNotes; data['language_id'] = languageId; return data; } @@ -46,23 +38,20 @@ class PrescriptionAnalysisResponse { class MedicineAnalysis { String? medicineName; String? benefit; - List? commonSideEffects; - List? seriousWarnings; + List? allergyReactions; String? storage; MedicineAnalysis({ this.medicineName, this.benefit, - this.commonSideEffects, - this.seriousWarnings, + this.allergyReactions, this.storage, }); MedicineAnalysis.fromJson(Map json) { medicineName = json['medicine_name']; benefit = json['benefit']; - commonSideEffects = json['common_side_effects'] != null ? json['common_side_effects'].cast() : []; - seriousWarnings = json['serious_warnings'] != null ? json['serious_warnings'].cast() : []; + allergyReactions = json['allergy_reactions'] != null ? json['allergy_reactions'].cast() : []; storage = json['storage']; } @@ -70,8 +59,7 @@ class MedicineAnalysis { final Map data = {}; data['medicine_name'] = medicineName; data['benefit'] = benefit; - data['common_side_effects'] = commonSideEffects; - data['serious_warnings'] = seriousWarnings; + data['allergy_reactions'] = allergyReactions; data['storage'] = storage; return data; } diff --git a/lib/features/prescriptions/prescriptions_repo.dart b/lib/features/prescriptions/prescriptions_repo.dart index 2681b2da..588d4417 100644 --- a/lib/features/prescriptions/prescriptions_repo.dart +++ b/lib/features/prescriptions/prescriptions_repo.dart @@ -334,7 +334,7 @@ class PrescriptionsRepoImp implements PrescriptionsRepo { 'X-API-KEY': '9d9d2ac4c1fc302299dbb0fbb1b7fea1', 'accept': 'application/json', }, - body: {"medicines": payload, "language_id": langId}, + body: payload, onFailure: (error, statusCode, {messageStatus, failureType}) { failure = failureType; }, diff --git a/lib/features/prescriptions/prescriptions_view_model.dart b/lib/features/prescriptions/prescriptions_view_model.dart index 1e33b509..7ac485e0 100644 --- a/lib/features/prescriptions/prescriptions_view_model.dart +++ b/lib/features/prescriptions/prescriptions_view_model.dart @@ -4,6 +4,7 @@ import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/location_util.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; +import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_allergies_response_model.dart'; import 'package:hmg_patient_app_new/features/location/GeocodeResponse.dart'; import 'package:hmg_patient_app_new/features/location/location_view_model.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; @@ -64,6 +65,7 @@ class PrescriptionsViewModel extends ChangeNotifier { PrescriptionsViewModel({required this.prescriptionsRepo, required this.errorHandlerService, required this.navServices}); initPrescriptionsViewModel() { + isPrescriptionsDataNeedsReloading = true; // todo remove this if (isPrescriptionsDataNeedsReloading) { patientPrescriptionOrders.clear(); patientPrescriptionOrdersByClinic.clear(); @@ -413,6 +415,8 @@ class PrescriptionsViewModel extends ChangeNotifier { required int langId, required String loadingText, required Function(dynamic) onNavigate, + required PatientPrescriptionsResponseModel prescriptionResponseModel, + required List allergies, }) async { LoaderBottomSheet.showLoader( loadingText: loadingText, @@ -424,6 +428,7 @@ class PrescriptionsViewModel extends ChangeNotifier { // Prepare medicines payload List> medicines = []; + List> allergiesForanalysis = []; for (var prescription in prescriptions) { if (prescription.itemDescription != null && prescription.itemDescription!.isNotEmpty) { medicines.add({ @@ -434,8 +439,22 @@ class PrescriptionsViewModel extends ChangeNotifier { } } + for (var allergy in allergies) { + allergiesForanalysis.add({ + "description": allergy.description ?? "", + "remarks": allergy.remarks ?? "", + }); + } + + var payload = { + "medicines": medicines, + "patient_allergies": allergiesForanalysis, + "langId": langId, + "clinic_name": prescriptionResponseModel.clinicDescription ?? "", + "specialty_name": prescriptionResponseModel.speciality?.toString().replaceAll("[", "").replaceAll("]", "") ?? "" + }; final result = await prescriptionsRepo.getPrescriptionAiAnalysis( - payload: medicines, + payload: payload, langId: langId, ); diff --git a/lib/features/radiology/models/resp_models/patient_radiology_response_model.dart b/lib/features/radiology/models/resp_models/patient_radiology_response_model.dart index 740c275f..b79936ec 100644 --- a/lib/features/radiology/models/resp_models/patient_radiology_response_model.dart +++ b/lib/features/radiology/models/resp_models/patient_radiology_response_model.dart @@ -56,6 +56,7 @@ class PatientRadiologyResponseModel { bool? isCVI; bool? isRadMedicalReport; dynamic vida3Id; + List? speciality; PatientRadiologyResponseModel( {this.setupID, @@ -112,7 +113,9 @@ class PatientRadiologyResponseModel { this.strOrderDate, this.isCVI, this.isRadMedicalReport, - this.vida3Id}); + this.vida3Id, + this.speciality, + }); PatientRadiologyResponseModel.fromJson(Map json) { setupID = json['SetupID']; @@ -170,6 +173,7 @@ class PatientRadiologyResponseModel { isCVI = json['isCVI']; isRadMedicalReport = json['isRadMedicalReport']; vida3Id = json['vida3Id']; + speciality = json['Speciality'] != null ? List.from(json['Speciality']) : []; } Map toJson() { @@ -229,6 +233,7 @@ class PatientRadiologyResponseModel { data['isCVI'] = this.isCVI; data['isRadMedicalReport'] = this.isRadMedicalReport; data['vida3Id'] = this.vida3Id; + data['Speciality'] = this.speciality; return data; } } diff --git a/lib/features/radiology/models/resp_models/radiology_ai_analysis_response_model.dart b/lib/features/radiology/models/resp_models/radiology_ai_analysis_response_model.dart index 3f523428..4d9ea2e1 100644 --- a/lib/features/radiology/models/resp_models/radiology_ai_analysis_response_model.dart +++ b/lib/features/radiology/models/resp_models/radiology_ai_analysis_response_model.dart @@ -5,7 +5,6 @@ class RadiologyAiAnalysisResponse { String? labResults; String? aiPredictions; String? riskFactors; - String? prevention; int? languageId; RadiologyAiAnalysisResponse({ @@ -13,7 +12,6 @@ class RadiologyAiAnalysisResponse { this.labResults, this.aiPredictions, this.riskFactors, - this.prevention, this.languageId, }); @@ -26,7 +24,6 @@ class RadiologyAiAnalysisResponse { labResults: json["lab_results"], aiPredictions: json["ai_predictions"], riskFactors: json["riskFactors"], - prevention: json["prevention"], languageId: json["language_id"], ); @@ -35,7 +32,6 @@ class RadiologyAiAnalysisResponse { "lab_results": labResults, "ai_predictions": aiPredictions, "riskFactors": riskFactors, - "prevention": prevention, "language_id": languageId, }; } diff --git a/lib/features/radiology/radiology_repo.dart b/lib/features/radiology/radiology_repo.dart index 6e538d3f..34795e0c 100644 --- a/lib/features/radiology/radiology_repo.dart +++ b/lib/features/radiology/radiology_repo.dart @@ -19,7 +19,7 @@ abstract class RadiologyRepo { Future>>> getPatientRadiologyOrderByAppointment({required num appointmentNo, required num projectID}); - Future>> getRadiologyAiAnalysis({required String reportData, required int langId,}); + Future>> getRadiologyAiAnalysis({required PatientRadiologyResponseModel radiologyData, required int langId,}); } class RadiologyRepoImp implements RadiologyRepo { @@ -238,10 +238,12 @@ class RadiologyRepoImp implements RadiologyRepo { } @override - Future>> getRadiologyAiAnalysis({required String reportData, required int langId}) async { + Future>> getRadiologyAiAnalysis({required PatientRadiologyResponseModel radiologyData, required int langId}) async { Map payload = { - "text": reportData, - "language_id": langId + "text": radiologyData.reportData ?? "", + "language_id": langId, + "clinic_name": radiologyData.clinicDescription ?? "", + "specialty_name":radiologyData.speciality?.toString().replaceAll("[", "").replaceAll("]", "") ?? "" }; try { diff --git a/lib/features/radiology/radiology_view_model.dart b/lib/features/radiology/radiology_view_model.dart index 30f9683a..1848f648 100644 --- a/lib/features/radiology/radiology_view_model.dart +++ b/lib/features/radiology/radiology_view_model.dart @@ -229,7 +229,7 @@ class RadiologyViewModel extends ChangeNotifier { } - Future getRadiologyAiAnalysis({required String reportData, required String loadingText, required int langId}) async { + Future getRadiologyAiAnalysis({required PatientRadiologyResponseModel radiologyData, required String loadingText, required int langId}) async { LoaderBottomSheet.showLoader( loadingText: loadingText, showCloseButton: true, @@ -237,7 +237,7 @@ class RadiologyViewModel extends ChangeNotifier { }, ); - final result = await radiologyRepo.getRadiologyAiAnalysis(reportData: reportData, langId: langId); + final result = await radiologyRepo.getRadiologyAiAnalysis(radiologyData: radiologyData, langId: langId); result.fold( (failure) async { diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 30e3bc0a..65ca9a4c 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -2039,5 +2039,7 @@ abstract class LocaleKeys { static const unread = 'unread'; static const read = 'read'; static const pendingMedicalReportRequest = 'pendingMedicalReportRequest'; + static const viewAttachment = 'viewAttachment'; + static const AllergyReactions = 'AllergyReactions'; } diff --git a/lib/presentation/appointments/appointment_details_page.dart b/lib/presentation/appointments/appointment_details_page.dart index 874c97c6..947d3efe 100644 --- a/lib/presentation/appointments/appointment_details_page.dart +++ b/lib/presentation/appointments/appointment_details_page.dart @@ -26,6 +26,7 @@ import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/vital_sign_respo_model.dart'; import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart'; +import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/utils/appointment_type.dart'; @@ -835,7 +836,9 @@ class _AppointmentDetailsPageState extends State { Navigator.of(context).push( CustomPageRoute( page: PrescriptionDetailPage( - isFromAppointments: true, prescriptionsResponseModel: patientPrescriptionsResponseModel), + isFromAppointments: true, prescriptionsResponseModel: patientPrescriptionsResponseModel, + allergies: Provider.of(context, listen: false).patientAllergiesList, + ), ), ); } else { diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index f475c022..b8cb01a5 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -27,6 +27,7 @@ import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_mode import 'package:hmg_patient_app_new/features/hospital/hospital_selection_view_model.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart'; import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart'; +import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_queue_details_response_model.dart'; @@ -34,11 +35,13 @@ import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_vie import 'package:hmg_patient_app_new/features/notifications/notifications_view_model.dart'; import 'package:hmg_patient_app_new/features/occasion_theme/occasion_theme_view_model.dart'; import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_view_model.dart'; +import 'package:hmg_patient_app_new/features/paytabs/paytabs_view_model.dart'; import 'package:hmg_patient_app_new/features/todo_section/todo_section_view_model.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/appointments/appointment_queue_page.dart'; import 'package:hmg_patient_app_new/presentation/appointments/my_appointments_page.dart'; import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart'; +import 'package:hmg_patient_app_new/presentation/authentication/login.dart'; import 'package:hmg_patient_app_new/presentation/authentication/quick_login.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointment_page.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/immediate_livecare_pending_request_page.dart'; @@ -97,6 +100,7 @@ class _LandingPageState extends State { late EmergencyServicesViewModel emergencyServicesViewModel; late TodoSectionViewModel todoSectionViewModel; late NotificationsViewModel notificationsViewModel; + late MedicalFileViewModel medicalFileViewModel; final SwiperController _controller = SwiperController(); @@ -166,6 +170,7 @@ class _LandingPageState extends State { emergencyServicesViewModel.checkPatientERAdvanceBalance(); // myAppointmentsViewModel.getPatientAppointmentQueueDetails(); notificationsViewModel.initNotificationsViewModel(); + medicalFileViewModel.getPatientAllergiesList(); if (Utils.havePrivilege(122)) { insuranceViewModel.initInsuranceProvider(isFromHomePage: true); @@ -217,6 +222,7 @@ class _LandingPageState extends State { emergencyServicesViewModel = Provider.of(context, listen: false); todoSectionViewModel = Provider.of(context, listen: false); notificationsViewModel = Provider.of(context, listen: false); + medicalFileViewModel = Provider.of(context, listen: false); appState = getIt.get(); return PopScope( canPop: false, @@ -283,7 +289,7 @@ class _LandingPageState extends State { myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); myAppointmentsViewModel.initAppointmentsViewModel(); myAppointmentsViewModel.getPatientAppointments(true, false, isForTimeLine: true); - + medicalFileViewModel.getPatientAllergiesList(); // Refresh Appointments Data // habibWalletVM.initHabibWalletProvider(); // habibWalletVM.getPatientBalanceAmount(); diff --git a/lib/presentation/lab/lab_result_via_clinic/ai_analysis_widget.dart b/lib/presentation/lab/lab_result_via_clinic/ai_analysis_widget.dart index b643515f..48dc302c 100644 --- a/lib/presentation/lab/lab_result_via_clinic/ai_analysis_widget.dart +++ b/lib/presentation/lab/lab_result_via_clinic/ai_analysis_widget.dart @@ -51,7 +51,7 @@ class AiAnalysisWidget extends StatelessWidget { if (data.summary != null && data.summary!.isNotEmpty) ...[ LocaleKeys.suggestion.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor), SizedBox(height: 8.h), - data.summary!.toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400), + data.summary!.toText14Markdown(), SizedBox(height: 16.h), Divider(color: AppColors.dividerColor, thickness: 1), SizedBox(height: 16.h), @@ -64,12 +64,6 @@ class AiAnalysisWidget extends StatelessWidget { Divider(color: AppColors.dividerColor, thickness: 1), SizedBox(height: 16.h), ], - if (data.prevention != null && data.prevention!.isNotEmpty) ...[ - LocaleKeys.prevention.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor), - SizedBox(height: 12.h), - ...data.prevention!.map((item) => _buildBulletItem(item)), - SizedBox(height: 20.h), - ], Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/presentation/lab/lab_result_via_clinic/lab_ai_analysis_detailed_page.dart b/lib/presentation/lab/lab_result_via_clinic/lab_ai_analysis_detailed_page.dart index 4debd41b..44210db1 100644 --- a/lib/presentation/lab/lab_result_via_clinic/lab_ai_analysis_detailed_page.dart +++ b/lib/presentation/lab/lab_result_via_clinic/lab_ai_analysis_detailed_page.dart @@ -55,7 +55,7 @@ class _LabAiAnalysisDetailedPageState extends State { decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, side: BorderSide(width: 1, color: Color(0xFF0B85F7))), padding: EdgeInsets.all(16.r), - child: (analysis.summary ?? "").toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400), + child: (analysis.summary ?? "").toText14Markdown(), ), SizedBox(height: 8.h), ], @@ -109,54 +109,54 @@ class _LabAiAnalysisDetailedPageState extends State { ); } - // AI Recommendations Section - if (analysis.aiRecommendations != null && analysis.aiRecommendations!.isNotEmpty) { - expandableItems.add( - ExpandableListItem( - backgroundColor: Colors.transparent, - expandedBackgroundColor:Colors.transparent , - title: LocaleKeys.suggestions.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), - children: [ - SizedBox(height: 10.h), - Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r), - padding: EdgeInsets.all(16.r), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: analysis.aiRecommendations!.asMap().entries.map((entry) { - final rec = entry.value; - final isLast = entry.key == analysis.aiRecommendations!.length - 1; - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (rec.priority != null) ...[ - Container( - padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), - decoration: BoxDecoration(color: _getPriorityColor(rec.priority), borderRadius: BorderRadius.circular(4.r)), - child: rec.priority!.toText12(isBold: true, color: _getPriorityTextColor(rec.priority)), - ), - SizedBox(height: 8.h), - ], - (rec.recommendation ?? "").toText14( - color: AppColors.textColorLight, - height: 1.5, - weight: FontWeight.w400, - ), - if (!isLast) ...[ - SizedBox(height: 12.h), - Divider(color: AppColors.dividerColor, thickness: 1), - SizedBox(height: 12.h), - ], - ], - ); - }).toList(), - ), - ), - SizedBox(height: 8.h), - ], - ), - ); - } + // // AI Recommendations Section + // if (analysis.aiRecommendations != null && analysis.aiRecommendations!.isNotEmpty) { + // expandableItems.add( + // ExpandableListItem( + // backgroundColor: Colors.transparent, + // expandedBackgroundColor:Colors.transparent , + // title: LocaleKeys.suggestions.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), + // children: [ + // SizedBox(height: 10.h), + // Container( + // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r), + // padding: EdgeInsets.all(16.r), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: analysis.aiRecommendations!.asMap().entries.map((entry) { + // final rec = entry.value; + // final isLast = entry.key == analysis.aiRecommendations!.length - 1; + // return Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // if (rec.priority != null) ...[ + // Container( + // padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), + // decoration: BoxDecoration(color: _getPriorityColor(rec.priority), borderRadius: BorderRadius.circular(4.r)), + // child: rec.priority!.toText12(isBold: true, color: _getPriorityTextColor(rec.priority)), + // ), + // SizedBox(height: 8.h), + // ], + // (rec.recommendation ?? "").toText14( + // color: AppColors.textColorLight, + // height: 1.5, + // weight: FontWeight.w400, + // ), + // if (!isLast) ...[ + // SizedBox(height: 12.h), + // Divider(color: AppColors.dividerColor, thickness: 1), + // SizedBox(height: 12.h), + // ], + // ], + // ); + // }).toList(), + // ), + // ), + // SizedBox(height: 8.h), + // ], + // ), + // ); + // } // Risk Factors Section if (analysis.riskFactors != null && analysis.riskFactors!.isNotEmpty) { @@ -229,28 +229,28 @@ class _LabAiAnalysisDetailedPageState extends State { ); } - // Prevention Section - if (analysis.prevention != null && analysis.prevention!.isNotEmpty) { - expandableItems.add( - ExpandableListItem( - backgroundColor: Colors.transparent, - expandedBackgroundColor:Colors.transparent , - title: LocaleKeys.prevention.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), - children: [ - SizedBox(height: 10.h), - Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, side: BorderSide(width: 1, color: Color(0xFF18C273))), - padding: EdgeInsets.all(16.r), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: analysis.prevention!.map((prevention) => _buildBulletItem(prevention)).toList(), - ), - ), - SizedBox(height: 8.h), - ], - ), - ); - } + // // Prevention Section + // if (analysis.prevention != null && analysis.prevention!.isNotEmpty) { + // expandableItems.add( + // ExpandableListItem( + // backgroundColor: Colors.transparent, + // expandedBackgroundColor:Colors.transparent , + // title: LocaleKeys.prevention.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), + // children: [ + // SizedBox(height: 10.h), + // Container( + // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, side: BorderSide(width: 1, color: Color(0xFF18C273))), + // padding: EdgeInsets.all(16.r), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: analysis.prevention!.map((prevention) => _buildBulletItem(prevention)).toList(), + // ), + // ), + // SizedBox(height: 8.h), + // ], + // ), + // ); + // } // // Suggested Doctors Section // if (analysis.suggestedDoctors != null && analysis.suggestedDoctors!.isNotEmpty) { diff --git a/lib/presentation/lab/lab_results/lab_result_details.dart b/lib/presentation/lab/lab_results/lab_result_details.dart index 9fbb49a8..4a65d9cf 100644 --- a/lib/presentation/lab/lab_results/lab_result_details.dart +++ b/lib/presentation/lab/lab_results/lab_result_details.dart @@ -25,14 +25,16 @@ import 'package:hmg_patient_app_new/widgets/graph/custom_graph.dart'; import 'package:provider/provider.dart' show Consumer, Provider, ReadContext, Selector; import '../../../core/common_models/data_points.dart'; +import '../../../features/lab/models/resp_models/patient_lab_orders_response_model.dart'; import '../../../widgets/common_bottom_sheet.dart' show showCommonBottomSheetWithoutHeight; import 'dart:ui' as ui; class LabResultDetails extends StatefulWidget { final LabResult recentLabResult; final String? testDescription; + final PatientLabOrdersResponseModel labOrder; - const LabResultDetails({super.key, required this.recentLabResult, required this.testDescription}); + const LabResultDetails({super.key, required this.recentLabResult, required this.testDescription, required this.labOrder}); @override State createState() => _LabResultDetailsState(); @@ -197,7 +199,7 @@ class _LabResultDetailsState extends State { onOkPressed: () { context.pop(); labViewModel.getAiOverviewSingleLabResult( - langId: appState.getLanguageID(), recentLabResult: recentLabResult, loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context)); + langId: appState.getLanguageID(), recentLabResult: recentLabResult, loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context), labOrder: widget.labOrder); }, onCancelPressed: () { context.pop(); diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index add423d8..bd69fb7e 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -972,7 +972,11 @@ class _MedicalFilePageState extends State { prescriptionVM.setPrescriptionsDetailsLoading(); Navigator.of(context).push( CustomPageRoute( - page: PrescriptionDetailPage(isFromAppointments: false, prescriptionsResponseModel: prescriptionVM.patientPrescriptionOrders[index]), + page: PrescriptionDetailPage( + isFromAppointments: false, + prescriptionsResponseModel: prescriptionVM.patientPrescriptionOrders[index], + allergies: Provider.of(context, listen: false).patientAllergiesList, + ), ), ); }), diff --git a/lib/presentation/prescriptions/prescription_ai_analysis_detailed_page.dart b/lib/presentation/prescriptions/prescription_ai_analysis_detailed_page.dart index 82a5d9de..cf83bcca 100644 --- a/lib/presentation/prescriptions/prescription_ai_analysis_detailed_page.dart +++ b/lib/presentation/prescriptions/prescription_ai_analysis_detailed_page.dart @@ -89,12 +89,12 @@ class _PrescriptionAiAnalysisDetailedPageState extends State allergies; @override State createState() => _PrescriptionDetailPageState(); @@ -318,6 +320,8 @@ class _PrescriptionDetailPageState extends State { prescriptionsViewModel.setIsPrescriptionAIAnalysisNeedsToBeShown(true); prescriptionsViewModel.getPrescriptionAiAnalysis( prescriptions: prescriptionsViewModel.prescriptionDetailsList, + prescriptionResponseModel: widget.prescriptionsResponseModel, + allergies: widget.allergies, langId: getIt.get().getLanguageID(), loadingText: LocaleKeys.loadingAIAnalysisPrescription.tr(context: context), onNavigate: (data) { diff --git a/lib/presentation/prescriptions/prescriptions_list_page.dart b/lib/presentation/prescriptions/prescriptions_list_page.dart index 071cce87..e4562545 100644 --- a/lib/presentation/prescriptions/prescriptions_list_page.dart +++ b/lib/presentation/prescriptions/prescriptions_list_page.dart @@ -11,6 +11,7 @@ import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; +import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart'; @@ -37,6 +38,7 @@ class _PrescriptionsListPageState extends State { int? expandedIndex; late PrescriptionsViewModel prescriptionsViewModel; + late MedicalFileViewModel medicalFileViewModel; @override void initState() { @@ -50,6 +52,7 @@ class _PrescriptionsListPageState extends State { Widget build(BuildContext context) { AppState appState = getIt.get(); prescriptionsViewModel = Provider.of(context, listen: false); + medicalFileViewModel = Provider.of(context, listen: false); return Scaffold( backgroundColor: AppColors.bgScaffoldColor, body: CollapsingListView( @@ -243,6 +246,7 @@ class _PrescriptionsListPageState extends State { page: PrescriptionDetailPage( prescriptionsResponseModel: model.patientPrescriptionOrders[index], isFromAppointments: false, + allergies: Provider.of(context, listen: false).patientAllergiesList, ), ), ); @@ -550,6 +554,7 @@ class _PrescriptionsListPageState extends State { CustomPageRoute( page: PrescriptionDetailPage( prescriptionsResponseModel: model.patientPrescriptionOrders[index], + allergies: medicalFileViewModel.patientAllergiesList, isFromAppointments: false, ), ), diff --git a/lib/presentation/radiology/radiology_ai_analysis_detailed_page.dart b/lib/presentation/radiology/radiology_ai_analysis_detailed_page.dart index a3e00e79..eaebd34e 100644 --- a/lib/presentation/radiology/radiology_ai_analysis_detailed_page.dart +++ b/lib/presentation/radiology/radiology_ai_analysis_detailed_page.dart @@ -45,7 +45,7 @@ class _RadiologyAiAnalysisDetailedPageState extends State _buildBulletItem(prevention)).toList(), - ), - ), - SizedBox(height: 8.h), - ], - ), - ); - } + // // Prevention Section + // if (preventions.isNotEmpty) { + // expandableItems.add( + // ExpandableListItem( + // backgroundColor: Colors.transparent, + // expandedBackgroundColor: Colors.transparent, + // title: LocaleKeys.prevention.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), + // children: [ + // SizedBox(height: 10.h), + // Container( + // decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + // color: AppColors.whiteColor, + // borderRadius: 12.r, + // side: BorderSide(width: 1, color: Color(0xFF18C273)), + // ), + // padding: EdgeInsets.all(16.r), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: preventions.map((prevention) => _buildBulletItem(prevention)).toList(), + // ), + // ), + // SizedBox(height: 8.h), + // ], + // ), + // ); + // } return Column( children: [ diff --git a/lib/presentation/radiology/radiology_ai_analysis_widget.dart b/lib/presentation/radiology/radiology_ai_analysis_widget.dart index f22bcbd0..0fc1887e 100644 --- a/lib/presentation/radiology/radiology_ai_analysis_widget.dart +++ b/lib/presentation/radiology/radiology_ai_analysis_widget.dart @@ -27,7 +27,7 @@ class RadiologyAiAnalysisWidget extends StatelessWidget { Widget build(BuildContext context) { // Parse the string fields into lists final predictions = _parseStringToList(data.aiPredictions); - final preventions = _parseStringToList(data.prevention); + // final preventions = _parseStringToList(data.prevention); return Container( decoration: BoxDecoration(borderRadius: BorderRadius.circular(24.r), gradient: AppColors.aiLinearGradient), @@ -69,12 +69,12 @@ class RadiologyAiAnalysisWidget extends StatelessWidget { Divider(color: AppColors.dividerColor, thickness: 1), SizedBox(height: 16.h), ], - if (preventions.isNotEmpty) ...[ - LocaleKeys.prevention.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor), - SizedBox(height: 12.h), - ...preventions.map((item) => _buildBulletItem(item)), - SizedBox(height: 20.h), - ], + // if (preventions.isNotEmpty) ...[ + // LocaleKeys.prevention.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor), + // SizedBox(height: 12.h), + // ...preventions.map((item) => _buildBulletItem(item)), + // SizedBox(height: 20.h), + // ], Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/presentation/radiology/radiology_result_page.dart b/lib/presentation/radiology/radiology_result_page.dart index 5b7072e6..b7f94261 100644 --- a/lib/presentation/radiology/radiology_result_page.dart +++ b/lib/presentation/radiology/radiology_result_page.dart @@ -232,7 +232,7 @@ class _RadiologyResultPageState extends State { onOkPressed: () { context.pop(); radiologyViewModel.getRadiologyAiAnalysis( - reportData: widget.patientRadiologyResponseModel.reportData ?? "", + radiologyData: widget.patientRadiologyResponseModel, loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context), langId: _appState.getLanguageID(), ); diff --git a/pubspec.lock b/pubspec.lock index f8789dac..29bc55a2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1404,10 +1404,10 @@ packages: dependency: transitive description: name: matcher - sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.19" + version: "0.12.17" material_color_utilities: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c6bc2c93..144fa923 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -116,6 +116,7 @@ dependencies: cloudflare_turnstile: ^3.7.2 freerasp: ^8.2.1 safe_device: ^1.4.1 + flutter_markdown_plus: ^1.0.12 myfatoorah_flutter: ^3.3.2 dev_dependencies: