Goal data model

Updated:

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

FieldTypeRequiredDescription
idstringNoUnique identifier for the goal
created_atstring (date-time)NoWhen the goal record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)NoWhen the goal record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
patient_idstringNoThe patient the goal is for
practitioner_idstringNoThe practitioner who set the goal
condition_idsstring[]NoConditions the goal addresses
namestringNoHuman-readable description of the goal
codesHealthcareCode[]NoCodings for the goal
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
statusenumNoLifecycle status of the goal Values: PROPOSED, PLANNED, ACCEPTED, ACTIVE, ON_HOLD, COMPLETED, CANCELLED, ENTERED_IN_ERROR, REJECTED, OTHER
achievement_statusenumNoProgress towards the goal Values: IN_PROGRESS, IMPROVING, WORSENING, NO_CHANGE, ACHIEVED, SUSTAINING, NOT_ACHIEVED, NO_PROGRESS, NOT_ATTAINABLE, OTHER
start_atstring (date-time)NoWhen work on the goal starts (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
due_atstring (date-time)NoWhen the goal should be reached (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
notesstringNoFree-text notes about the goal
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 HealthcareGoal = {
	id?: string; // Unique identifier for the goal
	created_at?: string-time; // When the goal record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the goal record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	patient_id?: string; // The patient the goal is for
	practitioner_id?: string; // The practitioner who set the goal
	condition_ids?: string[]; // Conditions the goal addresses
	name?: string; // Human-readable description of the goal
	codes?: []; // Codings for the goal
	status?: 'PROPOSED' | 'PLANNED' | 'ACCEPTED' | 'ACTIVE' | 'ON_HOLD' | 'COMPLETED' | 'CANCELLED' | 'ENTERED_IN_ERROR' | 'REJECTED' | 'OTHER'; // Lifecycle status of the goal
	achievement_status?: 'IN_PROGRESS' | 'IMPROVING' | 'WORSENING' | 'NO_CHANGE' | 'ACHIEVED' | 'SUSTAINING' | 'NOT_ACHIEVED' | 'NO_PROGRESS' | 'NOT_ATTAINABLE' | 'OTHER'; // Progress towards the goal
	start_at?: string-time; // When work on the goal starts (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	due_at?: string-time; // When the goal should be reached (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	notes?: string; // Free-text notes about the goal
	metadata?: []; // Custom field values
	raw?: any; // Raw data from integration
} 

Zod

Zod
import { z } from 'zod';

export const ZodHealthcareGoal = z.object({
	id: z.string().optional().describe("Unique identifier for the goal"),
	created_at: z.string-time().optional().describe("When the goal record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the goal record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	patient_id: z.string().optional().describe("The patient the goal is for"),
	practitioner_id: z.string().optional().describe("The practitioner who set the goal"),
	condition_ids: z.array().optional().describe("Conditions the goal addresses"),
	name: z.string().optional().describe("Human-readable description of the goal"),
	codes: z.array().optional().describe("Codings for the goal"),
	status: z.enum("PROPOSED", "PLANNED", "ACCEPTED", "ACTIVE", "ON_HOLD", "COMPLETED", "CANCELLED", "ENTERED_IN_ERROR", "REJECTED", "OTHER").optional().describe("Lifecycle status of the goal"),
	achievement_status: z.enum("IN_PROGRESS", "IMPROVING", "WORSENING", "NO_CHANGE", "ACHIEVED", "SUSTAINING", "NOT_ACHIEVED", "NO_PROGRESS", "NOT_ATTAINABLE", "OTHER").optional().describe("Progress towards the goal"),
	start_at: z.string-time().optional().describe("When work on the goal starts (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	due_at: z.string-time().optional().describe("When the goal should be reached (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	notes: z.string().optional().describe("Free-text notes about the goal"),
	metadata: z.array().optional().describe("Custom field values"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class HealthcareGoalStatus(str, Enum):
	PROPOSED = 'PROPOSED'
	PLANNED = 'PLANNED'
	ACCEPTED = 'ACCEPTED'
	ACTIVE = 'ACTIVE'
	ON_HOLD = 'ON_HOLD'
	COMPLETED = 'COMPLETED'
	CANCELLED = 'CANCELLED'
	ENTERED_IN_ERROR = 'ENTERED_IN_ERROR'
	REJECTED = 'REJECTED'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareGoalAchievement_status(str, Enum):
	IN_PROGRESS = 'IN_PROGRESS'
	IMPROVING = 'IMPROVING'
	WORSENING = 'WORSENING'
	NO_CHANGE = 'NO_CHANGE'
	ACHIEVED = 'ACHIEVED'
	SUSTAINING = 'SUSTAINING'
	NOT_ACHIEVED = 'NOT_ACHIEVED'
	NO_PROGRESS = 'NO_PROGRESS'
	NOT_ATTAINABLE = 'NOT_ATTAINABLE'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareGoal:
	"""Unique identifier for the goal"""
	id: Optional[str]
	"""When the goal record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the goal record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The patient the goal is for"""
	patient_id: Optional[str]
	"""The practitioner who set the goal"""
	practitioner_id: Optional[str]
	"""Conditions the goal addresses"""
	condition_ids: Optional[List[List[str]]]
	"""Human-readable description of the goal"""
	name: Optional[str]
	"""Codings for the goal"""
	codes: Optional[PropertyHealthcareGoalCodes]
	"""Lifecycle status of the goal"""
	status: Optional[HealthcareGoalStatus]
	"""Progress towards the goal"""
	achievement_status: Optional[HealthcareGoalAchievement_status]
	"""When work on the goal starts (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	start_at: Optional[str]
	"""When the goal should be reached (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	due_at: Optional[str]
	"""Free-text notes about the goal"""
	notes: Optional[str]
	"""Custom field values"""
	metadata: Optional[PropertyHealthcareGoalMetadata]
Are we missing anything? Let us know
Was this page helpful?