Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--mode study:edu.stanford.LLMonFHIR.spineAI"
argument = "--mode study:edu.stanford.LLMonFHIR.pedCardioStudy"
isEnabled = "NO">
</CommandLineArgument>
Comment thread
lukaskollmer marked this conversation as resolved.
</CommandLineArguments>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ extension QuestionnaireResponses.ImageAnnotation {
let pipelineExplanation = """
You operate as part of an image analysis pipeline, where an image annotated by a user is interpreted using an LLM.
The user was presented an image, in an iOS app, and asked to draw onto the image, to annotate (highlight) regions where a certain condition is true
(e.g. "mark all areas where you feel pain in red").
(e.g., "mark all areas where you feel pain in red").

The pipeline is as follows:
1. Base image description:
Expand All @@ -173,7 +173,6 @@ extension QuestionnaireResponses.ImageAnnotation {
- the output from step 2 (the textual description of the annotated/highlighted image)
- the user's question
- output: a response to the user's question, taking into account the context generated by step 2, and other context passed along.

"""
let baseImageExplanation: String = try await runner.oneShot(with: schema, context: [
LLMContextEntity(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct UserStudyChatToolbar: ToolbarContent {
Button("No", role: .cancel) {}
},
message: {
Text("Do you want to continue?")
Text("Do you want to leave the chat?")
}
)
}
Expand Down
2 changes: 1 addition & 1 deletion LLMonFHIR/Helper/BottomSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct BottomSheet<Content: View>: View {
ScrollView {
content
.onHeightChange {
height = $0 + 50
height = $0 + 100
Comment thread
lukaskollmer marked this conversation as resolved.
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions LLMonFHIR/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,11 @@
"comment" : "A button label that dismisses an onboarding hint.",
"isCommentAutoGenerated" : true
},
"Do you want to continue?" : {
"comment" : "A message displayed in a confirmation dialog when the user taps the \"Continue\" button in the toolbar.",
"isCommentAutoGenerated" : true
},
"Do you want to end the chat and complete your participation in the study?" : {

},
"Do you want to leave the chat?" : {

},
"Documents" : {
"comment" : "A label displayed above the user's documents.",
Expand Down
9 changes: 9 additions & 0 deletions LLMonFHIR/Supporting Files/UserStudyConfig.plist
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@
<key>reportEmail</key>
<string></string>
</dict>
<key>edu.stanford.LLMonFHIR.pedCardioStudy</key>
<dict>
<key>openAIAPIKey</key>
<string></string>
<key>openAIEndpoint</key>
<string>firebase-function:chat</string>
<key>reportEmail</key>
<string></string>
</dict>
</dict>
</dict>
</plist>
4 changes: 3 additions & 1 deletion LLMonFHIRShared/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ let package = Package(
.package(url: "https://github.com/StanfordSpezi/SpeziFoundation.git", from: "2.7.2"),
.package(url: "https://github.com/apple/FHIRModels.git", .upToNextMajor(from: "0.7.0")),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.7.0"),
.package(url: "https://github.com/apple/swift-algorithms.git", from: "1.2.1"),
.package(url: "https://github.com/StanfordSpezi/SpeziLLM.git", from: "0.13.8"),
.package(url: "https://github.com/StanfordSpezi/SpeziStorage.git", from: "2.1.4"),
.package(url: "https://github.com/StanfordSpezi/SpeziFHIR.git", from: "0.10.0")
Expand All @@ -39,7 +40,8 @@ let package = Package(
.product(name: "SpeziLLM", package: "SpeziLLM"),
.product(name: "SpeziLLMOpenAI", package: "SpeziLLM"),
.product(name: "SpeziLocalStorage", package: "SpeziStorage"),
.product(name: "SpeziFHIR", package: "SpeziFHIR")
.product(name: "SpeziFHIR", package: "SpeziFHIR"),
.product(name: "Algorithms", package: "swift-algorithms")
],
resources: [
.copy("Resources/Synthetic Patients")
Expand Down
4 changes: 2 additions & 2 deletions LLMonFHIRShared/Sources/LLMonFHIRShared/ResourceBundle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extension ModelsR4.Bundle {
do {
bundle = try JSONDecoder().decode(ModelsR4.Bundle.self, from: Data(contentsOf: url))
} catch {
Self.logger.warning("Skipping FHIR bundle at \(url.path) (unable to decode): \(error)")
print("Skipping FHIR bundle at \(url.path) (unable to decode): \(error)")
Comment thread
lukaskollmer marked this conversation as resolved.
continue
}
if let patientName = bundle.singlePatient?.fullName {
Expand All @@ -87,7 +87,7 @@ extension ModelsR4.Bundle {
}
}
for (name, urls) in allBundlesByPatientName where urls.count > 1 {
Self.logger.warning("Found multiple FHIR bundles with same patient name '\(name)':\n\(urls.map { "- \($0.path)" }.joined(separator: "\n"))")
print("Found multiple FHIR bundles with same patient name '\(name)':\n\(urls.map { "- \($0.path)" }.joined(separator: "\n"))")
}
}
}
Expand Down
Loading
Loading