FHIRPrimitive
Undocumented
-
An optional id of the element. This is not a FHIRString as it segfaults the Swift 3.0.1 compiler.
Declaration
Swift
var id: String?
-
Optional extensions of the element.
Declaration
Swift
var extension_fhir: [Extension]?
-
asExtraJSON(errors:)
Default implementationUndocumented
Default Implementation
Undocumented
-
instantiate(from:owner:context:)
Extension methodOptional extensions of the element.
Declaration
Swift
public static func instantiate(from json: JSONType, owner: FHIRAbstractBase?, context: inout FHIRInstantiationContext) -> Self
Parameters
json
A JSONType instance from which to instantiate
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
-
populate(from:context:)
Extension methodDefault implementation to perform JSON parsing on primitives.
Note
Values that the instance alreay possesses and are not in the JSON should be left alone.
Throws
If anything besides a
FHIRValidationError
happensDeclaration
Swift
public mutating func populate(from json: FHIRJSON, context: inout FHIRInstantiationContext)
Parameters
json
The JSON element to use to populate the receiver
context
The instantiation context to use
Return Value
An optional array of errors reporting missing mandatory keys or keys containing values of the wrong type
-
decorate(json:withKey:errors:)
Extension methodDefault implementation to perform JSON parsing on primitives.
Note
Values that the instance alreay possesses and are not in the JSON should be left alone.
Throws
If anything besides a
FHIRValidationError
happensDeclaration
Swift
public func decorate(json: inout FHIRJSON, withKey key: String, errors: inout [FHIRValidationError])
Parameters
json
The FHIRJSON representation to populate
withKey
The key to use
errors
An in-out array to be stuffed with validation errors encountered along the way
-
extensions(forURI:)
Extension method