Encounter data model

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

FieldTypeRequiredDescription
idstringNoUnique identifier for the encounter
created_atstring (date-time)NoWhen the encounter record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)NoWhen the encounter record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
patient_idstringNoThe patient seen in the encounter
practitioner_idsstring[]NoThe practitioners who participated in the encounter
location_idstringNoWhere the encounter took place
appointment_idstringNoThe appointment that scheduled this encounter
condition_idsstring[]NoConditions diagnosed or addressed during the encounter
statusenumNoStatus of the encounter Values: PLANNED, ARRIVED, TRIAGED, IN_PROGRESS, ONLEAVE, FINISHED, CANCELLED, ENTERED_IN_ERROR, UNKNOWN, OTHER
typeenumNoClass of the encounter (e.g. ambulatory, inpatient) Values: AMBULATORY, EMERGENCY, INPATIENT, OBSERVATION, HOME_HEALTH, VIRTUAL, OTHER
reasonsHealthcareCode[]NoCodings for the reason for the encounter
reasons[].systemstringNoThe code system URI (e.g. http://loinc.org, http://snomed.info/sct)
reasons[].codestringNoThe code within the system
reasons[].displaystringNoHuman-readable display text for the code
start_atstring (date-time)NoWhen the encounter started (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
end_atstring (date-time)NoWhen the encounter ended (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
metadataHealthcareMetadata[]No
metadata[].idstringNo
metadata[].valueobjectNo
metadata[].namespacestringNo
metadata[].formatenumNoValues: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT
metadata[].extra_dataobjectNo
metadata[].slugstringNo

TypeScript

TypeScript
export type HealthcareEncounter = {
	id?: string; // Unique identifier for the encounter
	created_at?: string-time; // When the encounter record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the encounter record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	patient_id?: string; // The patient seen in the encounter
	practitioner_ids?: string[]; // The practitioners who participated in the encounter
	location_id?: string; // Where the encounter took place
	appointment_id?: string; // The appointment that scheduled this encounter
	condition_ids?: string[]; // Conditions diagnosed or addressed during the encounter
	status?: 'PLANNED' | 'ARRIVED' | 'TRIAGED' | 'IN_PROGRESS' | 'ONLEAVE' | 'FINISHED' | 'CANCELLED' | 'ENTERED_IN_ERROR' | 'UNKNOWN' | 'OTHER'; // Status of the encounter
	type?: 'AMBULATORY' | 'EMERGENCY' | 'INPATIENT' | 'OBSERVATION' | 'HOME_HEALTH' | 'VIRTUAL' | 'OTHER'; // Class of the encounter (e.g. ambulatory, inpatient)
	reasons?: []; // Codings for the reason for the encounter
	start_at?: string-time; // When the encounter started (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	end_at?: string-time; // When the encounter ended (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	metadata?: [];
	raw?: any; // Raw data from integration
} 

Zod

Zod
import { z } from 'zod';

export const ZodHealthcareEncounter = z.object({
	id: z.string().optional().describe("Unique identifier for the encounter"),
	created_at: z.string-time().optional().describe("When the encounter record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the encounter record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	patient_id: z.string().optional().describe("The patient seen in the encounter"),
	practitioner_ids: z.array().optional().describe("The practitioners who participated in the encounter"),
	location_id: z.string().optional().describe("Where the encounter took place"),
	appointment_id: z.string().optional().describe("The appointment that scheduled this encounter"),
	condition_ids: z.array().optional().describe("Conditions diagnosed or addressed during the encounter"),
	status: z.enum("PLANNED", "ARRIVED", "TRIAGED", "IN_PROGRESS", "ONLEAVE", "FINISHED", "CANCELLED", "ENTERED_IN_ERROR", "UNKNOWN", "OTHER").optional().describe("Status of the encounter"),
	type: z.enum("AMBULATORY", "EMERGENCY", "INPATIENT", "OBSERVATION", "HOME_HEALTH", "VIRTUAL", "OTHER").optional().describe("Class of the encounter (e.g. ambulatory, inpatient)"),
	reasons: z.array().optional().describe("Codings for the reason for the encounter"),
	start_at: z.string-time().optional().describe("When the encounter started (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	end_at: z.string-time().optional().describe("When the encounter ended (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class HealthcareEncounterStatus(str, Enum):
	PLANNED = 'PLANNED'
	ARRIVED = 'ARRIVED'
	TRIAGED = 'TRIAGED'
	IN_PROGRESS = 'IN_PROGRESS'
	ONLEAVE = 'ONLEAVE'
	FINISHED = 'FINISHED'
	CANCELLED = 'CANCELLED'
	ENTERED_IN_ERROR = 'ENTERED_IN_ERROR'
	UNKNOWN = 'UNKNOWN'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareEncounterType(str, Enum):
	AMBULATORY = 'AMBULATORY'
	EMERGENCY = 'EMERGENCY'
	INPATIENT = 'INPATIENT'
	OBSERVATION = 'OBSERVATION'
	HOME_HEALTH = 'HOME_HEALTH'
	VIRTUAL = 'VIRTUAL'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareEncounter:
	"""Unique identifier for the encounter"""
	id: Optional[str]
	"""When the encounter record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the encounter record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The patient seen in the encounter"""
	patient_id: Optional[str]
	"""The practitioners who participated in the encounter"""
	practitioner_ids: Optional[List[List[str]]]
	"""Where the encounter took place"""
	location_id: Optional[str]
	"""The appointment that scheduled this encounter"""
	appointment_id: Optional[str]
	"""Conditions diagnosed or addressed during the encounter"""
	condition_ids: Optional[List[List[str]]]
	"""Status of the encounter"""
	status: Optional[HealthcareEncounterStatus]
	"""Class of the encounter (e.g. ambulatory, inpatient)"""
	type: Optional[HealthcareEncounterType]
	"""Codings for the reason for the encounter"""
	reasons: Optional[PropertyHealthcareEncounterReasons]
	"""When the encounter started (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	start_at: Optional[str]
	"""When the encounter ended (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	end_at: Optional[str]
	metadata: Optional[PropertyHealthcareEncounterMetadata]
Are we missing anything? Let us know
Was this page helpful?