Document data model

Updated:

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNoUnique identifier for the document
created_atstring (date-time)NoWhen the document record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)NoWhen the document record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
patient_idstringNoThe patient the document is about
encounter_idstringNoThe encounter the document relates to
practitioner_idstringNoThe practitioner who authored the document
namestringNoTitle or description of the document
typeenumNoUnified, 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
codesHealthcareCode[]NoCodings for the kind of document (e.g. LOINC document type)
codes[].systemstringNoThe code system URI (e.g. http://loinc.org, http://snomed.info/sct)
codes[].codestringNoThe code within the system
codes[].displaystringNoHuman-readable display text for the code
statusenumNoStatus of the document Values: CURRENT, SUPERSEDED, ENTERED_IN_ERROR, OTHER
filenamestringNoFile name of the document
mime_typestringNoMIME type of the document content (e.g. text/plain, application/pdf)
document_urlstringNoDownload link for the document content, expires after 1 hour
document_datastringNoBase64-encoded document content for create
authored_atstring (date-time)NoWhen the document was written (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
metadataHealthcareMetadata[]NoCustom field values
metadata[].idstringNoIdentifier of the custom field
metadata[].valueobjectNoThe custom field value
metadata[].namespacestringNoThe scope or origin of the custom field
metadata[].formatenumNoThe data type of the value Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT
metadata[].extra_dataobjectNoAdditional data about the custom field
metadata[].slugstringNoThe 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

Zod
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]
Are we missing anything? Let us know
Was this page helpful?