Skip to content

Commit

Permalink
Merge branch 'main' into LLMFilterData
Browse files Browse the repository at this point in the history
  • Loading branch information
nriedman authored Mar 11, 2024
2 parents 5d81f35 + 081ea98 commit c91620f
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 8 deletions.
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 @@ class IntakeMedicationSettingsViewModel: Module, MedicationSettingsViewModel, Cu
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")
]
)
]
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 @@ struct MedicationContentView: View {
data.medicationData = medicationSettingsViewModel.medicationInstances
navigationPath.path.append(NavigationViews.allergies)
}
.navigationTitle("Medication Settings")
.navigationTitle("Medications")
.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 @@ struct ScrollablePDF: View {
@Environment(NavigationPathWrapper.self) private var navigationPath

var body: some View {
let medicationData = data.medicationData
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)
}
}
}
}
}
Expand Down

0 comments on commit c91620f

Please sign in to comment.