Foundation
Undocumented
-
Attempt to read a JSON file with the given name (.json) from the bundle, parse the JSON and instantiate a FHIR resource corresponding to the
resourceType
in the file.Declaration
Swift
public func fhir_bundledResource<T: Resource>(_ name: String, type: T.Type) throws -> TParameters
nameThe filename, without “.json” extension, to read the resource from
typeThe type the resource is expected to be; must be a subclass of
ResourceReturn Value
A Resource subclass corresponding to the “resourceType” entry, as specified under
type -
Attempts to read a JSON file with the given name (without
.json
) from the given directory. Parses the JSON and instantiates a FHIR resource corresponding toresourceType
.Declaration
Swift
public func fhir_bundledResource<T: Resource>(_ name: String, subdirectory: String?, type: T.Type) throws -> TParameters
nameThe filename, without “.json” extension, to read the resource from
subdirectoryThe directory name to search for the resource;
nilfor top leveltypeThe type the resource is expected to be; must be a subclass of
ResourceReturn Value
A Resource subclass corresponding to the “resourceType” entry, as specified under
type -
Attempts to read a JSON file with the given name (without
.json
) from the given directory. Parses the JSON and instantiates a FHIR resource corresponding toresourceType
.Declaration
Swift
public func fhir_json(from name: String, subdirectory: String?) throws -> FHIRJSONParameters
nameThe filename, without “.json” extension, to read the resource from
subdirectoryThe directory name to search for the resource;
nilfor top leveltypeThe type the resource is expected to be; must be a subclass of
ResourceReturn Value
A Resource subclass corresponding to the “resourceType” entry, as specified under
type
View on GitHub
Install in Dash
Foundation Extension Reference