Clinical Intelligence StandardsVersion 0.2

Functional standard / Governance / Instance

Definition

A versioned template. Packs ship published definitions. A site publishes its own, and a site key overrides the library key.

Kind
definition
Collection
/v1/definitions
Initial state
draft
Classification
Operational

Scope and usage

This is the profiling mechanism. Eighteen def_kind values constrain other resources the way an openEHR archetype constrains a reference-model class, and the way a FHIR profile constrains a resource. The config object is the constraint. See Definitions in this standard.

Boundaries and relationships

Resource content

Elements this resource adds. It also carries the Instance.

NameCard.TypeFlagsDescription
def_kind1..1codeIWhich template. Immutable.
key1..1codeIStable key. Immutable. Site overrides library on the same key.
version1..1integerRHarness assigns the next version.
name1..1string—Display name.
description0..1string—What a configurer needs to know.
config1..1object—Kind-specific constraint. See that definition kind.
pack_id0..1codeRSet when loaded from a pack. Harness-owned.
review_status0..1codeRClinical review result: draft, approved, or rejected. Harness-owned.
reviewed_by0..1idRReviewer. Must not be the author. Harness-owned.
reviewed_at0..1dateTimeRWhen reviewed. Harness-owned.
review_ref0..1stringRReference for the review. Harness-owned.
review_notes0..1stringRReviewer's notes. Harness-owned.

State machine

draft → published. published → retired.

Frozen: published and retired.

Invariants

Operations

MethodPathMeaning
GET/v1/definitionsList definition. Filter by patient_id, status, and where the model has them, encounter_id or definition_key.
POST/v1/definitionsCreate a definition. Body is the resource minus harness-owned elements.
GET/v1/definitions/{id}Read one definition.
PATCH/v1/definitions/{id}Update elements that are not immutable, frozen, or harness-owned.
POST/v1/definitions/{id}/transitionMove status. Body is { to, reason }. A gated move returns 202 and an Approval.
DELETE/v1/definitions/{id}?reason=Soft-delete. Reason is required. Refused when the resource is not deletable or is frozen.

Example

{
  "def_kind": "cohort",
  "key": "cohort_htn",
  "name": "Hypertension",
  "config": { "rule": "cond_htn or obs_bp_systolic >= 140", "manual_only": false, "protocols": ["proto_htn"] }
}