Skip to content

Commit

Permalink
FHIRResource not sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
philippzagar committed Jan 7, 2025
1 parent 5de3f42 commit d9ef492
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Sources/SpeziFHIR/FHIRResource/FHIRResource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
//

import Foundation
@preconcurrency import ModelsDSTU2
@preconcurrency import ModelsR4
import ModelsDSTU2
import ModelsR4


/// Represents a FHIR (Fast Healthcare Interoperability Resources) entity.
///
/// Handles both DSTU2 and R4 versions, providing a unified interface to interact with different FHIR versions.
public struct FHIRResource: Sendable, Identifiable, Hashable {
public struct FHIRResource: Identifiable, Hashable {
/// Version-specific FHIR resources.
public enum VersionedFHIRResource: Sendable, Hashable {
public enum VersionedFHIRResource: Hashable {
/// R4 version of FHIR resources.
case r4(ModelsR4.Resource) // swiftlint:disable:this identifier_name
// DSTU2 version of FHIR resources.
/// DSTU2 version of FHIR resources.
case dstu2(ModelsDSTU2.Resource)
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/SpeziFHIR/FHIRStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public final class FHIRStore: Module,
/// Loads resources from a given FHIR `Bundle` into the ``FHIRStore``.
///
/// - Parameter bundle: The FHIR `Bundle` containing resources to be loaded.
public func load(bundle: Bundle) async {
public func load(bundle: sending Bundle) async {
let resourceProxies = bundle.entry?.compactMap { $0.resource } ?? []
var resources: [FHIRResource] = []

Expand Down

0 comments on commit d9ef492

Please sign in to comment.