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
26 changes: 10 additions & 16 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ let package = Package(
platforms: [
.iOS(.v18),
.watchOS(.v11),
.visionOS(.v2),
.macOS(.v15),
.macCatalyst(.v18)
],
Expand All @@ -27,52 +26,47 @@ let package = Package(
.executable(name: "MHCStudyDefinitionExporterCLI", targets: ["MHCStudyDefinitionExporterCLI"])
],
dependencies: [
.package(url: "https://github.com/StanfordSpezi/SpeziStudy.git", .upToNextMinor(from: "0.1.19")),
.package(url: "https://github.com/StanfordSpezi/SpeziFoundation.git", from: "2.4.0"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.6.2"),
// not used directly but we need to fix it below 0.9.0 for the time being
.package(url: "https://github.com/apple/FHIRModels.git", .upToNextMinor(from: "0.8.0"))
.package(url: "https://github.com/SchmiedmayerLab/Spezi.git", .upToNextMinor(from: "0.1.0")),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.6.2")
],
targets: [
.target(
name: "MHCStudyDefinition",
dependencies: [
.product(name: "SpeziStudyDefinition", package: "SpeziStudy")
.product(name: "SpeziStudyDefinition", package: "Spezi")
],
resources: [.process("Resources")]
),
.target(
name: "MHCStudyDefinitionExporter",
dependencies: [
"MHCStudyDefinition",
.product(name: "SpeziStudyDefinition", package: "SpeziStudy"),
.product(name: "SpeziStudy", package: "SpeziStudy"),
.product(name: "SpeziLocalization", package: "SpeziFoundation")
.product(name: "SpeziStudyDefinition", package: "Spezi"),
.product(name: "SpeziStudy", package: "Spezi"),
.product(name: "SpeziLocalization", package: "Spezi")
],
Comment thread
lukaskollmer marked this conversation as resolved.
resources: [
.copy("Resources/consent"),
.copy("Resources/article"),
.copy("Resources/questionnaire"),
.copy("Resources/hhdExplainer")
],
swiftSettings: [.defaultIsolation(MainActor.self)]
]
),
.executableTarget(
name: "MHCStudyDefinitionExporterCLI",
dependencies: [
"MHCStudyDefinition",
"MHCStudyDefinitionExporter",
.product(name: "SpeziStudyDefinition", package: "SpeziStudy"),
.product(name: "SpeziStudyDefinition", package: "Spezi"),
.product(name: "ArgumentParser", package: "swift-argument-parser")
],
swiftSettings: [.defaultIsolation(MainActor.self)]
]
),
.testTarget(
name: "MHCStudyDefinitionExporterTests",
dependencies: [
"MHCStudyDefinition",
"MHCStudyDefinitionExporter",
.product(name: "SpeziStudyDefinition", package: "SpeziStudy")
.product(name: "SpeziStudyDefinition", package: "Spezi")
]
)
]
Expand Down
20 changes: 14 additions & 6 deletions Sources/MHCStudyDefinitionExporter/Study.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Foundation
import MHCStudyDefinition
import SpeziHealthKit
import enum SpeziHealthKitBulkExport.ExportSessionStartDate
import SpeziLocalization
import SpeziScheduler
import SpeziStudyDefinition

Expand All @@ -38,17 +39,19 @@ extension StudyBundle.FileReference {


let mhcStudyDefinition = StudyDefinition(
studyRevision: 40,
studyRevision: 41,
metadata: .init(
id: .mhcStudy,
title: "My Heart Counts",
shortTitle: "MHC",
title: [.enUS: "My Heart Counts"],
shortTitle: [.enUS: "MHC"],
icon: .systemSymbol("cube.transparent"),
explanationText: "",
shortExplanationText: "Improve your cardiovascular health",
explanationText: [:],
shortExplanationText: [
.enUS: "Improve your cardiovascular health",
.esES: "Mejora tu salud cardiovascular"
],
studyDependency: nil,
participationCriterion: .ageAtLeast(18) && (.isFromRegion(.unitedStates) || .isFromRegion(.unitedKingdom)),
enrollmentConditions: .none,
consentFileRef: .init(category: .consent, filename: "Consent", fileExtension: "md")
),
components: [
Expand Down Expand Up @@ -327,3 +330,8 @@ let mhcStudyDefinition = StudyDefinition(
)
}
)


extension LocalizationKey {
static let esES = Self(language: .init(identifier: "es"), region: .spain)
}
Loading