FHIRPrimitive

Undocumented

  • id

    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 implementation

    Undocumented

    Default Implementation

    Undocumented

  • Optional 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 method

    Default 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 happens

    Declaration

    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

  • Default 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 happens

    Declaration

    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

    Returns an array of Extension elements for the given extension URL, if any.

    Declaration

    Swift

    public final func extensions(forURI uri: String) -> [Extension]?

    Parameters

    forURI

    The URI defining the extension on the receiver