Clinical Intelligence StandardsVersion 0.2

Functional standard / What is being done / PatientInstance

Journey

The patient's path through states defined by a journey Definition: a program, an encounter flow, or a setting.

Kind
journey
Collection
/v1/journeys
Initial state
active
Classification
Operational

Scope and usage

The definition owns the state names and the effects on enter. The instance owns where this patient is, and the history.

Boundaries and relationships

Resource content

Elements this resource adds. It also carries the Instance, including patient_id.

NameCard.TypeFlagsDescription
association_type1..1codeBcare_setting, encounter, or care_program.
association_id0..1id—The setting, encounter, or program.
state0..1codeRCurrent step. Set from the definition's initial state. Harness-owned.
history0..*JourneyStepRstate, at, by, reason. Harness-owned.

State machine

active → completed, cancelled. The inner state machine is the definition's.

Frozen: completed and cancelled.

Invariants

Operations

MethodPathMeaning
GET/v1/journeysList journey. Filter by patient_id, status, and where the model has them, encounter_id or definition_key.
POST/v1/journeysCreate a journey. Body is the resource minus harness-owned elements.
GET/v1/journeys/{id}Read one journey.
PATCH/v1/journeys/{id}Update elements that are not immutable, frozen, or harness-owned.
POST/v1/journeys/{id}/transitionMove status. Body is { to, reason }. A gated move returns 202 and an Approval.
DELETE/v1/journeys/{id}?reason=Soft-delete. Reason is required. Refused when the resource is not deletable or is frozen.
POST/v1/journeys/{id}/moveMove the inner state. Body is { to, reason }, with force where allowed.
GET/v1/workflowsList encounter workflows.
GET/v1/workflows/{key}/boardEvery encounter on this workflow, by stage.

Notes

Example

{ "patient_id": "pat_…", "definition_key": "journey_opd_flow", "association_type": "encounter" }