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) -> SelfParameters
jsonA JSONType instance from which to instantiate
ownerThe FHIRAbstractBase owning the new instance, if appropriate
contextAn 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
FHIRValidationErrorhappensDeclaration
Swift
public mutating func populate(from json: FHIRJSON, context: inout FHIRInstantiationContext)Parameters
jsonThe JSON element to use to populate the receiver
contextThe 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
FHIRValidationErrorhappensDeclaration
Swift
public func decorate(json: inout FHIRJSON, withKey key: String, errors: inout [FHIRValidationError])Parameters
jsonThe FHIRJSON representation to populate
withKeyThe key to use
errorsAn in-out array to be stuffed with validation errors encountered along the way
-
extensions(forURI:)Extension method
View on GitHub
Install in Dash
FHIRPrimitive Protocol Reference