<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKCDADocument",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKCDADocument"
  },
  "title" : "HKCDADocument"
}
-->

# HKCDADocument

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

```
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](http://www.hl7.org/implement/standards/product_brief.cfm?product_id=7) standard.

Do not instantiate `HKCDADocument` objects directly. Instead, create a new [`HKCDADocumentSample`](/documentation/HealthKit/HKCDADocumentSample) object by calling the  [`init(data:start:end:metadata:)`](/documentation/HealthKit/HKCDADocumentSample/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`](/documentation/HealthKit/HKCDADocumentSample/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.

As with many HealthKit classes, don’t subclass the [`HKCDADocument`](/documentation/HealthKit/HKCDADocument) class.

## Topics

### Accessing the Document’s Data

[`authorName`](/documentation/HealthKit/HKCDADocument/authorName)

The document’s author.

[`custodianName`](/documentation/HealthKit/HKCDADocument/custodianName)

The name of the organization responsible for the document.

[`documentData`](/documentation/HealthKit/HKCDADocument/documentData)

The CDA document stored as XML data.

[`patientName`](/documentation/HealthKit/HKCDADocument/patientName)

The patient’s name.

[`title`](/documentation/HealthKit/HKCDADocument/title)

The document’s title.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)