Procedure data model

Updated:

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

FieldTypeRequiredDescription
idstringNoUnique identifier for the procedure
created_atstring (date-time)NoWhen the procedure record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)NoWhen the procedure record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
patient_idstringNoThe patient the procedure was performed on
encounter_idstringNoThe encounter in which the procedure was performed
practitioner_idsstring[]NoThe practitioners who performed the procedure
location_idstringNoWhere the procedure was performed
condition_idsstring[]NoConditions that justified the procedure
namestringNoHuman-readable name of the procedure
codesHealthcareCode[]NoCodings for the procedure (e.g. CPT, SNOMED CT)
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 procedure Values: PREPARATION, IN_PROGRESS, NOT_DONE, ON_HOLD, STOPPED, COMPLETED, ENTERED_IN_ERROR, UNKNOWN, OTHER
reasonsHealthcareCode[]NoCodings for the reason the procedure was performed
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
body_sitesHealthcareCode[]NoCodings for the anatomical locations of the procedure
body_sites[].systemstringNoThe code system URI (e.g. http://loinc.org, http://snomed.info/sct)
body_sites[].codestringNoThe code within the system
body_sites[].displaystringNoHuman-readable display text for the code
start_atstring (date-time)NoWhen the procedure was performed (or started) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
end_atstring (date-time)NoWhen the procedure ended (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
notesstringNoFree-text notes about the procedure
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 HealthcareProcedure = {
	id?: string; // Unique identifier for the procedure
	created_at?: string-time; // When the procedure record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the procedure record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	patient_id?: string; // The patient the procedure was performed on
	encounter_id?: string; // The encounter in which the procedure was performed
	practitioner_ids?: string[]; // The practitioners who performed the procedure
	location_id?: string; // Where the procedure was performed
	condition_ids?: string[]; // Conditions that justified the procedure
	name?: string; // Human-readable name of the procedure
	codes?: []; // Codings for the procedure (e.g. CPT, SNOMED CT)
	status?: 'PREPARATION' | 'IN_PROGRESS' | 'NOT_DONE' | 'ON_HOLD' | 'STOPPED' | 'COMPLETED' | 'ENTERED_IN_ERROR' | 'UNKNOWN' | 'OTHER'; // Status of the procedure
	reasons?: []; // Codings for the reason the procedure was performed
	body_sites?: []; // Codings for the anatomical locations of the procedure
	start_at?: string-time; // When the procedure was performed (or started) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	end_at?: string-time; // When the procedure ended (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	notes?: string; // Free-text notes about the procedure
	metadata?: []; // Custom field values
	raw?: any; // Raw data from integration
} 

Zod

Zod
import { z } from 'zod';

export const ZodHealthcareProcedure = z.object({
	id: z.string().optional().describe("Unique identifier for the procedure"),
	created_at: z.string-time().optional().describe("When the procedure record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the procedure record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	patient_id: z.string().optional().describe("The patient the procedure was performed on"),
	encounter_id: z.string().optional().describe("The encounter in which the procedure was performed"),
	practitioner_ids: z.array().optional().describe("The practitioners who performed the procedure"),
	location_id: z.string().optional().describe("Where the procedure was performed"),
	condition_ids: z.array().optional().describe("Conditions that justified the procedure"),
	name: z.string().optional().describe("Human-readable name of the procedure"),
	codes: z.array().optional().describe("Codings for the procedure (e.g. CPT, SNOMED CT)"),
	status: z.enum("PREPARATION", "IN_PROGRESS", "NOT_DONE", "ON_HOLD", "STOPPED", "COMPLETED", "ENTERED_IN_ERROR", "UNKNOWN", "OTHER").optional().describe("Status of the procedure"),
	reasons: z.array().optional().describe("Codings for the reason the procedure was performed"),
	body_sites: z.array().optional().describe("Codings for the anatomical locations of the procedure"),
	start_at: z.string-time().optional().describe("When the procedure was performed (or started) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	end_at: z.string-time().optional().describe("When the procedure ended (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	notes: z.string().optional().describe("Free-text notes about the procedure"),
	metadata: z.array().optional().describe("Custom field values"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class HealthcareProcedureStatus(str, Enum):
	PREPARATION = 'PREPARATION'
	IN_PROGRESS = 'IN_PROGRESS'
	NOT_DONE = 'NOT_DONE'
	ON_HOLD = 'ON_HOLD'
	STOPPED = 'STOPPED'
	COMPLETED = 'COMPLETED'
	ENTERED_IN_ERROR = 'ENTERED_IN_ERROR'
	UNKNOWN = 'UNKNOWN'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareProcedure:
	"""Unique identifier for the procedure"""
	id: Optional[str]
	"""When the procedure record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the procedure record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The patient the procedure was performed on"""
	patient_id: Optional[str]
	"""The encounter in which the procedure was performed"""
	encounter_id: Optional[str]
	"""The practitioners who performed the procedure"""
	practitioner_ids: Optional[List[List[str]]]
	"""Where the procedure was performed"""
	location_id: Optional[str]
	"""Conditions that justified the procedure"""
	condition_ids: Optional[List[List[str]]]
	"""Human-readable name of the procedure"""
	name: Optional[str]
	"""Codings for the procedure (e.g. CPT, SNOMED CT)"""
	codes: Optional[PropertyHealthcareProcedureCodes]
	"""Status of the procedure"""
	status: Optional[HealthcareProcedureStatus]
	"""Codings for the reason the procedure was performed"""
	reasons: Optional[PropertyHealthcareProcedureReasons]
	"""Codings for the anatomical locations of the procedure"""
	body_sites: Optional[PropertyHealthcareProcedureBody_sites]
	"""When the procedure was performed (or started) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	start_at: Optional[str]
	"""When the procedure ended (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	end_at: Optional[str]
	"""Free-text notes about the procedure"""
	notes: Optional[str]
	"""Custom field values"""
	metadata: Optional[PropertyHealthcareProcedureMetadata]
Are we missing anything? Let us know
Was this page helpful?