An object representing a Clinical Document Architecture (CDA) document in HealthKit.
- iOS 11.0+
- Mac Catalyst 13.0+
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
HKCDADocument object by calling the
init(data: method, and passing the CDA’s XML data. HealthKit creates a
HKCDADocument object for the XML, and assigns it to the sample’s
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.