---
title: document
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hkcdadocumentsample/document
---

# document

The CDA document.

## Declaration

```swift
var document: HKCDADocument? { get }
```

## Discussion

Discussion If the user is authorized to access the document’s data, this property contains an HKCDADocument object representing that data. Otherwise, it is set to nil. The user is asked to authorize each CDA document the first time that document is returned by an HKDocumentQuery query. The user can change the access permissions in the Health app. For samples returned by an HKSampleQuery or an HKAnchoredObjectQuery, this property is always set to nil. To access the document’s data from these samples, create a HKDocumentQuery query for the sample’s UUID.

## See Also

### Accessing the Document

- [HKCDADocument](healthkit/hkcdadocument.md)
