generated from StanfordSpezi/SpeziTemplateApplication
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# LLM Filter Data* ## ♻️ Current situation & Problem *Link any open issues or pull requests (PRs) related to this PR. Please ensure that all non-trivial PRs are first tracked and discussed in an existing GitHub issue or discussion.* ## ⚙️ Release Notes *This PR creates a class that filters the data by removing things within "()". It uses and LLM and starts to cut down on filtering by content, but the system prompts need to be more tailored towards filtering the data better. It applies this class to conditions and allergies ## 📚 Documentation *Please ensure that you properly document any additions in conformance to [Spezi Documentation Guide](https://github.com/StanfordSpezi/.github/blob/main/DOCUMENTATIONGUIDE.md).* *You can use this section to describe your solution, but we encourage contributors to document your reasoning and changes using in-line documentation.* ## ✅ Testing *Please ensure that the PR meets the testing requirements set by CodeCov and that new functionality is appropriately tested.* *This section describes important information about the tests and why some elements might not be testable.* ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md). --------- Co-authored-by: nriedman <[email protected]>
- Loading branch information
1 parent
06a8726
commit 105eaf1
Showing
10 changed files
with
354 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// | ||
// ReactionSectionView.swift | ||
// Intake | ||
// | ||
// Created by Akash Gupta on 3/10/24. | ||
// | ||
// This source file is part of the Intake based on the Stanford Spezi Template Application project | ||
// | ||
// SPDX-FileCopyrightText: 2023 Stanford University | ||
// | ||
// SPDX-License-Identifier: MIT | ||
// | ||
|
||
import Foundation | ||
import SpeziFHIR | ||
import SwiftUI | ||
|
||
|
||
struct ReactionSectionView: View { | ||
@Environment(DataStore.self) private var data | ||
var index: Int | ||
|
||
var body: some View { | ||
Form { // Use Form instead of List | ||
Section(header: headerTitle) { | ||
@Bindable var data = data | ||
ForEach($data.allergyData[index].reaction) { $item in | ||
HStack { | ||
TextField("Reactions", text: $item.reaction) | ||
} | ||
} | ||
.onDelete(perform: delete) | ||
Button(action: { | ||
data.allergyData[index].reaction.append(ReactionItem(reaction: "")) | ||
}) { | ||
HStack { | ||
Image(systemName: "plus.circle.fill") | ||
.accessibilityLabel(Text("ADD_REACTION")) | ||
Text("Add Field") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
private var headerTitle: some View { | ||
HStack { | ||
Text("Reactions") | ||
Spacer() | ||
EditButton() | ||
} | ||
} | ||
func delete(at offsets: IndexSet) { | ||
data.allergyData[index].reaction.remove(atOffsets: offsets) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.