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

Adding scrollable pdf #55

Merged
merged 12 commits into from
Mar 8, 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
17 changes: 17 additions & 0 deletions Intake.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
5A2B9FBC2B6C7B29005CA63F /* ReactionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A2B9FBB2B6C7B29005CA63F /* ReactionView.swift */; };
5AEA5F212B82DDD000F1577A /* LLMAssistantView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AEA5F202B82DDD000F1577A /* LLMAssistantView.swift */; };
5AEA5F2C2B8680F300F1577A /* AddAllergy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AEA5F2B2B8680F300F1577A /* AddAllergy.swift */; };
5AEA5F3B2B90081B00F1577A /* ScrollablePDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AEA5F3A2B90081B00F1577A /* ScrollablePDF.swift */; };
5AEA5F422B90710B00F1577A /* EditPatient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AEA5F412B90710B00F1577A /* EditPatient.swift */; };
5AEA5F472B93034A00F1577A /* ReactionPDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AEA5F462B93034A00F1577A /* ReactionPDF.swift */; };
5AEA5F4A2B96F63A00F1577A /* AllergyLLMAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AEA5F492B96F63A00F1577A /* AllergyLLMAssistant.swift */; };
637BE1D52B572B4800EA19C6 /* Questionnaire.json.license in Resources */ = {isa = PBXBuildFile; fileRef = 637BE1D42B572B4800EA19C6 /* Questionnaire.json.license */; };
653A2551283387FE005D4D48 /* Intake.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653A2550283387FE005D4D48 /* Intake.swift */; };
653A255528338800005D4D48 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 653A255428338800005D4D48 /* Assets.xcassets */; };
Expand Down Expand Up @@ -208,6 +212,10 @@
5A2B9FBB2B6C7B29005CA63F /* ReactionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReactionView.swift; sourceTree = "<group>"; };
5AEA5F202B82DDD000F1577A /* LLMAssistantView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LLMAssistantView.swift; sourceTree = "<group>"; };
5AEA5F2B2B8680F300F1577A /* AddAllergy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAllergy.swift; sourceTree = "<group>"; };
5AEA5F3A2B90081B00F1577A /* ScrollablePDF.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollablePDF.swift; sourceTree = "<group>"; };
5AEA5F412B90710B00F1577A /* EditPatient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditPatient.swift; sourceTree = "<group>"; };
5AEA5F462B93034A00F1577A /* ReactionPDF.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactionPDF.swift; sourceTree = "<group>"; };
5AEA5F492B96F63A00F1577A /* AllergyLLMAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllergyLLMAssistant.swift; sourceTree = "<group>"; };
637BE1D42B572B4800EA19C6 /* Questionnaire.json.license */ = {isa = PBXFileReference; lastKnownFileType = text; path = Questionnaire.json.license; sourceTree = "<group>"; };
653A254D283387FE005D4D48 /* Intake.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Intake.app; sourceTree = BUILT_PRODUCTS_DIR; };
653A2550283387FE005D4D48 /* Intake.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Intake.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -460,7 +468,9 @@
children = (
5A2B9FB52B6AFE5D005CA63F /* AllergyRecords.swift */,
5AEA5F2B2B8680F300F1577A /* AddAllergy.swift */,
5AEA5F492B96F63A00F1577A /* AllergyLLMAssistant.swift */,
5A2B9FBB2B6C7B29005CA63F /* ReactionView.swift */,
5AEA5F462B93034A00F1577A /* ReactionPDF.swift */,
51A360152B965819004E7E12 /* AllergyLLMAssistant.swift */,
);
path = "Allergy Records";
Expand Down Expand Up @@ -515,6 +525,8 @@
2FE5DC3D29EDD7E4004B9AB4 /* Helper */,
2FE5DC2D29EDD792004B9AB4 /* Resources */,
2FC9759D2978E30800BA99FE /* Supporting Files */,
5AEA5F3A2B90081B00F1577A /* ScrollablePDF.swift */,
5AEA5F412B90710B00F1577A /* EditPatient.swift */,
);
path = Intake;
sourceTree = "<group>";
Expand Down Expand Up @@ -830,6 +842,7 @@
2FF53D8D2A8729D600042B76 /* IntakeStandard.swift in Sources */,
2FE5DC4729EDD7F2004B9AB4 /* CodableArray+RawRepresentable.swift in Sources */,
5A2B9FAB2B69E430005CA63F /* FHIRStore+Extensions.swift in Sources */,
5AEA5F472B93034A00F1577A /* ReactionPDF.swift in Sources */,
A9720E432ABB68CC00872D23 /* AccountSetupHeader.swift in Sources */,
5AEA5F2C2B8680F300F1577A /* AddAllergy.swift in Sources */,
2FE5DC4029EDD7EE004B9AB4 /* FeatureFlags.swift in Sources */,
Expand All @@ -856,10 +869,14 @@
566155292AB8447C00209B80 /* Package+LicenseType.swift in Sources */,
5680DD392AB8983D004E6D4A /* PackageCell.swift in Sources */,
ACFFA1D12B8FD8BB0006E6D4 /* MenstrualHistory.swift in Sources */,
5AEA5F422B90710B00F1577A /* EditPatient.swift in Sources */,
ACFFA1D12B8FD8BB0006E6D4 /* MenstrualHistory.swift in Sources */,
F42AB1EC2B6DBF21002E13A6 /* SummaryView.swift in Sources */,
5AEA5F4A2B96F63A00F1577A /* AllergyLLMAssistant.swift in Sources */,
2F5E32BD297E05EA003432F8 /* IntakeDelegate.swift in Sources */,
511827962B740192002033A0 /* SurgeryView.swift in Sources */,
2FE5DC5229EDD7FA004B9AB4 /* IntakeScheduler.swift in Sources */,
5AEA5F3B2B90081B00F1577A /* ScrollablePDF.swift in Sources */,
F42AB1E52B6383F9002E13A6 /* LLMOpenAITokenOnboarding.swift in Sources */,
51805C122B81853800D17109 /* IntakeMedication.swift in Sources */,
A9FE7AD02AA39BAB0077B045 /* AccountSheet.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/abseil-cpp-binary.git",
"state" : {
"revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c",
"version" : "1.2022062300.0"
"revision" : "df308b8b46607675f2b9ec8e569109008f9155ce",
"version" : "1.2022062300.1"
}
},
{
Expand All @@ -32,44 +32,44 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk.git",
"state" : {
"revision" : "b880ec8ec927a838c51c12862c6222c30d7097d7",
"version" : "10.20.0"
"revision" : "be49849dcba96f2b5ee550d4eceb2c0fa27dade4",
"version" : "10.22.1"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "ceec9f28dea12b7cf3dabf18b5ed7621c88fd4aa",
"version" : "10.20.0"
"revision" : "482cfa4e5880f0a29f66ecfd60c5a62af28bd1f0",
"version" : "10.22.1"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "a732a4b47f59e4f725a2ea10f0c77e93a7131117",
"version" : "9.3.0"
"revision" : "a637d318ae7ae246b02d7305121275bc75ed5565",
"version" : "9.4.0"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "bc27fad73504f3d4af235de451f02ee22586ebd3",
"version" : "7.12.1"
"revision" : "26c898aed8bed13b8a63057ee26500abbbcb8d55",
"version" : "7.13.1"
}
},
{
"identity" : "grpc-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/grpc-binary.git",
"state" : {
"revision" : "a673bc2937fbe886dd1f99c401b01b6d977a9c98",
"version" : "1.49.1"
"revision" : "ea4cb5cc0c39c732b85386263116d2e2fdbbdc61",
"version" : "1.49.2"
}
},
{
Expand All @@ -86,8 +86,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/HealthKitOnFHIR.git",
"state" : {
"revision" : "825e96007d83ed83f81ee49eb3ebab29d7b7ba2f",
"version" : "0.2.5"
"revision" : "00d64d38a8f0d826ee9e27b6f3ce32314a29fd3e",
"version" : "0.2.6"
}
},
{
Expand All @@ -104,26 +104,26 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "9d108e9112aa1d65ce508facf804674546116d9c",
"version" : "1.22.3"
"revision" : "43aaef65e0c665daadf848761d560e446d350d3d",
"version" : "1.22.4"
}
},
{
"identity" : "llama.cpp",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/llama.cpp",
"state" : {
"revision" : "b0611c7d3cb049822f9911878514e4706b80e2ac",
"version" : "0.1.8"
"revision" : "7bfd6d4b5bbc9fd47bd023bdbb35f96c827977f3",
"version" : "0.2.1"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
"version" : "2.30909.0"
"revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
"version" : "2.30910.0"
}
},
{
Expand All @@ -140,35 +140,26 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/promises.git",
"state" : {
"revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
"version" : "2.3.1"
"revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac",
"version" : "2.4.0"
}
},
{
"identity" : "researchkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/ResearchKit",
"state" : {
"revision" : "209164ed20592a2213c4bd69cefcb078d9de0692",
"version" : "2.2.21"
"revision" : "e4afb10ec636a70e06afc4a84fb98e457818439a",
"version" : "2.2.27"
}
},
{
"identity" : "researchkitonfhir",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/ResearchKitOnFHIR",
"state" : {
"revision" : "ea4d9691591594177e7dfbc8c246324855d73eb5",
"version" : "1.0.1"
}
},
{
"identity" : "semaphore",
"kind" : "remoteSourceControl",
"location" : "https://github.com/groue/Semaphore.git",
"state" : {
"revision" : "f1c4a0acabeb591068dea6cffdd39660b86dec28",
"version" : "0.0.8"
"revision" : "7c2efdcb17796fc9ee686900304dbbe9dd4aaf85",
"version" : "1.1.2"
}
},
{
Expand All @@ -185,17 +176,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziAccount.git",
"state" : {
"revision" : "714f01ae1e67bf9c1c0e7c07624380f9bea772b7",
"version" : "1.1.0"
"revision" : "a7d289ef3be54de62b25dc92e8f7ff1a0f093906",
"version" : "1.2.1"
}
},
{
"identity" : "spezichat",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziChat",
"location" : "https://github.com/StanfordSpezi/SpeziChat.git",
"state" : {
"revision" : "eae5c15b211f18e09aa98de63ce119629320afeb",
"version" : "0.1.8"
"revision" : "2334583105224b0c04fc36989db82b000021d31d",
"version" : "0.1.9"
}
},
{
Expand Down Expand Up @@ -228,10 +219,10 @@
{
"identity" : "spezifoundation",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziFoundation.git",
"location" : "https://github.com/StanfordSpezi/SpeziFoundation",
"state" : {
"revision" : "662f25d6010a94faf4fd996e184617fcb2bf13d4",
"version" : "1.0.3"
"revision" : "01af5b91a54f30ddd121258e81aff2ddc2a99ff9",
"version" : "1.0.4"
}
},
{
Expand All @@ -246,10 +237,10 @@
{
"identity" : "spezillm",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziLLM.git",
"location" : "https://github.com/StanfordSpezi/SpeziLLM",
"state" : {
"revision" : "6892c5dfe258371b6f3287f02b8fec57a611ba70",
"version" : "0.7.0"
"revision" : "ca379106637c69fd0138360643d0129176a8ca6b",
"version" : "0.7.1"
}
},
{
Expand All @@ -275,53 +266,53 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziOnboarding",
"state" : {
"revision" : "91463ae190611bd14ef52b0657e8db3bf53c9ae8",
"version" : "1.1.0"
"revision" : "4971a82e94996ce0c3d8ecf64fdeec874a1f20d6",
"version" : "1.1.1"
}
},
{
"identity" : "speziquestionnaire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziQuestionnaire.git",
"state" : {
"revision" : "fac0bb02f7027b4c09bd7afdad55eb7b47ec67f3",
"version" : "1.0.1"
"revision" : "f25580e95bfdad02383980dcb94406cf97b08ea8",
"version" : "1.0.2"
}
},
{
"identity" : "spezischeduler",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziScheduler.git",
"state" : {
"revision" : "adf793cb47dc199f8ae88f5c719f4d3ba06a4c4e",
"version" : "0.8.0"
"revision" : "ba391084109a9a16622b07e9dcefe2ab1552d2a2",
"version" : "0.8.1"
}
},
{
"identity" : "spezispeech",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziSpeech",
"location" : "https://github.com/StanfordSpezi/SpeziSpeech.git",
"state" : {
"revision" : "a1e1d021d8f605b5e6b23aee773115d7125a57e3",
"version" : "1.0.0"
"revision" : "60b8cdbf6f3d58b0d75eadf30db50f88848069aa",
"version" : "1.0.1"
}
},
{
"identity" : "spezistorage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziStorage.git",
"state" : {
"revision" : "eaed2220375c35400aa69d1f96a8d32b7e66b1c7",
"version" : "1.0.0"
"revision" : "b958df9b31f24800388a7bfc28f457ce7b82556c",
"version" : "1.0.2"
}
},
{
"identity" : "speziviews",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziViews.git",
"state" : {
"revision" : "d49f716e4a4d634604bb0dcd6d53df679b6c1358",
"version" : "1.3.0"
"revision" : "4d2a724d97c8f19ac7de7aa2c046b1cb3ef7b279",
"version" : "1.3.1"
}
},
{
Expand All @@ -338,8 +329,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections.git",
"state" : {
"revision" : "d029d9d39c87bed85b1c50adee7c41795261a192",
"version" : "1.0.6"
"revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb",
"version" : "1.1.0"
}
},
{
Expand All @@ -365,8 +356,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordBDHG/XCTestExtensions.git",
"state" : {
"revision" : "fb7fcee97c574b950e03b0a53874e26db27db2fe",
"version" : "0.4.8"
"revision" : "1fe9b8e76aeb7a132af37bfa0892160c9b662dcc",
"version" : "0.4.10"
}
},
{
Expand Down
17 changes: 3 additions & 14 deletions Intake/Allergy Records/AllergyRecords.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
var body: some View {
VStack {
allergyForm
submitButton
SubmitButton(nextView: NavigationViews.menstrual)
.padding()

Check warning on line 66 in Intake/Allergy Records/AllergyRecords.swift

View check run for this annotation

Codecov / codecov/patch

Intake/Allergy Records/AllergyRecords.swift#L65-L66

Added lines #L65 - L66 were not covered by tests
}
.onAppear(perform: loadAllergies)
.sheet(isPresented: $showingChat, content: chatSheetView)
Expand Down Expand Up @@ -101,18 +102,6 @@
}
}
}

private var submitButton: some View {
Button(action: submitAction) {
Text("Submit")
.foregroundColor(.white)
.padding()
.frame(maxWidth: .infinity)
.background(Color.blue)
.cornerRadius(8)
}
.padding()
}

private func allergyEntryRow(index: Int) -> some View {
HStack {
Expand Down Expand Up @@ -185,7 +174,7 @@
}
}
if !allergies.isEmpty {
for index in 0...(allergies.count - 1) {
for index in 0...(allergies.count - 1) where !data.allergyData.contains(where: { $0.allergy == allergies[index].string }) {

Check warning on line 177 in Intake/Allergy Records/AllergyRecords.swift

View check run for this annotation

Codecov / codecov/patch

Intake/Allergy Records/AllergyRecords.swift#L177

Added line #L177 was not covered by tests
data.allergyData.append(
AllergyItem(allergy: allergies[index].string, reaction: allReactions[index])
)
Expand Down
Loading
Loading