---
title: "Document data model"
url: "https://docs.unified.to/healthcare/document/model"
description: "The Document data model object in Unified's Document API: 16 fields, including created_at, updated_at and patient_id, with types and enum values."
date: "2026-10-24T20:36:42.560Z"
updated: "2026-10-24T20:36:42.560Z"
---
# Document data model

Updated: October 24, 2026

 View field support, webhooks, and list parameters for each integration on the [Supported Integrations](https://docs.unified.to/healthcare/integrations.md) page. 

| Field                    | Type                                                                                              | Required | Description                                                                                                                                                                                                                                                 |
| ------------------------ | ------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                       | string                                                                                            | No       | Unique identifier for the document                                                                                                                                                                                                                          |
| created\_at              | string (date-time)                                                                                | No       | When the document record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                                                                                                               |
| updated\_at              | string (date-time)                                                                                | No       | When the document record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                                                                                                          |
| patient\_id              | string                                                                                            | No       | The patient the document is about                                                                                                                                                                                                                           |
| encounter\_id            | string                                                                                            | No       | The encounter the document relates to                                                                                                                                                                                                                       |
| practitioner\_id         | string                                                                                            | No       | The practitioner who authored the document                                                                                                                                                                                                                  |
| name                     | string                                                                                            | No       | Title or description of the document                                                                                                                                                                                                                        |
| type                     | enum                                                                                              | No       | Unified, normalized kind of clinical document (OTHER when unmappable) Values: PROGRESS\_NOTE, CONSULTATION\_NOTE, HISTORY\_AND\_PHYSICAL, DISCHARGE\_SUMMARY, PROCEDURE\_NOTE, REFERRAL\_NOTE, SUMMARY, LABORATORY\_REPORT, IMAGING\_REPORT, CONSENT, OTHER |
| codes                    | [HealthcareCode](https://docs.unified.to/healthcare/document/model.md#HealthcareCode)\[\]         | No       | Codings for the kind of document (e.g. LOINC document type)                                                                                                                                                                                                 |
| codes\[\].system         | string                                                                                            | No       | The code system URI (e.g. http://loinc.org, http://snomed.info/sct)                                                                                                                                                                                         |
| codes\[\].code           | string                                                                                            | No       | The code within the system                                                                                                                                                                                                                                  |
| codes\[\].display        | string                                                                                            | No       | Human-readable display text for the code                                                                                                                                                                                                                    |
| status                   | enum                                                                                              | No       | Status of the document Values: CURRENT, SUPERSEDED, ENTERED\_IN\_ERROR, OTHER                                                                                                                                                                               |
| filename                 | string                                                                                            | No       | File name of the document                                                                                                                                                                                                                                   |
| mime\_type               | string                                                                                            | No       | MIME type of the document content (e.g. text/plain, application/pdf)                                                                                                                                                                                        |
| document\_url            | string                                                                                            | No       | Download link for the document content, expires after 1 hour                                                                                                                                                                                                |
| document\_data           | string                                                                                            | No       | Base64-encoded document content for create                                                                                                                                                                                                                  |
| authored\_at             | string (date-time)                                                                                | No       | When the document was written (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                                                                                                                      |
| metadata                 | [HealthcareMetadata](https://docs.unified.to/healthcare/document/model.md#HealthcareMetadata)\[\] | No       | Custom field values                                                                                                                                                                                                                                         |
| metadata\[\].id          | string                                                                                            | No       | Identifier of the custom field                                                                                                                                                                                                                              |
| metadata\[\].value       | object                                                                                            | No       | The custom field value                                                                                                                                                                                                                                      |
| metadata\[\].namespace   | string                                                                                            | No       | The scope or origin of the custom field                                                                                                                                                                                                                     |
| metadata\[\].format      | enum                                                                                              | No       | The data type of the value Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT                                                                                                                                                                               |
| metadata\[\].extra\_data | object                                                                                            | No       | Additional data about the custom field                                                                                                                                                                                                                      |
| metadata\[\].slug        | string                                                                                            | No       | The custom field key                                                                                                                                                                                                                                        |

## TypeScript

```typescript
export type HealthcareDocument = {
	id?: string; // Unique identifier for the document
	created_at?: string-time; // When the document record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the document record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	patient_id?: string; // The patient the document is about
	encounter_id?: string; // The encounter the document relates to
	practitioner_id?: string; // The practitioner who authored the document
	name?: string; // Title or description of the document
	type?: 'PROGRESS_NOTE' | 'CONSULTATION_NOTE' | 'HISTORY_AND_PHYSICAL' | 'DISCHARGE_SUMMARY' | 'PROCEDURE_NOTE' | 'REFERRAL_NOTE' | 'SUMMARY' | 'LABORATORY_REPORT' | 'IMAGING_REPORT' | 'CONSENT' | 'OTHER'; // Unified, normalized kind of clinical document (OTHER when unmappable)
	codes?: []; // Codings for the kind of document (e.g. LOINC document type)
	status?: 'CURRENT' | 'SUPERSEDED' | 'ENTERED_IN_ERROR' | 'OTHER'; // Status of the document
	filename?: string; // File name of the document
	mime_type?: string; // MIME type of the document content (e.g. text/plain, application/pdf)
	document_url?: string; // Download link for the document content, expires after 1 hour
	document_data?: string; // Base64-encoded document content for create
	authored_at?: string-time; // When the document was written (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	metadata?: []; // Custom field values
	raw?: any; // Raw data from integration
} 
```

## Zod

```typescript
import { z } from 'zod';

export const ZodHealthcareDocument = z.object({
	id: z.string().optional().describe("Unique identifier for the document"),
	created_at: z.string-time().optional().describe("When the document record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the document record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	patient_id: z.string().optional().describe("The patient the document is about"),
	encounter_id: z.string().optional().describe("The encounter the document relates to"),
	practitioner_id: z.string().optional().describe("The practitioner who authored the document"),
	name: z.string().optional().describe("Title or description of the document"),
	type: z.enum("PROGRESS_NOTE", "CONSULTATION_NOTE", "HISTORY_AND_PHYSICAL", "DISCHARGE_SUMMARY", "PROCEDURE_NOTE", "REFERRAL_NOTE", "SUMMARY", "LABORATORY_REPORT", "IMAGING_REPORT", "CONSENT", "OTHER").optional().describe("Unified, normalized kind of clinical document (OTHER when unmappable)"),
	codes: z.array().optional().describe("Codings for the kind of document (e.g. LOINC document type)"),
	status: z.enum("CURRENT", "SUPERSEDED", "ENTERED_IN_ERROR", "OTHER").optional().describe("Status of the document"),
	filename: z.string().optional().describe("File name of the document"),
	mime_type: z.string().optional().describe("MIME type of the document content (e.g. text/plain, application/pdf)"),
	document_url: z.string().optional().describe("Download link for the document content, expires after 1 hour"),
	document_data: z.string().optional().describe("Base64-encoded document content for create"),
	authored_at: z.string-time().optional().describe("When the document was written (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	metadata: z.array().optional().describe("Custom field values"),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class HealthcareDocumentType(str, Enum):
	PROGRESS_NOTE = 'PROGRESS_NOTE'
	CONSULTATION_NOTE = 'CONSULTATION_NOTE'
	HISTORY_AND_PHYSICAL = 'HISTORY_AND_PHYSICAL'
	DISCHARGE_SUMMARY = 'DISCHARGE_SUMMARY'
	PROCEDURE_NOTE = 'PROCEDURE_NOTE'
	REFERRAL_NOTE = 'REFERRAL_NOTE'
	SUMMARY = 'SUMMARY'
	LABORATORY_REPORT = 'LABORATORY_REPORT'
	IMAGING_REPORT = 'IMAGING_REPORT'
	CONSENT = 'CONSENT'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareDocumentStatus(str, Enum):
	CURRENT = 'CURRENT'
	SUPERSEDED = 'SUPERSEDED'
	ENTERED_IN_ERROR = 'ENTERED_IN_ERROR'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareDocument:
	"""Unique identifier for the document"""
	id: Optional[str]
	"""When the document record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the document record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The patient the document is about"""
	patient_id: Optional[str]
	"""The encounter the document relates to"""
	encounter_id: Optional[str]
	"""The practitioner who authored the document"""
	practitioner_id: Optional[str]
	"""Title or description of the document"""
	name: Optional[str]
	"""Unified, normalized kind of clinical document (OTHER when unmappable)"""
	type: Optional[HealthcareDocumentType]
	"""Codings for the kind of document (e.g. LOINC document type)"""
	codes: Optional[PropertyHealthcareDocumentCodes]
	"""Status of the document"""
	status: Optional[HealthcareDocumentStatus]
	"""File name of the document"""
	filename: Optional[str]
	"""MIME type of the document content (e.g. text/plain, application/pdf)"""
	mime_type: Optional[str]
	"""Download link for the document content, expires after 1 hour"""
	document_url: Optional[str]
	"""Base64-encoded document content for create"""
	document_data: Optional[str]
	"""When the document was written (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	authored_at: Optional[str]
	"""Custom field values"""
	metadata: Optional[PropertyHealthcareDocumentMetadata]

```
