> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metriport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# documentreference

A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. See the [HL7 FHIR R4 spec](https://hl7.org/fhir/R4/documentreference.html) for full details.

**Tables in this resource:**

* **documentreference** – Main document reference record (this page)
* [documentreference\_type\_coding](/medical-api/handling-data/schema-v100/documentreference/type_coding)
* [documentreference\_content](/medical-api/handling-data/schema-v100/documentreference/content) – Attachment metadata
* [documentreference\_extension](/medical-api/handling-data/schema-v100/documentreference/extension)
* [documentreference\_extension\_vcc\_coding](/medical-api/handling-data/schema-v100/documentreference/extension_vcc_coding)
* **documentreference\_references** – Normalized references; see [Reference Tables](/medical-api/handling-data/schema-v100/reference_tables)

**Primary Keys:**

* documentreference\_id

**Foreign Keys:**

* patient\_id - links to the [patient](/medical-api/handling-data/schema-v100/patient/base) table (subject)

<div style={{textAlign: 'right'}}><sub>† Metriport Platform added</sub></div>

| Column | Data Type | Description |
| - | - | - |
| documentreference\_id | varchar | Unique identifier for the document reference |
| patient\_id | varchar | Unique identifier for the patient (subject) |
| status | varchar | Status of the document reference |
| date | datetime | When the document was created or authored |
| type\_text | varchar | Free-text type of the document |
| type\_loinc\_code† | varchar | Document type: LOINC code |
| type\_loinc\_display† | varchar | Document type: human-readable description of LOINC code |
| meta\_source | varchar | Source document filename from FHIR meta.source |
| data\_source\_ext† | varchar | Integration source of the data, derived from FHIR extension |

**Related Tables:**

**Parent:**

* [patient](/medical-api/handling-data/schema-v100/patient/base)

**Child:**

* [documentreference\_content](/medical-api/handling-data/schema-v100/documentreference/content)
* [documentreference\_extension](/medical-api/handling-data/schema-v100/documentreference/extension)
* [documentreference\_type\_coding](/medical-api/handling-data/schema-v100/documentreference/type_coding)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.