Contents

HKCDADocument

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

Declaration

class HKCDADocument

Overview

CDA documents use XML to encode clinical documents so that they can be easily exchanged. For more information on the CDA document format, see the Clinical Document Architecture, R2 standard.

Do not instantiate HKCDADocument objects directly. Instead, create a new HKCDADocumentSample object by calling the init(data:start:end:metadata:) method, and passing the CDA’s XML data. HealthKit creates a HKCDADocument object for the XML, and assigns it to the sample’s document property.

HKCDADocument objects are immutable. When you create a new document sample, HealthKit parses the title, patient name, author name, and custodian name from the XML to populates the document object’s properties. These properties cannot be changed.

Like many HealthKit classes, the HKCDADocument class should not be subclassed.

Topics

Accessing the Document’s Data

See Also

Accessing the Document