The Context Engine Studio is now open source.  View on GitHub →
Clinia

Identifiers

The character sets patient and session identifiers must match, and the prefixed form of the identifiers the Context Engine mints for graph nodes and edges.

Two kinds of identifier appear in the API: the ones you assign to a patient or a session, and the ones the Context Engine mints for the records it derives.

Identifiers you assign

You choose the patientId when you create a patient, and you choose the sessionId when you submit a transcript.

New identifiers you assign must respect [A-Za-z0-9][A-Za-z0-9.~:-]{0,127}: 1 to 128 characters, opening on a letter or a digit, then letters, digits, ., ~, : and -. Creating a patient and submitting a transcript answer 400 for an identifier outside it.

: and . are in the set so a namespaced or composite key from the system you are integrating — urn:oid:1.2.840.113619, epic:MRN-4471 — carries over unchanged.

_ is missing from that set because it is reserved for the identifiers the Context Engine mints.

Addressing a record you already have is wider than creating one, so nothing you assigned earlier stops working.

When you create a session without choosing its id, the Context Engine mints the sessionId as a bare cuid2, with no type prefix.

Identifiers the Context Engine mints

Every identifier the Context Engine mints for a node or an edge of the patient graph is a type prefix, an underscore, then a 24-character cuid2:

lm_tz4a98xxat96iws9zmbrgj3a
└┘ └──────────────────────┘
prefix        cuid2

The full pattern is [a-z]{2,4}_[a-z][0-9a-z]{23}. The prefix names the record's type, so an identifier says what it addresses on its own, and reserving _ keeps any identifier you assign from reading as one the Context Engine minted.

The possible node prefixes are:

The possible edge prefixes are:

A node-id filter accepts only an id carrying its type's prefix, and answers 400 for any other.

GET …/graph/nodes/{type}/items/{nodeId} and GET …/graph/edges/{type}/items/{edgeId} answer 400 when the id's prefix does not match {type}.

On this page