Functional standard / Foundation
Data types
The types named in element tables. They are deliberately few.
| Type | Meaning |
|---|---|
| id | A string the server assigned, or a reference to one. Prefixes hint at the kind. They are not a parse contract. |
| code | A string from a binding, or an external code such as loinc:8480-6. |
| string | Text. |
| integer, decimal | Numbers. Ages and durations are integers. Scores and measure targets are decimals. |
| boolean | true or false. |
| date, dateTime | ISO-8601. dateTime is timezone-aware. |
| uri | A reference to a blob or an external address. Not fetched by the harness. |
| expression | A sandboxed formula. See Rule expressions below. |
| object | A JSON object whose keys are described in the element text. |
| Schedule | every_days (required, at least 1), anchor, until, grace_days (default 2). |
| Effect | op (create or transition), kind, data, target_id, to, rationale. A data value starting with $ is read from the source record. |
| Quantity | A number in value plus a unit string. Not a nested type. |
Code systems are not fixed by this standard. An element may carry system, code, and display, the same three ideas as a FHIR Coding, without requiring a particular terminology server. LOINC, SNOMED CT, and local codes are all legal. A pack says which one it used.
Rule expressions
| Allowed | Detail |
|---|---|
| Arithmetic | + - * / // % and **. Exponents are limited to 8 in size. |
| Logic | Comparisons, and, or, not, and value_if_true if test else value_if_false. |
| Functions | abs, min, max, round, pow, sqrt, exp, log, log10, floor, ceil. No other function can be called. |
| Constants | e, pi, True, False, None. |
| Limits | At most 2000 characters and 32 levels deep. No attribute access, indexing, or imports. |
A missing value never satisfies an ordering comparison such as >=. Cohort rules and protocol criteria read patient facts: age, gender, country, is_guardian, cond_<code> for active or remission conditions, state_<state> for current states, and obs_<code> for the latest numeric observation. In these names, : and - in a code become _, so loinc:8480-6 is read as obs_loinc_8480_6. Reaction conditions read the fields of the record that triggered them.