Functional standard / Definition kinds / Constrains Journey
journey
The workflow language: states, allowed moves, requirements, gates, automatic moves, and effects. See Care workflows.
Runtime
move refuses a step that is not listed or leaves requirements unmet, unless care-team staff force it with a reason. on_exit runs before on_enter. Both follow the tiered rule.
Elements
| Name | Card. | Type | Description |
|---|---|---|---|
| defaults | 0..1 | object | Fields copied onto a new instance. Values given at creation win. |
| approval_required_for | 0..* | code | Extra states that need an Approval to enter. |
| states | 1..* | code | Step names. |
| initial | 1..1 | code | First step. |
| transitions | 0..1 | object | From-state to allowed next states. Empty means any. |
| terminal | 0..* | code | Steps that complete the journey. |
| association_type | 1..1 | code | care_setting, encounter, or care_program. |
| on_enter | 0..1 | object | State name to a list of Effects, run on entering it. |
| on_exit | 0..1 | object | State name to a list of Effects, run on leaving it. |
| stages | 0..1 | object | State name to board presentation: label, category (todo, in_progress, done), color, description, sla_minutes. |
| gates | 0..1 | object | State name to allowed operations: case_sheet, finalize_record, close_encounter. Encounter journeys only. |
| requires | 0..1 | object | State name to requirements before leaving it: kind (note_page, clinical_record, assessment, task, observation), state, definition_key, label. Encounter journeys only. |
| advance_on | 0..* | object | Automatic moves: when_kind, when_state, to, from_states, definition_key. Encounter journeys only. |
Example
{ "states": ["registered", "review", "certified"], "initial": "registered", "transitions": { "registered": ["review"], "review": ["certified"] }, "terminal": ["certified"] }