Merge pull request 'ai-analysis' (#395) from ai-analysis into master

Reviewed-on: https://34.17.182.140/Haroon6138/HMG_Patient_App_New/pulls/395
pull/396/head
Haroon6138 4 days ago
commit fb7de50bff

@ -7,6 +7,11 @@
# The following line activates a set of recommended lints for Flutter apps, # The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices. # packages, and plugins designed to encourage good coding practices.
analyzer:
exclude:
- build/**
- android/**
- ios/**
include: package:flutter_lints/flutter.yaml include: package:flutter_lints/flutter.yaml
linter: linter:

@ -2070,5 +2070,6 @@
"downloadApp": "حمل التطبيق", "downloadApp": "حمل التطبيق",
"unread": "غير مقروء", "unread": "غير مقروء",
"read": "مقروءة", "read": "مقروءة",
"pendingMedicalReportRequest": "لديك بالفعل طلب معلّق للحصول على تقرير طبي خاص بهذا الموعد. يرجى الانتظار حتى اكتمال الطلب قبل تقديم طلب جديد." "pendingMedicalReportRequest": "لديك بالفعل طلب معلّق للحصول على تقرير طبي خاص بهذا الموعد. يرجى الانتظار حتى اكتمال الطلب قبل تقديم طلب جديد.",
"AllergyReactions": "ردود الفعل التحسسية"
} }

@ -2060,7 +2060,8 @@
"downloadApp": "Download App", "downloadApp": "Download App",
"unread": "Unread", "unread": "Unread",
"read": "Read", "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"
} }

@ -12,20 +12,8 @@
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
478CFA942E638C8E0064F3D7 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 478CFA932E638C8E0064F3D7 /* GoogleService-Info.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 */; }; 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 */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
76AA18AE2F3B2A4D00DC8DFC /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */; }; 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 */; }; 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@ -49,9 +37,6 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
76B1D2542F91BF8000DBBD1B /* PenguinINRenderer.xcframework in Embed Frameworks */,
76B1D2522F91BF8000DBBD1B /* Penguin.xcframework in Embed Frameworks */,
76B1D2562F91BF8000DBBD1B /* PenNavUI.xcframework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -77,22 +62,14 @@
478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; }; 478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
478CFA952E6E20A60064F3D7 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; }; 478CFA952E6E20A60064F3D7 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
56E413AB2A2E9765749CACD1 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 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 = "<group>"; };
61243B422EC5FA3700D46FA0 /* PenguinModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinModel.swift; sourceTree = "<group>"; };
61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinNavigator.swift; sourceTree = "<group>"; };
61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinPlugin.swift; sourceTree = "<group>"; };
61243B452EC5FA3700D46FA0 /* PenguinView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinView.swift; sourceTree = "<group>"; };
61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinViewFactory.swift; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = "<group>"; }; 769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = "<group>"; };
76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = ring_30Sec.caf; sourceTree = "<group>"; }; 76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = ring_30Sec.caf; sourceTree = "<group>"; };
76B1D24E2F91BF8000DBBD1B /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = "<group>"; };
76B1D24F2F91BF8000DBBD1B /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = "<group>"; };
76B1D2502F91BF8000DBBD1B /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = "<group>"; };
76B714CF300E58B1004DE37A /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; 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; }; 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 = "<group>"; }; 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
@ -112,10 +89,9 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, 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 */, 5D5A1F80D389375644C4D0DC /* Pods_Runner.framework in Frameworks */,
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
37D27FAF2C38AC83B852680C /* Pods_Runner.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -133,7 +109,6 @@
61243B412EC5FA3700D46FA0 /* Helper */ = { 61243B412EC5FA3700D46FA0 /* Helper */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
61243B3D2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift */,
); );
path = Helper; path = Helper;
sourceTree = "<group>"; sourceTree = "<group>";
@ -141,11 +116,6 @@
61243B472EC5FA3700D46FA0 /* Penguin */ = { 61243B472EC5FA3700D46FA0 /* Penguin */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
61243B422EC5FA3700D46FA0 /* PenguinModel.swift */,
61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */,
61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */,
61243B452EC5FA3700D46FA0 /* PenguinView.swift */,
61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */,
); );
path = Penguin; path = Penguin;
sourceTree = "<group>"; sourceTree = "<group>";
@ -153,12 +123,10 @@
766D8CB22EC60BE600D05E07 /* Frameworks */ = { 766D8CB22EC60BE600D05E07 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
76B1D24E2F91BF8000DBBD1B /* Penguin.xcframework */,
76B1D24F2F91BF8000DBBD1B /* PenguinINRenderer.xcframework */,
76B1D2502F91BF8000DBBD1B /* PenNavUI.xcframework */,
76B714CF300E58B1004DE37A /* WidgetKit.framework */, 76B714CF300E58B1004DE37A /* WidgetKit.framework */,
76B714D1300E58B1004DE37A /* SwiftUI.framework */, 76B714D1300E58B1004DE37A /* SwiftUI.framework */,
56E413AB2A2E9765749CACD1 /* Pods_Runner.framework */, 56E413AB2A2E9765749CACD1 /* Pods_Runner.framework */,
A83C76CFF9D3F92EDE3B22B4 /* Pods_Runner.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -211,7 +179,6 @@
children = ( children = (
76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */, 76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */,
61243B412EC5FA3700D46FA0 /* Helper */, 61243B412EC5FA3700D46FA0 /* Helper */,
61243B472EC5FA3700D46FA0 /* Penguin */,
769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */, 769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */,
478CFA952E6E20A60064F3D7 /* Runner.entitlements */, 478CFA952E6E20A60064F3D7 /* Runner.entitlements */,
478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */, 478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */,
@ -369,6 +336,7 @@
"${PODS_ROOT}/Manifest.lock", "${PODS_ROOT}/Manifest.lock",
); );
name = "[CP] Check Pods Manifest.lock"; name = "[CP] Check Pods Manifest.lock";
name = "[CP] Copy Pods Resources";
outputFileListPaths = ( outputFileListPaths = (
); );
outputPaths = ( outputPaths = (
@ -444,12 +412,6 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 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 */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;

@ -14,8 +14,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/google/app-check.git", "location" : "https://github.com/google/app-check.git",
"state" : { "state" : {
"revision" : "3e33dd27dd4c69bd81c7c81fe61d8ccf58846902", "revision" : "97f7d74dd0e8f3d0fe5fc75cc8957aa73bdc948a",
"version" : "11.3.1" "version" : "11.3.2"
} }
}, },
{ {
@ -50,17 +50,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk", "location" : "https://github.com/firebase/firebase-ios-sdk",
"state" : { "state" : {
"revision" : "fdc352fabaf5916e7faa1f96ad02b1957e93e5a5", "revision" : "27eaab3918e0bf78711cf1abf240577176326432",
"version" : "11.15.0" "version" : "12.19.0"
}
},
{
"identity" : "flutterfire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/flutterfire",
"state" : {
"revision" : "dadb0fd27bc9afe4dee4f23326a4a9ba238258ac",
"version" : "3.15.2-firebase-core-swift"
} }
}, },
{ {
@ -68,8 +59,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/googleads/google-ads-on-device-conversion-ios-sdk", "location" : "https://github.com/googleads/google-ads-on-device-conversion-ios-sdk",
"state" : { "state" : {
"revision" : "a2d0f1f1666de591eb1a811f40b1706f5c63a2ed", "revision" : "0208e2681ec81f8a9c81084696f60fcce26cb7ee",
"version" : "2.3.0" "version" : "3.7.0"
} }
}, },
{ {
@ -77,8 +68,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git", "location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : { "state" : {
"revision" : "45ce435e9406d3c674dd249a042b932bee006f60", "revision" : "b8455dd2ff55cc269fda7a4f9eac6c1e3588c53f",
"version" : "11.15.0" "version" : "12.19.2"
} }
}, },
{ {
@ -95,8 +86,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git", "location" : "https://github.com/google/GoogleUtilities.git",
"state" : { "state" : {
"revision" : "9f183ae842be978784f2963a343682e0c46d8fb3", "revision" : "cc31f5ed464b111f877ce8554cbef4455d410d91",
"version" : "8.1.2" "version" : "8.1.4"
} }
}, },
{ {
@ -113,8 +104,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git", "location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : { "state" : {
"revision" : "c756a29784521063b6a1202907e2cc47f41b667c", "revision" : "724a52eea6329b7e12d3ad8300d76ca9f3895fcc",
"version" : "4.5.0" "version" : "5.3.1"
} }
}, },
{ {
@ -162,15 +153,6 @@
"version" : "5.21.7" "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", "identity" : "swiftygif",
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",

@ -50,17 +50,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk", "location" : "https://github.com/firebase/firebase-ios-sdk",
"state" : { "state" : {
"revision" : "fdc352fabaf5916e7faa1f96ad02b1957e93e5a5", "revision" : "27eaab3918e0bf78711cf1abf240577176326432",
"version" : "11.15.0" "version" : "12.19.0"
}
},
{
"identity" : "flutterfire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/flutterfire",
"state" : {
"revision" : "dadb0fd27bc9afe4dee4f23326a4a9ba238258ac",
"version" : "3.15.2-firebase-core-swift"
} }
}, },
{ {
@ -68,8 +59,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/googleads/google-ads-on-device-conversion-ios-sdk", "location" : "https://github.com/googleads/google-ads-on-device-conversion-ios-sdk",
"state" : { "state" : {
"revision" : "a2d0f1f1666de591eb1a811f40b1706f5c63a2ed", "revision" : "0208e2681ec81f8a9c81084696f60fcce26cb7ee",
"version" : "2.3.0" "version" : "3.7.0"
} }
}, },
{ {
@ -77,8 +68,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git", "location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : { "state" : {
"revision" : "45ce435e9406d3c674dd249a042b932bee006f60", "revision" : "b8455dd2ff55cc269fda7a4f9eac6c1e3588c53f",
"version" : "11.15.0" "version" : "12.19.2"
} }
}, },
{ {
@ -95,8 +86,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git", "location" : "https://github.com/google/GoogleUtilities.git",
"state" : { "state" : {
"revision" : "9f183ae842be978784f2963a343682e0c46d8fb3", "revision" : "cc31f5ed464b111f877ce8554cbef4455d410d91",
"version" : "8.1.2" "version" : "8.1.4"
} }
}, },
{ {
@ -113,8 +104,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git", "location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : { "state" : {
"revision" : "c756a29784521063b6a1202907e2cc47f41b667c", "revision" : "724a52eea6329b7e12d3ad8300d76ca9f3895fcc",
"version" : "4.5.0" "version" : "5.3.1"
} }
}, },
{ {
@ -162,15 +153,6 @@
"version" : "5.21.7" "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", "identity" : "swiftygif",
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",

@ -26,28 +26,28 @@ import GoogleMaps
} }
func initializePlatformChannels(){ func initializePlatformChannels(){
DispatchQueue.main.async { [weak self] in // DispatchQueue.main.async { [weak self] in
guard let self = self else { return } // guard let self = self else { return }
//
// 1. Try accessing window via AppDelegate (legacy/single-window setup) // // 1. Try accessing window via AppDelegate (legacy/single-window setup)
var controller = self.window?.rootViewController as? FlutterViewController // var controller = self.window?.rootViewController as? FlutterViewController
//
// 2. Fallback to UIWindowScene active window (modern iOS architecture) // // 2. Fallback to UIWindowScene active window (modern iOS architecture)
if controller == nil { // if controller == nil {
controller = UIApplication.shared.connectedScenes // controller = UIApplication.shared.connectedScenes
.compactMap { $0 as? UIWindowScene } // .compactMap { $0 as? UIWindowScene }
.flatMap { $0.windows } // .flatMap { $0.windows }
.first(where: { $0.isKeyWindow })? // .first(where: { $0.isKeyWindow })?
.rootViewController as? FlutterViewController // .rootViewController as? FlutterViewController
} // }
//
// 3. Perform initialization once FlutterViewController is available // // 3. Perform initialization once FlutterViewController is available
if let mainViewController = controller { // if let mainViewController = controller {
HMGPenguinInPlatformBridge.initialize(flutterViewController: mainViewController) // HMGPenguinInPlatformBridge.initialize(flutterViewController: mainViewController)
} else { // } else {
print("⚠️ FlutterViewController not ready yet for initializePlatformChannels.") // print("⚠️ FlutterViewController not ready yet for initializePlatformChannels.")
} // }
} // }
// if let mainViewController = window?.rootViewController as? FlutterViewController{ // platform initialization suppose to be in foreground // if let mainViewController = window?.rootViewController as? FlutterViewController{ // platform initialization suppose to be in foreground

@ -2,6 +2,27 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>CADisableMinimumFrameDurationOnPhone</key>
<true/> <true/>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>

@ -210,7 +210,7 @@ class ApiClientImp implements ApiClient {
} }
// body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
// body['PatientID'] = 1009156; // body['PatientID'] = 2101020;
// body['PatientID'] = 53320; // body['PatientID'] = 53320;
// body['PatientTypeID'] = 1; // body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0; // body['PatientOutSA'] = 0;
@ -248,7 +248,7 @@ class ApiClientImp implements ApiClient {
if (kDebugMode) { if (kDebugMode) {
debugPrint("uri: ${Uri.parse(url.trim())}"); debugPrint("uri: ${Uri.parse(url.trim())}");
var requestBodyJSON = json.encode(body); var requestBodyJSON = json.encode(body);
debugPrint("body: $requestBodyJSON", wrapWidth: 2048); debugPrint("body: $requestBodyJSON", wrapWidth: 10000);
// log("body: $requestBodyJSON"); // log("body: $requestBodyJSON");
} }

@ -6,6 +6,7 @@ import 'package:myfatoorah_flutter/myfatoorah_flutter.dart';
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.preProd;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -1,5 +1,6 @@
import 'package:auto_size_text/auto_size_text.dart'; import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/cupertino.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_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; 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/dependencies.dart';
@ -486,6 +487,10 @@ extension EmailValidator on String {
: 'Poppins'), : 'Poppins'),
), ),
); );
Widget toText14Markdown() =>
MarkdownBody(
data: this,
);
Widget toSectionHeading({String upperHeading = "", String lowerHeading = ""}) { Widget toSectionHeading({String upperHeading = "", String lowerHeading = ""}) {
String upper = ""; String upper = "";

@ -277,6 +277,7 @@ class AuthenticationViewModel extends ChangeNotifier {
// Check if field is empty // Check if field is empty
if (nationalIdController.text.isEmpty) { if (nationalIdController.text.isEmpty) {
_nationalIdError = LocaleKeys.pleaseEnterAnationalID.tr(); _nationalIdError = LocaleKeys.pleaseEnterAnationalID.tr();
print("the controller is emtpy so the error is $_nationalIdError");
notifyListeners(); notifyListeners();
return false; return false;
} }
@ -286,6 +287,7 @@ class AuthenticationViewModel extends ChangeNotifier {
if (cleanedId.length == 10) { if (cleanedId.length == 10) {
if (!Utils.isSAUDIIDValid(cleanedId)) { if (!Utils.isSAUDIIDValid(cleanedId)) {
_nationalIdError = LocaleKeys.enterValidNationalId.tr(); _nationalIdError = LocaleKeys.enterValidNationalId.tr();
print("the controller is not valid so the error is $_nationalIdError");
notifyListeners(); notifyListeners();
return false; return false;
} }
@ -296,6 +298,7 @@ class AuthenticationViewModel extends ChangeNotifier {
if (cleanedId.length == 10) { if (cleanedId.length == 10) {
if (!ValidationUtils.validateIqama(nationalIdController.text)) { if (!ValidationUtils.validateIqama(nationalIdController.text)) {
_nationalIdError = LocaleKeys.pleaseEnterAValidIqamaID.tr(); _nationalIdError = LocaleKeys.pleaseEnterAValidIqamaID.tr();
print("the controller is not valid so the error is $_nationalIdError");
notifyListeners(); notifyListeners();
return false; return false;
} }
@ -305,6 +308,7 @@ class AuthenticationViewModel extends ChangeNotifier {
} else if (selectedCountrySignup == CountryEnum.unitedArabEmirates) { } else if (selectedCountrySignup == CountryEnum.unitedArabEmirates) {
if (!ValidationUtils.validateUaeNationalId(nationalIdController.text) && cleanedId.length == 15) { if (!ValidationUtils.validateUaeNationalId(nationalIdController.text) && cleanedId.length == 15) {
_nationalIdError = LocaleKeys.pleaseEnterAValidNationalID.tr(); _nationalIdError = LocaleKeys.pleaseEnterAValidNationalID.tr();
print("the controller is not valid so the error is $_nationalIdError");
notifyListeners(); notifyListeners();
return false; return false;
} }

@ -522,7 +522,7 @@ class LabViewModel extends ChangeNotifier {
labOrderResponseByAi = null; labOrderResponseByAi = null;
navigationService.push( navigationService.push(
MaterialPageRoute( MaterialPageRoute(
builder: (_) => LabResultDetails(recentLabResult: recentResult, testDescription: testDescription), builder: (_) => LabResultDetails(recentLabResult: recentResult, testDescription: testDescription, labOrder: laborder),
), ),
); );
notifyListeners(); notifyListeners();
@ -897,6 +897,8 @@ class LabViewModel extends ChangeNotifier {
} }
// } // }
orderData["results"] = testResults; orderData["results"] = testResults;
orderData["clinic_name"] = labOrder.clinicDescription ?? "";
orderData["specialty_name"] = labOrder.speciality?.toString().replaceAll("[", "").replaceAll("]", "") ?? "";
results.add(orderData); results.add(orderData);
final result = await labRepo.getPatientAiOverViewLabOrders(payload: results, langId: langId); final result = await labRepo.getPatientAiOverViewLabOrders(payload: results, langId: langId);
@ -927,7 +929,7 @@ class LabViewModel extends ChangeNotifier {
// LoadingUtils.hideFullScreenLoader(); // LoadingUtils.hideFullScreenLoader();
} }
Future<void> getAiOverviewSingleLabResult({required int langId, required LabResult recentLabResult, required String loadingText}) async { Future<void> getAiOverviewSingleLabResult({required int langId, required LabResult recentLabResult, required String loadingText, required PatientLabOrdersResponseModel labOrder}) async {
LoaderBottomSheet.showLoader( LoaderBottomSheet.showLoader(
loadingText: loadingText, loadingText: loadingText,
showCloseButton: true, showCloseButton: true,
@ -942,9 +944,9 @@ class LabViewModel extends ChangeNotifier {
"UOM": recentLabResult.uOM ?? '', "UOM": recentLabResult.uOM ?? '',
"ReferanceRange": recentLabResult.referanceRange ?? '', "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": currentlySelectedPatientOrder!.patientID, "language_id": langId, "lab_results": results};
var payload = {"patient_id": getIt.get<AppState>().getAuthenticatedUser()!.patientId, "language_id": langId, "lab_results": results}; var payload = {"patient_id": getIt.get<AppState>().getAuthenticatedUser()!.patientId, "language_id": langId, "lab_results": results, "specialty_name": speciality, "clinic_name": labOrder.clinicDescription ?? ""};
final result = await labRepo.getPatientAiOverViewLabOrder(payload); final result = await labRepo.getPatientAiOverViewLabOrder(payload);
result.fold( result.fold(
(failure) async { (failure) async {

@ -35,21 +35,15 @@ class LabOrdersResponseByAi {
class Analysis { class Analysis {
List<AiGeneratedAttribute>? aiGeneratedAttributes; List<AiGeneratedAttribute>? aiGeneratedAttributes;
List<String>? aiPredictions; List<String>? aiPredictions;
List<AiRecommendation>? aiRecommendations;
List<String>? prevention;
String? rawMessage; String? rawMessage;
List<RiskFactor>? riskFactors; List<RiskFactor>? riskFactors;
List<dynamic>? suggestedDoctors;
String? summary; String? summary;
Analysis({ Analysis({
this.aiGeneratedAttributes, this.aiGeneratedAttributes,
this.aiPredictions, this.aiPredictions,
this.aiRecommendations,
this.prevention,
this.rawMessage, this.rawMessage,
this.riskFactors, this.riskFactors,
this.suggestedDoctors,
this.summary, this.summary,
}); });
@ -60,22 +54,16 @@ class Analysis {
factory Analysis.fromJson(Map<String, dynamic> json) => Analysis( factory Analysis.fromJson(Map<String, dynamic> json) => Analysis(
aiGeneratedAttributes: json["ai_generated_attributes"] == null ? [] : List<AiGeneratedAttribute>.from(json["ai_generated_attributes"]!.map((x) => AiGeneratedAttribute.fromJson(x))), aiGeneratedAttributes: json["ai_generated_attributes"] == null ? [] : List<AiGeneratedAttribute>.from(json["ai_generated_attributes"]!.map((x) => AiGeneratedAttribute.fromJson(x))),
aiPredictions: json["ai_predictions"] == null ? [] : List<String>.from(json["ai_predictions"]!.map((x) => x)), aiPredictions: json["ai_predictions"] == null ? [] : List<String>.from(json["ai_predictions"]!.map((x) => x)),
aiRecommendations: json["ai_recommendations"] == null ? [] : List<AiRecommendation>.from(json["ai_recommendations"]!.map((x) => AiRecommendation.fromJson(x))),
prevention: json["prevention"] == null ? [] : List<String>.from(json["prevention"]!.map((x) => x)),
rawMessage: json["raw_message"], rawMessage: json["raw_message"],
riskFactors: json["riskFactors"] == null ? [] : List<RiskFactor>.from(json["riskFactors"]!.map((x) => RiskFactor.fromJson(x))), riskFactors: json["riskFactors"] == null ? [] : List<RiskFactor>.from(json["riskFactors"]!.map((x) => RiskFactor.fromJson(x))),
suggestedDoctors: json["suggested_doctors"] == null ? [] : List<dynamic>.from(json["suggested_doctors"]!.map((x) => x)),
summary: json["summary"], summary: json["summary"],
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
"ai_generated_attributes": aiGeneratedAttributes == null ? [] : List<dynamic>.from(aiGeneratedAttributes!.map((x) => x.toJson())), "ai_generated_attributes": aiGeneratedAttributes == null ? [] : List<dynamic>.from(aiGeneratedAttributes!.map((x) => x.toJson())),
"ai_predictions": aiPredictions == null ? [] : List<dynamic>.from(aiPredictions!.map((x) => x)), "ai_predictions": aiPredictions == null ? [] : List<dynamic>.from(aiPredictions!.map((x) => x)),
"ai_recommendations": aiRecommendations == null ? [] : List<dynamic>.from(aiRecommendations!.map((x) => x.toJson())),
"prevention": prevention == null ? [] : List<dynamic>.from(prevention!.map((x) => x)),
"raw_message": rawMessage, "raw_message": rawMessage,
"riskFactors": riskFactors == null ? [] : List<dynamic>.from(riskFactors!.map((x) => x.toJson())), "riskFactors": riskFactors == null ? [] : List<dynamic>.from(riskFactors!.map((x) => x.toJson())),
"suggested_doctors": suggestedDoctors == null ? [] : List<dynamic>.from(suggestedDoctors!.map((x) => x)),
"summary": summary, "summary": summary,
}; };
} }

@ -4,20 +4,14 @@ class LabOrderResponseByAi {
String? summary; String? summary;
List<AiGeneratedAttribute>? aiGeneratedAttributes; List<AiGeneratedAttribute>? aiGeneratedAttributes;
List<String>? aiPredictions; List<String>? aiPredictions;
List<AiRecommendation>? aiRecommendations;
List<RiskFactor>? riskFactors; List<RiskFactor>? riskFactors;
List<String>? prevention;
List<dynamic>? suggestedDoctors;
String? rawMessage; String? rawMessage;
LabOrderResponseByAi({ LabOrderResponseByAi({
this.summary, this.summary,
this.aiGeneratedAttributes, this.aiGeneratedAttributes,
this.aiPredictions, this.aiPredictions,
this.aiRecommendations,
this.riskFactors, this.riskFactors,
this.prevention,
this.suggestedDoctors,
this.rawMessage, this.rawMessage,
}); });
@ -29,10 +23,7 @@ class LabOrderResponseByAi {
summary: json["summary"], summary: json["summary"],
aiGeneratedAttributes: json["ai_generated_attributes"] == null ? [] : List<AiGeneratedAttribute>.from(json["ai_generated_attributes"]!.map((x) => AiGeneratedAttribute.fromJson(x))), aiGeneratedAttributes: json["ai_generated_attributes"] == null ? [] : List<AiGeneratedAttribute>.from(json["ai_generated_attributes"]!.map((x) => AiGeneratedAttribute.fromJson(x))),
aiPredictions: json["ai_predictions"] == null ? [] : List<String>.from(json["ai_predictions"]!.map((x) => x)), aiPredictions: json["ai_predictions"] == null ? [] : List<String>.from(json["ai_predictions"]!.map((x) => x)),
aiRecommendations: json["ai_recommendations"] == null ? [] : List<AiRecommendation>.from(json["ai_recommendations"]!.map((x) => AiRecommendation.fromJson(x))),
riskFactors: json["riskFactors"] == null ? [] : List<RiskFactor>.from(json["riskFactors"]!.map((x) => RiskFactor.fromJson(x))), riskFactors: json["riskFactors"] == null ? [] : List<RiskFactor>.from(json["riskFactors"]!.map((x) => RiskFactor.fromJson(x))),
prevention: json["prevention"] == null ? [] : List<String>.from(json["prevention"]!.map((x) => x)),
suggestedDoctors: json["suggested_doctors"] == null ? [] : List<dynamic>.from(json["suggested_doctors"]!.map((x) => x)),
rawMessage: json["raw_message"], rawMessage: json["raw_message"],
); );
@ -40,10 +31,7 @@ class LabOrderResponseByAi {
"summary": summary, "summary": summary,
"ai_generated_attributes": aiGeneratedAttributes == null ? [] : List<dynamic>.from(aiGeneratedAttributes!.map((x) => x.toJson())), "ai_generated_attributes": aiGeneratedAttributes == null ? [] : List<dynamic>.from(aiGeneratedAttributes!.map((x) => x.toJson())),
"ai_predictions": aiPredictions == null ? [] : List<dynamic>.from(aiPredictions!.map((x) => x)), "ai_predictions": aiPredictions == null ? [] : List<dynamic>.from(aiPredictions!.map((x) => x)),
"ai_recommendations": aiRecommendations == null ? [] : List<dynamic>.from(aiRecommendations!.map((x) => x.toJson())),
"riskFactors": riskFactors == null ? [] : List<dynamic>.from(riskFactors!.map((x) => x.toJson())), "riskFactors": riskFactors == null ? [] : List<dynamic>.from(riskFactors!.map((x) => x.toJson())),
"prevention": prevention == null ? [] : List<dynamic>.from(prevention!.map((x) => x)),
"suggested_doctors": suggestedDoctors == null ? [] : List<dynamic>.from(suggestedDoctors!.map((x) => x)),
"raw_message": rawMessage, "raw_message": rawMessage,
}; };
} }

@ -45,7 +45,7 @@ class PatientLabOrdersResponseModel {
dynamic? projectNameN; dynamic? projectNameN;
String? qR; String? qR;
String? setupID; String? setupID;
// List<String>? speciality; List<String>? speciality;
int? status; int? status;
String? statusDesc; String? statusDesc;
String? strOrderDate; String? strOrderDate;
@ -98,7 +98,7 @@ class PatientLabOrdersResponseModel {
this.projectNameN, this.projectNameN,
this.qR, this.qR,
this.setupID, this.setupID,
// this.speciality, this.speciality,
this.status, this.status,
this.statusDesc, this.statusDesc,
this.strOrderDate, this.strOrderDate,
@ -151,7 +151,7 @@ class PatientLabOrdersResponseModel {
projectNameN = json['ProjectNameN']; projectNameN = json['ProjectNameN'];
qR = json['QR']; qR = json['QR'];
setupID = json['SetupID']; setupID = json['SetupID'];
// speciality = json['Speciality'].cast<String>(); speciality = json['Speciality'] != null ? List<String>.from(json['Speciality']) : null;
status = json['Status']; status = json['Status'];
statusDesc = json['StatusDesc']; statusDesc = json['StatusDesc'];
strOrderDate = json['StrOrderDate']; strOrderDate = json['StrOrderDate'];
@ -211,7 +211,7 @@ class PatientLabOrdersResponseModel {
data['ProjectNameN'] = this.projectNameN; data['ProjectNameN'] = this.projectNameN;
data['QR'] = this.qR; data['QR'] = this.qR;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
// data['Speciality'] = this.speciality; data['Speciality'] = this.speciality;
data['Status'] = this.status; data['Status'] = this.status;
data['StatusDesc'] = this.statusDesc; data['StatusDesc'] = this.statusDesc;
data['StrOrderDate'] = this.strOrderDate; data['StrOrderDate'] = this.strOrderDate;

@ -36,7 +36,7 @@ class PatientPrescriptionsResponseModel {
int? noOfPatientsRate; int? noOfPatientsRate;
String? qR; String? qR;
// List<String>? speciality; List<String>? speciality;
String? strAppointmentDate; String? strAppointmentDate;
PatientPrescriptionsResponseModel( PatientPrescriptionsResponseModel(
@ -76,7 +76,7 @@ class PatientPrescriptionsResponseModel {
this.nationalityFlagURL, this.nationalityFlagURL,
this.noOfPatientsRate, this.noOfPatientsRate,
this.qR, this.qR,
// this.speciality, this.speciality,
this.strAppointmentDate}); this.strAppointmentDate});
PatientPrescriptionsResponseModel.fromJson(Map<String, dynamic> json) { PatientPrescriptionsResponseModel.fromJson(Map<String, dynamic> json) {
@ -116,7 +116,7 @@ class PatientPrescriptionsResponseModel {
nationalityFlagURL = json['NationalityFlagURL']; nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate']; noOfPatientsRate = json['NoOfPatientsRate'];
qR = json['QR']; qR = json['QR'];
// speciality = json['Speciality'].cast<String>(); speciality = json['Speciality'] != null ? List<String>.from(json['Speciality']) : null;
strAppointmentDate = json['StrAppointmentDate']; strAppointmentDate = json['StrAppointmentDate'];
} }
@ -158,7 +158,7 @@ class PatientPrescriptionsResponseModel {
data['NationalityFlagURL'] = this.nationalityFlagURL; data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NoOfPatientsRate'] = this.noOfPatientsRate; data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['QR'] = this.qR; data['QR'] = this.qR;
// data['Speciality'] = this.speciality; data['Speciality'] = this.speciality;
data['StrAppointmentDate'] = this.strAppointmentDate; data['StrAppointmentDate'] = this.strAppointmentDate;
return data; return data;
} }

@ -1,17 +1,13 @@
class PrescriptionAnalysisResponse { class PrescriptionAnalysisResponse {
String? prescriptionSummary; String? prescriptionSummary;
List<MedicineAnalysis>? medicinesAnalysis; List<MedicineAnalysis>? medicinesAnalysis;
List<String>? importantWarnings; List<String>? importantNotes;
List<String>? medicineInteractions;
String? followUpNeeded;
int? languageId; int? languageId;
PrescriptionAnalysisResponse({ PrescriptionAnalysisResponse({
this.prescriptionSummary, this.prescriptionSummary,
this.medicinesAnalysis, this.medicinesAnalysis,
this.importantWarnings, this.importantNotes,
this.medicineInteractions,
this.followUpNeeded,
this.languageId, this.languageId,
}); });
@ -23,9 +19,7 @@ class PrescriptionAnalysisResponse {
medicinesAnalysis!.add(MedicineAnalysis.fromJson(v)); medicinesAnalysis!.add(MedicineAnalysis.fromJson(v));
}); });
} }
importantWarnings = json['important_warnings'] != null ? json['important_warnings'].cast<String>() : []; importantNotes = json['important_notes'] != null ? json['important_notes'].cast<String>() : [];
medicineInteractions = json['medicine_interactions'] != null ? json['medicine_interactions'].cast<String>() : [];
followUpNeeded = json['follow_up_needed'];
languageId = json['language_id']; languageId = json['language_id'];
} }
@ -35,9 +29,7 @@ class PrescriptionAnalysisResponse {
if (medicinesAnalysis != null) { if (medicinesAnalysis != null) {
data['medicines_analysis'] = medicinesAnalysis!.map((v) => v.toJson()).toList(); data['medicines_analysis'] = medicinesAnalysis!.map((v) => v.toJson()).toList();
} }
data['important_warnings'] = importantWarnings; data['important_notes'] = importantNotes;
data['medicine_interactions'] = medicineInteractions;
data['follow_up_needed'] = followUpNeeded;
data['language_id'] = languageId; data['language_id'] = languageId;
return data; return data;
} }
@ -46,23 +38,20 @@ class PrescriptionAnalysisResponse {
class MedicineAnalysis { class MedicineAnalysis {
String? medicineName; String? medicineName;
String? benefit; String? benefit;
List<String>? commonSideEffects; List<String>? allergyReactions;
List<String>? seriousWarnings;
String? storage; String? storage;
MedicineAnalysis({ MedicineAnalysis({
this.medicineName, this.medicineName,
this.benefit, this.benefit,
this.commonSideEffects, this.allergyReactions,
this.seriousWarnings,
this.storage, this.storage,
}); });
MedicineAnalysis.fromJson(Map<String, dynamic> json) { MedicineAnalysis.fromJson(Map<String, dynamic> json) {
medicineName = json['medicine_name']; medicineName = json['medicine_name'];
benefit = json['benefit']; benefit = json['benefit'];
commonSideEffects = json['common_side_effects'] != null ? json['common_side_effects'].cast<String>() : []; allergyReactions = json['allergy_reactions'] != null ? json['allergy_reactions'].cast<String>() : [];
seriousWarnings = json['serious_warnings'] != null ? json['serious_warnings'].cast<String>() : [];
storage = json['storage']; storage = json['storage'];
} }
@ -70,8 +59,7 @@ class MedicineAnalysis {
final Map<String, dynamic> data = <String, dynamic>{}; final Map<String, dynamic> data = <String, dynamic>{};
data['medicine_name'] = medicineName; data['medicine_name'] = medicineName;
data['benefit'] = benefit; data['benefit'] = benefit;
data['common_side_effects'] = commonSideEffects; data['allergy_reactions'] = allergyReactions;
data['serious_warnings'] = seriousWarnings;
data['storage'] = storage; data['storage'] = storage;
return data; return data;
} }

@ -334,7 +334,7 @@ class PrescriptionsRepoImp implements PrescriptionsRepo {
'X-API-KEY': '9d9d2ac4c1fc302299dbb0fbb1b7fea1', 'X-API-KEY': '9d9d2ac4c1fc302299dbb0fbb1b7fea1',
'accept': 'application/json', 'accept': 'application/json',
}, },
body: {"medicines": payload, "language_id": langId}, body: payload,
onFailure: (error, statusCode, {messageStatus, failureType}) { onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType; failure = failureType;
}, },

@ -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/dependencies.dart';
import 'package:hmg_patient_app_new/core/location_util.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/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/GeocodeResponse.dart';
import 'package:hmg_patient_app_new/features/location/location_view_model.dart'; import 'package:hmg_patient_app_new/features/location/location_view_model.dart';
import 'package:hmg_patient_app_new/core/dependencies.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}); PrescriptionsViewModel({required this.prescriptionsRepo, required this.errorHandlerService, required this.navServices});
initPrescriptionsViewModel() { initPrescriptionsViewModel() {
isPrescriptionsDataNeedsReloading = true; // todo remove this
if (isPrescriptionsDataNeedsReloading) { if (isPrescriptionsDataNeedsReloading) {
patientPrescriptionOrders.clear(); patientPrescriptionOrders.clear();
patientPrescriptionOrdersByClinic.clear(); patientPrescriptionOrdersByClinic.clear();
@ -413,6 +415,8 @@ class PrescriptionsViewModel extends ChangeNotifier {
required int langId, required int langId,
required String loadingText, required String loadingText,
required Function(dynamic) onNavigate, required Function(dynamic) onNavigate,
required PatientPrescriptionsResponseModel prescriptionResponseModel,
required List<GetAllergiesResponseModel> allergies,
}) async { }) async {
LoaderBottomSheet.showLoader( LoaderBottomSheet.showLoader(
loadingText: loadingText, loadingText: loadingText,
@ -424,6 +428,7 @@ class PrescriptionsViewModel extends ChangeNotifier {
// Prepare medicines payload // Prepare medicines payload
List<Map<String, dynamic>> medicines = []; List<Map<String, dynamic>> medicines = [];
List<Map<String, dynamic>> allergiesForanalysis = [];
for (var prescription in prescriptions) { for (var prescription in prescriptions) {
if (prescription.itemDescription != null && prescription.itemDescription!.isNotEmpty) { if (prescription.itemDescription != null && prescription.itemDescription!.isNotEmpty) {
medicines.add({ 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( final result = await prescriptionsRepo.getPrescriptionAiAnalysis(
payload: medicines, payload: payload,
langId: langId, langId: langId,
); );

@ -56,6 +56,7 @@ class PatientRadiologyResponseModel {
bool? isCVI; bool? isCVI;
bool? isRadMedicalReport; bool? isRadMedicalReport;
dynamic vida3Id; dynamic vida3Id;
List<String>? speciality;
PatientRadiologyResponseModel( PatientRadiologyResponseModel(
{this.setupID, {this.setupID,
@ -112,7 +113,9 @@ class PatientRadiologyResponseModel {
this.strOrderDate, this.strOrderDate,
this.isCVI, this.isCVI,
this.isRadMedicalReport, this.isRadMedicalReport,
this.vida3Id}); this.vida3Id,
this.speciality,
});
PatientRadiologyResponseModel.fromJson(Map<String, dynamic> json) { PatientRadiologyResponseModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];
@ -170,6 +173,7 @@ class PatientRadiologyResponseModel {
isCVI = json['isCVI']; isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport']; isRadMedicalReport = json['isRadMedicalReport'];
vida3Id = json['vida3Id']; vida3Id = json['vida3Id'];
speciality = json['Speciality'] != null ? List<String>.from(json['Speciality']) : [];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -229,6 +233,7 @@ class PatientRadiologyResponseModel {
data['isCVI'] = this.isCVI; data['isCVI'] = this.isCVI;
data['isRadMedicalReport'] = this.isRadMedicalReport; data['isRadMedicalReport'] = this.isRadMedicalReport;
data['vida3Id'] = this.vida3Id; data['vida3Id'] = this.vida3Id;
data['Speciality'] = this.speciality;
return data; return data;
} }
} }

@ -5,7 +5,6 @@ class RadiologyAiAnalysisResponse {
String? labResults; String? labResults;
String? aiPredictions; String? aiPredictions;
String? riskFactors; String? riskFactors;
String? prevention;
int? languageId; int? languageId;
RadiologyAiAnalysisResponse({ RadiologyAiAnalysisResponse({
@ -13,7 +12,6 @@ class RadiologyAiAnalysisResponse {
this.labResults, this.labResults,
this.aiPredictions, this.aiPredictions,
this.riskFactors, this.riskFactors,
this.prevention,
this.languageId, this.languageId,
}); });
@ -26,7 +24,6 @@ class RadiologyAiAnalysisResponse {
labResults: json["lab_results"], labResults: json["lab_results"],
aiPredictions: json["ai_predictions"], aiPredictions: json["ai_predictions"],
riskFactors: json["riskFactors"], riskFactors: json["riskFactors"],
prevention: json["prevention"],
languageId: json["language_id"], languageId: json["language_id"],
); );
@ -35,7 +32,6 @@ class RadiologyAiAnalysisResponse {
"lab_results": labResults, "lab_results": labResults,
"ai_predictions": aiPredictions, "ai_predictions": aiPredictions,
"riskFactors": riskFactors, "riskFactors": riskFactors,
"prevention": prevention,
"language_id": languageId, "language_id": languageId,
}; };
} }

@ -19,7 +19,7 @@ abstract class RadiologyRepo {
Future<Either<Failure, GenericApiModel<List<PatientRadiologyResponseModel>>>> getPatientRadiologyOrderByAppointment({required num appointmentNo, required num projectID}); Future<Either<Failure, GenericApiModel<List<PatientRadiologyResponseModel>>>> getPatientRadiologyOrderByAppointment({required num appointmentNo, required num projectID});
Future<Either<Failure, GenericApiModel<RadiologyAiAnalysisResponse>>> getRadiologyAiAnalysis({required String reportData, required int langId,}); Future<Either<Failure, GenericApiModel<RadiologyAiAnalysisResponse>>> getRadiologyAiAnalysis({required PatientRadiologyResponseModel radiologyData, required int langId,});
} }
class RadiologyRepoImp implements RadiologyRepo { class RadiologyRepoImp implements RadiologyRepo {
@ -238,10 +238,12 @@ class RadiologyRepoImp implements RadiologyRepo {
} }
@override @override
Future<Either<Failure, GenericApiModel<RadiologyAiAnalysisResponse>>> getRadiologyAiAnalysis({required String reportData, required int langId}) async { Future<Either<Failure, GenericApiModel<RadiologyAiAnalysisResponse>>> getRadiologyAiAnalysis({required PatientRadiologyResponseModel radiologyData, required int langId}) async {
Map<String, dynamic> payload = { Map<String, dynamic> payload = {
"text": reportData, "text": radiologyData.reportData ?? "",
"language_id": langId "language_id": langId,
"clinic_name": radiologyData.clinicDescription ?? "",
"specialty_name":radiologyData.speciality?.toString().replaceAll("[", "").replaceAll("]", "") ?? ""
}; };
try { try {

@ -229,7 +229,7 @@ class RadiologyViewModel extends ChangeNotifier {
} }
Future<void> getRadiologyAiAnalysis({required String reportData, required String loadingText, required int langId}) async { Future<void> getRadiologyAiAnalysis({required PatientRadiologyResponseModel radiologyData, required String loadingText, required int langId}) async {
LoaderBottomSheet.showLoader( LoaderBottomSheet.showLoader(
loadingText: loadingText, loadingText: loadingText,
showCloseButton: true, 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( result.fold(
(failure) async { (failure) async {

@ -2039,5 +2039,7 @@ abstract class LocaleKeys {
static const unread = 'unread'; static const unread = 'unread';
static const read = 'read'; static const read = 'read';
static const pendingMedicalReportRequest = 'pendingMedicalReportRequest'; static const pendingMedicalReportRequest = 'pendingMedicalReportRequest';
static const viewAttachment = 'viewAttachment';
static const AllergyReactions = 'AllergyReactions';
} }

@ -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/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/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/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/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/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/utils/appointment_type.dart'; import 'package:hmg_patient_app_new/features/my_appointments/utils/appointment_type.dart';
@ -835,7 +836,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: PrescriptionDetailPage( page: PrescriptionDetailPage(
isFromAppointments: true, prescriptionsResponseModel: patientPrescriptionsResponseModel), isFromAppointments: true, prescriptionsResponseModel: patientPrescriptionsResponseModel,
allergies: Provider.of<MedicalFileViewModel>(context, listen: false).patientAllergiesList,
),
), ),
); );
} else { } else {

@ -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/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/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/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/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_appointment_history_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_queue_details_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/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/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/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/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/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/appointment_queue_page.dart';
import 'package:hmg_patient_app_new/presentation/appointments/my_appointments_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/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/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/book_appointment_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/immediate_livecare_pending_request_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<LandingPage> {
late EmergencyServicesViewModel emergencyServicesViewModel; late EmergencyServicesViewModel emergencyServicesViewModel;
late TodoSectionViewModel todoSectionViewModel; late TodoSectionViewModel todoSectionViewModel;
late NotificationsViewModel notificationsViewModel; late NotificationsViewModel notificationsViewModel;
late MedicalFileViewModel medicalFileViewModel;
final SwiperController _controller = SwiperController(); final SwiperController _controller = SwiperController();
@ -166,6 +170,7 @@ class _LandingPageState extends State<LandingPage> {
emergencyServicesViewModel.checkPatientERAdvanceBalance(); emergencyServicesViewModel.checkPatientERAdvanceBalance();
// myAppointmentsViewModel.getPatientAppointmentQueueDetails(); // myAppointmentsViewModel.getPatientAppointmentQueueDetails();
notificationsViewModel.initNotificationsViewModel(); notificationsViewModel.initNotificationsViewModel();
medicalFileViewModel.getPatientAllergiesList();
if (Utils.havePrivilege(122)) { if (Utils.havePrivilege(122)) {
insuranceViewModel.initInsuranceProvider(isFromHomePage: true); insuranceViewModel.initInsuranceProvider(isFromHomePage: true);
@ -217,6 +222,7 @@ class _LandingPageState extends State<LandingPage> {
emergencyServicesViewModel = Provider.of<EmergencyServicesViewModel>(context, listen: false); emergencyServicesViewModel = Provider.of<EmergencyServicesViewModel>(context, listen: false);
todoSectionViewModel = Provider.of<TodoSectionViewModel>(context, listen: false); todoSectionViewModel = Provider.of<TodoSectionViewModel>(context, listen: false);
notificationsViewModel = Provider.of<NotificationsViewModel>(context, listen: false); notificationsViewModel = Provider.of<NotificationsViewModel>(context, listen: false);
medicalFileViewModel = Provider.of<MedicalFileViewModel>(context, listen: false);
appState = getIt.get<AppState>(); appState = getIt.get<AppState>();
return PopScope( return PopScope(
canPop: false, canPop: false,
@ -283,7 +289,7 @@ class _LandingPageState extends State<LandingPage> {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel(); myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false, isForTimeLine: true); myAppointmentsViewModel.getPatientAppointments(true, false, isForTimeLine: true);
medicalFileViewModel.getPatientAllergiesList();
// Refresh Appointments Data // Refresh Appointments Data
// habibWalletVM.initHabibWalletProvider(); // habibWalletVM.initHabibWalletProvider();
// habibWalletVM.getPatientBalanceAmount(); // habibWalletVM.getPatientBalanceAmount();

@ -51,7 +51,7 @@ class AiAnalysisWidget extends StatelessWidget {
if (data.summary != null && data.summary!.isNotEmpty) ...[ if (data.summary != null && data.summary!.isNotEmpty) ...[
LocaleKeys.suggestion.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor), LocaleKeys.suggestion.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor),
SizedBox(height: 8.h), SizedBox(height: 8.h),
data.summary!.toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400), data.summary!.toText14Markdown(),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Divider(color: AppColors.dividerColor, thickness: 1), Divider(color: AppColors.dividerColor, thickness: 1),
SizedBox(height: 16.h), SizedBox(height: 16.h),
@ -64,12 +64,6 @@ class AiAnalysisWidget extends StatelessWidget {
Divider(color: AppColors.dividerColor, thickness: 1), Divider(color: AppColors.dividerColor, thickness: 1),
SizedBox(height: 16.h), 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( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [

@ -55,7 +55,7 @@ class _LabAiAnalysisDetailedPageState extends State<LabAiAnalysisDetailedPage> {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, side: BorderSide(width: 1, color: Color(0xFF0B85F7))), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, side: BorderSide(width: 1, color: Color(0xFF0B85F7))),
padding: EdgeInsets.all(16.r), 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), SizedBox(height: 8.h),
], ],
@ -109,54 +109,54 @@ class _LabAiAnalysisDetailedPageState extends State<LabAiAnalysisDetailedPage> {
); );
} }
// AI Recommendations Section // // AI Recommendations Section
if (analysis.aiRecommendations != null && analysis.aiRecommendations!.isNotEmpty) { // if (analysis.aiRecommendations != null && analysis.aiRecommendations!.isNotEmpty) {
expandableItems.add( // expandableItems.add(
ExpandableListItem( // ExpandableListItem(
backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
expandedBackgroundColor:Colors.transparent , // expandedBackgroundColor:Colors.transparent ,
title: LocaleKeys.suggestions.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), // title: LocaleKeys.suggestions.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor),
children: [ // children: [
SizedBox(height: 10.h), // SizedBox(height: 10.h),
Container( // Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r), // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r),
padding: EdgeInsets.all(16.r), // padding: EdgeInsets.all(16.r),
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: analysis.aiRecommendations!.asMap().entries.map((entry) { // children: analysis.aiRecommendations!.asMap().entries.map((entry) {
final rec = entry.value; // final rec = entry.value;
final isLast = entry.key == analysis.aiRecommendations!.length - 1; // final isLast = entry.key == analysis.aiRecommendations!.length - 1;
return Column( // return Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
if (rec.priority != null) ...[ // if (rec.priority != null) ...[
Container( // Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), // padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
decoration: BoxDecoration(color: _getPriorityColor(rec.priority), borderRadius: BorderRadius.circular(4.r)), // decoration: BoxDecoration(color: _getPriorityColor(rec.priority), borderRadius: BorderRadius.circular(4.r)),
child: rec.priority!.toText12(isBold: true, color: _getPriorityTextColor(rec.priority)), // child: rec.priority!.toText12(isBold: true, color: _getPriorityTextColor(rec.priority)),
), // ),
SizedBox(height: 8.h), // SizedBox(height: 8.h),
], // ],
(rec.recommendation ?? "").toText14( // (rec.recommendation ?? "").toText14(
color: AppColors.textColorLight, // color: AppColors.textColorLight,
height: 1.5, // height: 1.5,
weight: FontWeight.w400, // weight: FontWeight.w400,
), // ),
if (!isLast) ...[ // if (!isLast) ...[
SizedBox(height: 12.h), // SizedBox(height: 12.h),
Divider(color: AppColors.dividerColor, thickness: 1), // Divider(color: AppColors.dividerColor, thickness: 1),
SizedBox(height: 12.h), // SizedBox(height: 12.h),
], // ],
], // ],
); // );
}).toList(), // }).toList(),
), // ),
), // ),
SizedBox(height: 8.h), // SizedBox(height: 8.h),
], // ],
), // ),
); // );
} // }
// Risk Factors Section // Risk Factors Section
if (analysis.riskFactors != null && analysis.riskFactors!.isNotEmpty) { if (analysis.riskFactors != null && analysis.riskFactors!.isNotEmpty) {
@ -229,28 +229,28 @@ class _LabAiAnalysisDetailedPageState extends State<LabAiAnalysisDetailedPage> {
); );
} }
// Prevention Section // // Prevention Section
if (analysis.prevention != null && analysis.prevention!.isNotEmpty) { // if (analysis.prevention != null && analysis.prevention!.isNotEmpty) {
expandableItems.add( // expandableItems.add(
ExpandableListItem( // ExpandableListItem(
backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
expandedBackgroundColor:Colors.transparent , // expandedBackgroundColor:Colors.transparent ,
title: LocaleKeys.prevention.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), // title: LocaleKeys.prevention.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor),
children: [ // children: [
SizedBox(height: 10.h), // SizedBox(height: 10.h),
Container( // Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, side: BorderSide(width: 1, color: Color(0xFF18C273))), // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, side: BorderSide(width: 1, color: Color(0xFF18C273))),
padding: EdgeInsets.all(16.r), // padding: EdgeInsets.all(16.r),
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: analysis.prevention!.map((prevention) => _buildBulletItem(prevention)).toList(), // children: analysis.prevention!.map((prevention) => _buildBulletItem(prevention)).toList(),
), // ),
), // ),
SizedBox(height: 8.h), // SizedBox(height: 8.h),
], // ],
), // ),
); // );
} // }
// // Suggested Doctors Section // // Suggested Doctors Section
// if (analysis.suggestedDoctors != null && analysis.suggestedDoctors!.isNotEmpty) { // if (analysis.suggestedDoctors != null && analysis.suggestedDoctors!.isNotEmpty) {

@ -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 'package:provider/provider.dart' show Consumer, Provider, ReadContext, Selector;
import '../../../core/common_models/data_points.dart'; 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 '../../../widgets/common_bottom_sheet.dart' show showCommonBottomSheetWithoutHeight;
import 'dart:ui' as ui; import 'dart:ui' as ui;
class LabResultDetails extends StatefulWidget { class LabResultDetails extends StatefulWidget {
final LabResult recentLabResult; final LabResult recentLabResult;
final String? testDescription; 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 @override
State<LabResultDetails> createState() => _LabResultDetailsState(); State<LabResultDetails> createState() => _LabResultDetailsState();
@ -197,7 +199,7 @@ class _LabResultDetailsState extends State<LabResultDetails> {
onOkPressed: () { onOkPressed: () {
context.pop(); context.pop();
labViewModel.getAiOverviewSingleLabResult( 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: () { onCancelPressed: () {
context.pop(); context.pop();

@ -972,7 +972,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
prescriptionVM.setPrescriptionsDetailsLoading(); prescriptionVM.setPrescriptionsDetailsLoading();
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: PrescriptionDetailPage(isFromAppointments: false, prescriptionsResponseModel: prescriptionVM.patientPrescriptionOrders[index]), page: PrescriptionDetailPage(
isFromAppointments: false,
prescriptionsResponseModel: prescriptionVM.patientPrescriptionOrders[index],
allergies: Provider.of<MedicalFileViewModel>(context, listen: false).patientAllergiesList,
),
), ),
); );
}), }),

@ -89,12 +89,12 @@ class _PrescriptionAiAnalysisDetailedPageState extends State<PrescriptionAiAnaly
} }
// Important Warnings Section // Important Warnings Section
if (analysis.importantWarnings != null && analysis.importantWarnings!.isNotEmpty) { if (analysis.importantNotes != null && analysis.importantNotes!.isNotEmpty) {
expandableItems.add( expandableItems.add(
ExpandableListItem( ExpandableListItem(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
expandedBackgroundColor: Colors.transparent, expandedBackgroundColor: Colors.transparent,
title: LocaleKeys.importantWarnings.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), title: LocaleKeys.notes.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor),
children: [ children: [
SizedBox(height: 10.h), SizedBox(height: 10.h),
SizedBox( SizedBox(
@ -108,14 +108,12 @@ class _PrescriptionAiAnalysisDetailedPageState extends State<PrescriptionAiAnaly
padding: EdgeInsets.all(16.r), padding: EdgeInsets.all(16.r),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: analysis.importantWarnings!.map((warning) { children: analysis.importantNotes!.map((warning) {
return Padding( return Padding(
padding: EdgeInsets.only(bottom: 8.h), padding: EdgeInsets.only(bottom: 8.h),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Icon(Icons.warning_amber_rounded, color: Color(0xFFFF5252), size: 18.w),
SizedBox(width: 8.w),
Expanded(child: warning.toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400)), Expanded(child: warning.toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400)),
], ],
), ),
@ -130,73 +128,73 @@ class _PrescriptionAiAnalysisDetailedPageState extends State<PrescriptionAiAnaly
); );
} }
// Medicine Interactions Section // Medicine Interactions Section
if (analysis.medicineInteractions != null && analysis.medicineInteractions!.isNotEmpty) { // if (analysis.medicineInteractions != null && analysis.medicineInteractions!.isNotEmpty) {
expandableItems.add( // expandableItems.add(
ExpandableListItem( // ExpandableListItem(
backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
expandedBackgroundColor: Colors.transparent, // expandedBackgroundColor: Colors.transparent,
title: LocaleKeys.medicineInteractions.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), // title: LocaleKeys.medicineInteractions.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor),
children: [ // children: [
SizedBox(height: 10.h), // SizedBox(height: 10.h),
SizedBox( // SizedBox(
width: double.infinity, // width: double.infinity,
child: Container( // child: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, // color: AppColors.whiteColor,
borderRadius: 12.r, // borderRadius: 12.r,
side: BorderSide(width: 1, color: Color(0xFFFFAF15)), // side: BorderSide(width: 1, color: Color(0xFFFFAF15)),
), // ),
padding: EdgeInsets.all(16.r), // padding: EdgeInsets.all(16.r),
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: analysis.medicineInteractions!.map((interaction) { // children: analysis.medicineInteractions!.map((interaction) {
return Padding( // return Padding(
padding: EdgeInsets.only(bottom: 8.h), // padding: EdgeInsets.only(bottom: 8.h),
child: Row( // child: Row(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Icon(Icons.info_outline, color: Color(0xFFFFAF15), size: 18.w), // Icon(Icons.info_outline, color: Color(0xFFFFAF15), size: 18.w),
SizedBox(width: 8.w), // SizedBox(width: 8.w),
Expanded(child: interaction.toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400)), // Expanded(child: interaction.toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400)),
], // ],
), // ),
); // );
}).toList(), // }).toList(),
), // ),
), // ),
), // ),
SizedBox(height: 8.h), // SizedBox(height: 8.h),
], // ],
), // ),
); // );
} // }
// Follow-up Needed Section // Follow-up Needed Section
if (analysis.followUpNeeded != null && analysis.followUpNeeded!.isNotEmpty) { // if (analysis.followUpNeeded != null && analysis.followUpNeeded!.isNotEmpty) {
expandableItems.add( // expandableItems.add(
ExpandableListItem( // ExpandableListItem(
backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
expandedBackgroundColor: Colors.transparent, // expandedBackgroundColor: Colors.transparent,
title: LocaleKeys.followUpNeeded.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), // title: LocaleKeys.followUpNeeded.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor),
children: [ // children: [
SizedBox(height: 10.h), // SizedBox(height: 10.h),
SizedBox( // SizedBox(
width: double.infinity, // width: double.infinity,
child: Container( // child: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, // color: AppColors.whiteColor,
borderRadius: 12.r, // borderRadius: 12.r,
side: BorderSide(width: 1, color: AppColors.primaryRedColor), // side: BorderSide(width: 1, color: AppColors.primaryRedColor),
), // ),
padding: EdgeInsets.all(16.r), // padding: EdgeInsets.all(16.r),
child: (analysis.followUpNeeded ?? "").toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400), // child: (analysis.followUpNeeded ?? "").toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400),
), // ),
), // ),
SizedBox(height: 8.h), // SizedBox(height: 8.h),
], // ],
), // ),
); // );
} // }
return Column( return Column(
children: [ children: [
@ -263,12 +261,12 @@ class _PrescriptionAiAnalysisDetailedPageState extends State<PrescriptionAiAnaly
], ],
// Common Side Effects // Common Side Effects
if (medicine.commonSideEffects != null && medicine.commonSideEffects!.isNotEmpty) ...[ if (medicine.allergyReactions != null && medicine.allergyReactions!.isNotEmpty) ...[
_buildInfoRow( _buildInfoRow(
icon: Icons.warning_amber_rounded, icon: Icons.warning_amber_rounded,
iconColor: Color(0xFFFFAF15), iconColor: Color(0xFFFFAF15),
title: LocaleKeys.commonSideEffects.tr(context: context), title: LocaleKeys.AllergyReactions.tr(context: context),
content: medicine.commonSideEffects!.join(', '), content: medicine.allergyReactions!.join(', '),
), ),
SizedBox(height: 12.h), SizedBox(height: 12.h),
], ],

@ -12,6 +12,7 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/route_extensions.dart'; import 'package:hmg_patient_app_new/extensions/route_extensions.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.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/extensions/widget_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/prescriptions/models/resp_models/patient_prescriptions_response_model.dart'; import 'package:hmg_patient_app_new/features/prescriptions/models/resp_models/patient_prescriptions_response_model.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_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/generated/locale_keys.g.dart';
@ -32,10 +33,11 @@ import 'package:url_launcher/url_launcher.dart';
import 'dart:ui' as ui; import 'dart:ui' as ui;
class PrescriptionDetailPage extends StatefulWidget { class PrescriptionDetailPage extends StatefulWidget {
PrescriptionDetailPage({super.key, required this.prescriptionsResponseModel, required this.isFromAppointments}); PrescriptionDetailPage({super.key, required this.prescriptionsResponseModel, required this.isFromAppointments, required this.allergies});
PatientPrescriptionsResponseModel prescriptionsResponseModel; PatientPrescriptionsResponseModel prescriptionsResponseModel;
bool isFromAppointments = false; bool isFromAppointments = false;
List<GetAllergiesResponseModel> allergies;
@override @override
State<PrescriptionDetailPage> createState() => _PrescriptionDetailPageState(); State<PrescriptionDetailPage> createState() => _PrescriptionDetailPageState();
@ -318,6 +320,8 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
prescriptionsViewModel.setIsPrescriptionAIAnalysisNeedsToBeShown(true); prescriptionsViewModel.setIsPrescriptionAIAnalysisNeedsToBeShown(true);
prescriptionsViewModel.getPrescriptionAiAnalysis( prescriptionsViewModel.getPrescriptionAiAnalysis(
prescriptions: prescriptionsViewModel.prescriptionDetailsList, prescriptions: prescriptionsViewModel.prescriptionDetailsList,
prescriptionResponseModel: widget.prescriptionsResponseModel,
allergies: widget.allergies,
langId: getIt.get<AppState>().getLanguageID(), langId: getIt.get<AppState>().getLanguageID(),
loadingText: LocaleKeys.loadingAIAnalysisPrescription.tr(context: context), loadingText: LocaleKeys.loadingAIAnalysisPrescription.tr(context: context),
onNavigate: (data) { onNavigate: (data) {

@ -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/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.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/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/features/prescriptions/prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.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'; import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart';
@ -37,6 +38,7 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
int? expandedIndex; int? expandedIndex;
late PrescriptionsViewModel prescriptionsViewModel; late PrescriptionsViewModel prescriptionsViewModel;
late MedicalFileViewModel medicalFileViewModel;
@override @override
void initState() { void initState() {
@ -50,6 +52,7 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
AppState appState = getIt.get<AppState>(); AppState appState = getIt.get<AppState>();
prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false); prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false);
medicalFileViewModel = Provider.of<MedicalFileViewModel>(context, listen: false);
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
@ -243,6 +246,7 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
page: PrescriptionDetailPage( page: PrescriptionDetailPage(
prescriptionsResponseModel: model.patientPrescriptionOrders[index], prescriptionsResponseModel: model.patientPrescriptionOrders[index],
isFromAppointments: false, isFromAppointments: false,
allergies: Provider.of<MedicalFileViewModel>(context, listen: false).patientAllergiesList,
), ),
), ),
); );
@ -550,6 +554,7 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
CustomPageRoute( CustomPageRoute(
page: PrescriptionDetailPage( page: PrescriptionDetailPage(
prescriptionsResponseModel: model.patientPrescriptionOrders[index], prescriptionsResponseModel: model.patientPrescriptionOrders[index],
allergies: medicalFileViewModel.patientAllergiesList,
isFromAppointments: false, isFromAppointments: false,
), ),
), ),

@ -45,7 +45,7 @@ class _RadiologyAiAnalysisDetailedPageState extends State<RadiologyAiAnalysisDet
// Parse string fields into lists // Parse string fields into lists
final predictions = _parseStringToList(analysis.aiPredictions); final predictions = _parseStringToList(analysis.aiPredictions);
final preventions = _parseStringToList(analysis.prevention); // final preventions = _parseStringToList(analysis.prevention);
final riskFactorsText = _parseStringToList(analysis.riskFactors); final riskFactorsText = _parseStringToList(analysis.riskFactors);
// Summary Section // Summary Section
@ -174,32 +174,32 @@ class _RadiologyAiAnalysisDetailedPageState extends State<RadiologyAiAnalysisDet
); );
} }
// Prevention Section // // Prevention Section
if (preventions.isNotEmpty) { // if (preventions.isNotEmpty) {
expandableItems.add( // expandableItems.add(
ExpandableListItem( // ExpandableListItem(
backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
expandedBackgroundColor: Colors.transparent, // expandedBackgroundColor: Colors.transparent,
title: LocaleKeys.prevention.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), // title: LocaleKeys.prevention.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor),
children: [ // children: [
SizedBox(height: 10.h), // SizedBox(height: 10.h),
Container( // Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, // color: AppColors.whiteColor,
borderRadius: 12.r, // borderRadius: 12.r,
side: BorderSide(width: 1, color: Color(0xFF18C273)), // side: BorderSide(width: 1, color: Color(0xFF18C273)),
), // ),
padding: EdgeInsets.all(16.r), // padding: EdgeInsets.all(16.r),
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: preventions.map((prevention) => _buildBulletItem(prevention)).toList(), // children: preventions.map((prevention) => _buildBulletItem(prevention)).toList(),
), // ),
), // ),
SizedBox(height: 8.h), // SizedBox(height: 8.h),
], // ],
), // ),
); // );
} // }
return Column( return Column(
children: [ children: [

@ -27,7 +27,7 @@ class RadiologyAiAnalysisWidget extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
// Parse the string fields into lists // Parse the string fields into lists
final predictions = _parseStringToList(data.aiPredictions); final predictions = _parseStringToList(data.aiPredictions);
final preventions = _parseStringToList(data.prevention); // final preventions = _parseStringToList(data.prevention);
return Container( return Container(
decoration: BoxDecoration(borderRadius: BorderRadius.circular(24.r), gradient: AppColors.aiLinearGradient), decoration: BoxDecoration(borderRadius: BorderRadius.circular(24.r), gradient: AppColors.aiLinearGradient),
@ -69,12 +69,12 @@ class RadiologyAiAnalysisWidget extends StatelessWidget {
Divider(color: AppColors.dividerColor, thickness: 1), Divider(color: AppColors.dividerColor, thickness: 1),
SizedBox(height: 16.h), SizedBox(height: 16.h),
], ],
if (preventions.isNotEmpty) ...[ // if (preventions.isNotEmpty) ...[
LocaleKeys.prevention.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor), // LocaleKeys.prevention.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor),
SizedBox(height: 12.h), // SizedBox(height: 12.h),
...preventions.map((item) => _buildBulletItem(item)), // ...preventions.map((item) => _buildBulletItem(item)),
SizedBox(height: 20.h), // SizedBox(height: 20.h),
], // ],
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [

@ -232,7 +232,7 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
onOkPressed: () { onOkPressed: () {
context.pop(); context.pop();
radiologyViewModel.getRadiologyAiAnalysis( radiologyViewModel.getRadiologyAiAnalysis(
reportData: widget.patientRadiologyResponseModel.reportData ?? "", radiologyData: widget.patientRadiologyResponseModel,
loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context), loadingText: LocaleKeys.loadingAIAnalysis.tr(context: context),
langId: _appState.getLanguageID(), langId: _appState.getLanguageID(),
); );

@ -1404,10 +1404,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.19" version: "0.12.17"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:

@ -116,6 +116,7 @@ dependencies:
cloudflare_turnstile: ^3.7.2 cloudflare_turnstile: ^3.7.2
freerasp: ^8.2.1 freerasp: ^8.2.1
safe_device: ^1.4.1 safe_device: ^1.4.1
flutter_markdown_plus: ^1.0.12
myfatoorah_flutter: ^3.3.2 myfatoorah_flutter: ^3.3.2
dev_dependencies: dev_dependencies:

Loading…
Cancel
Save