About data models

The following section gives you an overview of data models used by the iOS SDK.

Using the Record data model

The Record data model holds resource and additional metadata. FHIRResource is typealias of the HCFHIR.DomainResource type.

struct Record<R: FHIRResource> {
    public var id: String
    public var resource: R
    public var metadata: Metadata
}
The Record.id is mapped to the FHIRResource.id for easier interaction with the SDK when working with resources. Don’t use the FHIRResource.id property in any other way. For more information, see how to store custom identifiers.)

Using the Metadata data model

The Metadata data model holds read-only information about records.

struct Metadata {
    var updatedDate: Date
    var createdDate: Date
}

This website uses cookies - see our privacy policy for more information about cookies and your rights as a user. Click on "accept" to allow the cookie use.
More about this