FHIRAbstractResource
open class FHIRAbstractResource: FHIRAbstractBase
Abstract superclass for all FHIR resource models.
-
A specific version id, if the instance was created using
vread
.Declaration
Swift
public var _versionId: String?
-
If this instance lives on a server, this property represents that server.
Declaration
Swift
public var _server: FHIRServer?
-
Tries to find
resourceType
by inspecting the JSON dictionary, then instantiates the appropriate class for the specified resource type; instantiates the receiver’s class otherwise.Note
If the factory does not return a subclass of the receiver, will discard the factory-created instance and useself.init(json:owner:)
instead.Todo
Disabled factory use on Linux for now since it crashes the compiler as of Swift 3.0.1
Throws
FHIRValidationError
Declaration
Swift
override public final class func instantiate(from json: FHIRJSON, owner: FHIRAbstractBase?, context: inout FHIRInstantiationContext) -> Self
Parameters
json
A FHIRJSON decoded from a JSON response
owner
The FHIRAbstractBase owning the new instance, if appropriate
context
An in-out parameter for the instantiation context
Return Value
If possible the appropriate FHIRAbstractBase subclass, instantiated from the given JSON dictionary, Self otherwise
-
The Resource, in contrast to the base element, definitely wants
resourceType
to be present. Will return an error complaining about it missing if it’s not present.Declaration
Swift
override open func populate(from json: FHIRJSON, context: inout FHIRInstantiationContext)
-
Undocumented
Declaration
Swift
open class FHIRAbstractResource: FHIRAbstractBase
-
Undocumented
Declaration
Swift
open class FHIRAbstractResource: FHIRAbstractBase