Data Values
JSON Primitives
The following JSON primitive types are a subset of the openEHR Foundation Types, and are represented in SDF in their native JSON form.
| Formal type | Definition | Example |
|---|---|---|
|
|
|
|
5 |
|
|
5.0 |
|
|
"mild anaemia" |
openEHR Primitives Represented as JSON String
The following are openEHR primitive types represented as JSON Strings which may be parsed to instantiate the appropriate data type.
| Formal type | Definition | Example |
|---|---|---|
|
"k" "\t" |
|
|
ISO 8601 date string, including partial forms; see |
"2020-04-01" "2020-04" "2020" |
|
ISO 8601 time string, including partial forms; see |
"13:45:00" "13:45" "13" "13:45:00.722+03:00" "13:45+03:00" |
|
ISO 8601 date/time string, including partial forms; see |
"P2Y4M10D" "P1DT3H" "PT2h5m0s" |
|
ISO 8601 duration string; see |
"P2Y4M10D" "P1DT3H" "PT2h5m0s" |
|
"https://www.openEHR.org" "http://snomed.info" |
|
|
openEHR ODIN TERM_CODE_REF, defined as |
"[icd10AM::F60.1]" "[snomed_ct(2020_06_01)::3415004]" |
|
openEHR ODIN XXXX, defined as |
"[icd10AM::F60.1|Schizoid personality disorder|]" "[snomed_ct(2020_06_01)::3415004|cyanosis|]" |
TBD: S.I.: there is no support for version_id in Terminology_code / Terminology_term, or value in Terminology_term.
EhrScape Variants
EhrScape variants exist for the following types.
| Formal type | EhrScape Format |
|---|---|
|
|
|
|
openEHR Intervals Represented as JSON String
Data instances of type Interval<T: Ordered>, where the concrete descendants of Ordered are shown in the openEHR Foundation Types are represented in SDF templates as JSON Strings containing openEHR ODIN intervals, for example "|08:02 .. 09:10|".
The interval syntax is summarised as follows:
|N .. M| -- the two-sided range N >= x <= M;
|> N .. M| -- the two-sided range N > x <= M;
|N .. <M| -- the two-sided range N <= x <M;
|> N .. <M| -- the two-sided range N > x <M;
|< N| -- the one-sided range x < N;
|> N| -- the one-sided range x > N;
|>= N| -- the one-sided range x >= N;
|<= N| -- the one-sided range x <= N;
|N +/-M| -- interval of N ±M;
|N±M| -- interval of N ±M.
Examples of this syntax include:
|0 .. 5| -- integer interval
|0.0 .. 1000.0| -- real interval
|0.0 .. <1000.0| -- real interval 0.0 <= x < 1000.0
|08:02 .. 09:10| -- interval of time
|>= 1939-02-01| -- open-ended interval of dates
|5.0 ±0.5| -- 4.5 ±5.5
|5.0 +/-0.5| -- 4.5 ±5.5
|>= 0| -- >= 0
Lists of Primitive Type and Intervals
Lists are represented in the standard JSON manner, with the elements represented as described above. The following shows various examples.
["cyan", "magenta", "yellow", "black"]
[1, 1, 2, 3, 5]
["[icd10AM::F60.1]", "[icd10AM::F64.2]"]
openeHR Reference Model DATA_VALUE Types
All openEHR RM DATA_VALUE types can be represented in SDF form. Many have the same representation as the Foundation types on which they are based and are assumed to be instantiated to the correct RM type by virtue of parsing within a model-available context. These are shown in the following table.
| Formal type | Definition |
|---|---|
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
The DATA_VALUE types that have specific SDF syntax forms are shown in the following table.
| Formal type | Definition | Example |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Standard JSON structure with compressed items internally |
|
|
CHECK |
CHECK |
|
Standard JSON |
|
|
CHECK |
CHECK |
EhrScape Variants
EhrScape variants exist for the following DV_ types.
| Formal type | EhrScape Format |
|---|---|
|
|
|
|
|
|