Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor Updates to Medications including Scrollable PDF #66

Merged
merged 5 commits into from
Mar 11, 2024
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"originHash" : "cdbe60a3382a8a962c7fcc00210e56e13314cb3e246d0e01fe8e25a1268623d8",
"pins" : [
{
"identity" : "abseil-cpp-binary",
Expand Down Expand Up @@ -379,5 +380,5 @@
}
}
],
"version" : 2
"version" : 3
}
26 changes: 25 additions & 1 deletion Intake/Medication View/IntakeMedicationViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,31 @@
IntakeMedication(
localizedDescription: "NDA020800 0.3 ML Epinephrine 1 MG/ML Auto-Injector",
dosages: [
IntakeDosage(localizedDescription: "0.3ML / 1 MG/ML")
IntakeDosage(localizedDescription: "0.3 ML/1 MG/ML")
]
),
IntakeMedication(
localizedDescription: "Clopidogrel 75 MG Oral Tablet",
dosages: [
IntakeDosage(localizedDescription: "75 MG")
]
),
IntakeMedication(
localizedDescription: "Verapamil Hydrochloride 40 MG",
dosages: [
IntakeDosage(localizedDescription: "40 MG")
]
),
IntakeMedication(
localizedDescription: "Simvastatin 20 MG Oral Tablet",
dosages: [
IntakeDosage(localizedDescription: "20 MG")
]
),
IntakeMedication(
localizedDescription: "amLODIPine 2.5 MG Oral Tablet",
dosages: [
IntakeDosage(localizedDescription: "2.5 MG")

Check warning on line 96 in Intake/Medication View/IntakeMedicationViewModel.swift

View check run for this annotation

Codecov / codecov/patch

Intake/Medication View/IntakeMedicationViewModel.swift#L72-L96

Added lines #L72 - L96 were not covered by tests
]
)
]
Expand Down
2 changes: 1 addition & 1 deletion Intake/Medication View/MedicationContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
data.medicationData = medicationSettingsViewModel.medicationInstances
navigationPath.path.append(NavigationViews.allergies)
}
.navigationTitle("Medication Settings")
.navigationTitle("Medications")

Check warning on line 35 in Intake/Medication View/MedicationContentView.swift

View check run for this annotation

Codecov / codecov/patch

Intake/Medication View/MedicationContentView.swift#L35

Added line #L35 was not covered by tests
.navigationBarItems(trailing: NavigationLink(destination: MedicationLLMAssistant(presentingAccount: .constant(false))) {
Text("Chat")
})
Expand Down
13 changes: 10 additions & 3 deletions Intake/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
},
"%.2f" : {

},
"%@ - %@" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "%1$@ - %2$@"
}
}
}
},
"%@ Reactions" : {

Expand Down Expand Up @@ -404,9 +414,6 @@
},
"Medical Intake Form" : {

},
"Medication Settings" : {

},
"Medications" : {

Expand Down
12 changes: 10 additions & 2 deletions Intake/ScrollablePDF.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,17 @@
@Environment(NavigationPathWrapper.self) private var navigationPath

var body: some View {
let medicationData = data.medicationData

Check warning on line 96 in Intake/ScrollablePDF.swift

View check run for this annotation

Codecov / codecov/patch

Intake/ScrollablePDF.swift#L96

Added line #L96 was not covered by tests
Section(header: HeaderTitle(title: "Medications", nextView: NavigationViews.medication)) {
VStack(alignment: .leading) {
Text("fix medication")
ForEach(Array(medicationData), id: \.self) { medicationInstance in
List {
VStack(alignment: .leading, spacing: 0) {
Text(medicationInstance.type.localizedDescription)
.font(.headline)
Text("\(medicationInstance.dosage.localizedDescription) - \(medicationInstance.schedule.frequency.description)")
.font(.subheadline)
}
}

Check warning on line 106 in Intake/ScrollablePDF.swift

View check run for this annotation

Codecov / codecov/patch

Intake/ScrollablePDF.swift#L98-L106

Added lines #L98 - L106 were not covered by tests
}
}
}
Expand Down
Loading