DomainResource
open class DomainResource: Resource
A resource with narrative, extensions, and contained resources.
A resource that includes narrative, extensions, and contained resources.
-
A resource with narrative, extensions, and contained resources.
A resource that includes narrative, extensions, and contained resources.
Declaration
Swift
override open class var resourceType: String -
Contained, inline Resources.
Declaration
Swift
public var contained: [Resource]? -
Additional Content defined by implementations.
Declaration
Swift
public var extension_fhir: [Extension]? -
Extensions that cannot be ignored.
Declaration
Swift
public var modifierExtension: [Extension]? -
Text summary of the resource, for human interpretation.
Declaration
Swift
public var text: Narrative? -
Text summary of the resource, for human interpretation.
Declaration
Swift
override open func populate(from json: FHIRJSON, context instCtx: inout FHIRInstantiationContext) -
Undocumented
Declaration
Swift
open class DomainResource: Resource
-
Contains the given resource and returns the Reference element on success.
Use the return value to assign it to the appropriate property of the containing resource:
let order = Order(json: ["id": ...]) let patient = Patient(json: ["id": "subject", ...]) order.subject = try! order.containResource(patient)If a resource with the same
idis already contained, it will be replaced.Declaration
Parameters
resourceThe instance to contain in the receiver
displayThe string that will become the reference’s
displayReturn Value
A
Referenceinstance pointing to the contained resource (as “#id”) -
Adds a relative or absolute reference to the receiver, depending on whether the resources live on the same server or not.
You need to make sure both the receiver and the given resource have their
_serverset, otherwise the method cannot determine when a relative URL could be used.You usually use the method like this:
let server = FHIROpenServer(...) let lab = Organization() lab.id = "ACME" ... lab._server = server let task = Task() task.created = DateTime.now() ... task._server = server task.owner = try task.referenceResource(lab)Declaration
Swift
open func reference(resource: Resource, withDisplay display: FHIRString? = nil) throws -> ReferenceParameters
resourceThe resource that should be referenced
displayThe string that will become the reference’s
displayReturn Value
A
Reference, ready for use
View on GitHub
Install in Dash
DomainResource Class Reference