Class

HKCDADocumentSample

A Clinical Document Architecture (CDA) sample that stores a single document.

Declaration

class HKCDADocumentSample : HKDocumentSample

Overview

The sample’s document property contains an HKCDADocument object, representing the underlying XML document.

The HKCDADocumentSample class is a concrete subclass of the HKDocumentSample class. Document samples are immutable. HealthKit assigns the document’s properties when the sample is created. They cannot change. If you need to update a document in HealthKit, create a new document sample with the updated CDA document.

Topics

Creating CDA Samples

init(data: Data, start: Date, end: Date, metadata: [String : Any]?)

Returns a CDA document sample containing the provided XML document and metadata.

let HKDetailedCDAValidationErrorKey: String

A key for accessing validation error information from an NSError object’s userInfo dictionary.

Accessing the Document

class HKCDADocument

An HKCDADocument object represents a Clinical Document Architecture (CDA) document in HealthKit.

Accessing Validation Errors

let HKDetailedCDAValidationErrorKey: String

A key for accessing validation error information from an NSError object’s userInfo dictionary.

Predicate Key Paths

let HKPredicateKeyPathCDAAuthorName: String

The key path for accessing the author’s name inside a predicate format string.

let HKPredicateKeyPathCDACustodianName: String

The key path for accessing the custodian’s name inside a predicate format string.

let HKPredicateKeyPathCDAPatientName: String

The key path for accessing the patient’s name inside a predicate format string.

let HKPredicateKeyPathCDATitle: String

The key path for accessing the document’s title inside a predicate format string.

Relationships

Inherits From

Conforms To

See Also

Medical Records

Accessing Health Records

Read clinical record data from the HealthKit store.

Accessing Sample Data in the Simulator

Set up sample accounts to build and test your app.

class HKClinicalRecord

A sample that stores a clinical record.

class HKFHIRResource

An object containing Fast Healthcare Interoperability Resources (FHIR) data.

class HKDocumentSample

The HKDocumentSample class is an abstract class that represents a health document in the HealthKit store.

static let CDA: HKDocumentTypeIdentifier

The CDA Document type identifier, used when requesting permission to read or share CDA documents.

class HKDocumentType

The HKDocumentType class is a concrete subclass of the HKSampleType class, used when creating queries for documents.