Item Structure Package
Overview
The item_structure package classes presented here are a formalisation of the need for generic, archetypable
data structures, and are used by all openEHR reference models.
The subtypes of the ITEM_STRUCTURE class explicitly model the logical data structure types which
typically occur in health record data, and include ITEM_SINGLE (for single values such as a patient
weight), ITEM_LIST (for lists such as parts of an address), ITEM_TREE (for hierarchically structured
data such as a microbiology report) and ITEM_TABLE (for tabular data such as visual acuity or reflex
test results). Each of these classes defines a functional interface, has an optimal physical representation
using the basic types CLUSTER and ELEMENT from the representation package, and can generate
a CEN EN13606-compliant hierarchical representation of its data. Any system implementing
these types is guaranteed to create data which represents the logical structures of lists, tables and trees
identically.
Data values are connected to spatial structures via the value attribute of the ELEMENT class of the representation cluster. This class also carries the attribute null_flavour, whose value indicates how to read the contents of the value attribute. Values from the openEHR null flavours vocabulary, including 253|unknown|, 271|no information|, and 273|not applicable| are used to populate it.
The openEHR class model for spatial structures is illustrated on the right-hand side of [data_structures_package]. It should be noted that these classes (ITEM_LIST etc) are not equivalents of similarly named classes (such as List<T>) in most data structure libraries - they also include per-node name,
archetype_node_id and leaf node value and null flavour, and path capabilities.
CEN EN13606 Encoding Rules
ITEM_SINGLE
An ITEM_SINGLE object is encoded in EN13606 as a single ELEMENT object.
ITEM_LIST
An ITEM_LIST object is encoded in EN13606 as a CLUSTER object containing the set of ELEMENTs
from the openEHR list.
ITEM_TABLE
The ITEM_TABLE encoding rules are as follows:
-
Each row is encoded as a Cluster containing a number of
ELEMENTs, each corresponding to the value of a column in that row. -
An empty/void column value for a row is represented by an
ELEMENTcontaining no value, and withnull_flavourset. -
The names of the
ELEMENTin a row are the column names. -
The names of the containing
CLUSTERof each row is the stringified number of the row in the overall table.
ITEM_TREE
Data of an ITEM_TREE instance are simply replicated as is to produce the correct EN13606 hierarchical form.
Class Descriptions
ITEM_STRUCTURE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
ITEM_STRUCTURE (abstract) |
|
|---|---|---|
Description |
Abstract parent class of all spatial data types. |
|
Inherit |
||
| ITEM_STRUCTURE (abstract) | |||
|---|---|---|---|
Abstract parent class of all spatial data types. |
|||
Inherits: Any, PATHABLE, LOCATABLE, DATA_STRUCTURE |
|||
Attributes |
|||
name: |
Runtime name of this fragment, used to build runtime paths. This is the term provided via a clinical application or batch process to name this EHR construct: its retention in the EHR faithfully preserves the original label by which this entry was known to end users. |
||
archetype_node_id: |
Design-time archetype id of this node taken from its generating archetype; used to build archetype paths. Always in the form of an at code, e.g. at0005 . This value enables a "standardised" name for this node to be generated, by referring to the generating archetype local ontology. At an archetype root point, the value of this attribute is always the stringified form of the archetype_id found in the archetype_details object. |
||
uid: |
Optional globally unique object identifier for root points of archetyped structures. |
||
Links to other archetyped structures (data whose root object inherits from ARCHETYPED, such as ENTRY, SECTION and so on). Links may be to structures in other compositions. |
|||
archetype_details: |
Details of archetyping used on this node. |
||
feeder_audit: |
Audit trail from non-openEHR system of original commit of information forming the content of this node, or from a conversion gateway which has synthesised this node. |
||
Functions |
|||
Value equality. |
|||
Reference equality. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in "Interval<Time>". |
|||
parent (): |
Parent of this node in a compositional hierarchy. |
||
item_at_path ( |
The item at a path (relative to this item); only valid for unique paths, i.e. paths that resolve to a single item. |
||
List of items corresponding to a non-unique path. |
|||
path_exists ( |
True if the path exists in the data with respect to the current item. |
||
path_unique ( |
True if the path corresponds to a single item in the data. |
||
The path to an item relative to the root of this archetyped structure. |
|||
concept (): |
Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node) |
||
is_archetype_root (): |
True if this node is the root of an archetyped structure. |
||
as_hierarchy (): |
Hierarchical equivalent of the physical representation of each subtype, compatible with CEN EN 13606 structures. |
||
Invariants |
|||
Links_valid: |
|||
Archetyped_valid: |
|||
Archetype_node_id_valid: |
|||
{
"name": "ITEM_STRUCTURE",
"documentation": "Abstract parent class of all spatial data types. ",
"is_abstract": true,
"ancestors": [
"DATA_STRUCTURE"
]
}
ITEM_SINGLE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
ITEM_SINGLE |
|
|---|---|---|
Description |
Logical single value data structure. Used to represent any data which is logically a single value, such as a person’s height or weight. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
item: |
|
Functions |
Signature |
Meaning |
1..1 |
as_hierarchy (): |
Generate a CEN EN13606-compatible hierarchy consisting of a single |
| ITEM_SINGLE | |||
|---|---|---|---|
Logical single value data structure. Used to represent any data which is logically a single value, such as a person’s height or weight. |
|||
Inherits: Any, PATHABLE, LOCATABLE, DATA_STRUCTURE, ITEM_STRUCTURE |
|||
Attributes |
|||
name: |
Runtime name of this fragment, used to build runtime paths. This is the term provided via a clinical application or batch process to name this EHR construct: its retention in the EHR faithfully preserves the original label by which this entry was known to end users. |
||
archetype_node_id: |
Design-time archetype id of this node taken from its generating archetype; used to build archetype paths. Always in the form of an at code, e.g. at0005 . This value enables a "standardised" name for this node to be generated, by referring to the generating archetype local ontology. At an archetype root point, the value of this attribute is always the stringified form of the archetype_id found in the archetype_details object. |
||
uid: |
Optional globally unique object identifier for root points of archetyped structures. |
||
Links to other archetyped structures (data whose root object inherits from ARCHETYPED, such as ENTRY, SECTION and so on). Links may be to structures in other compositions. |
|||
archetype_details: |
Details of archetyping used on this node. |
||
feeder_audit: |
Audit trail from non-openEHR system of original commit of information forming the content of this node, or from a conversion gateway which has synthesised this node. |
||
item: |
|||
Functions |
|||
Value equality. |
|||
Reference equality. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in "Interval<Time>". |
|||
parent (): |
Parent of this node in a compositional hierarchy. |
||
item_at_path ( |
The item at a path (relative to this item); only valid for unique paths, i.e. paths that resolve to a single item. |
||
List of items corresponding to a non-unique path. |
|||
path_exists ( |
True if the path exists in the data with respect to the current item. |
||
path_unique ( |
True if the path corresponds to a single item in the data. |
||
The path to an item relative to the root of this archetyped structure. |
|||
concept (): |
Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node) |
||
is_archetype_root (): |
True if this node is the root of an archetyped structure. |
||
as_hierarchy (): |
Generate a CEN EN13606-compatible hierarchy consisting of a single |
||
Invariants |
|||
Links_valid: |
|||
Archetyped_valid: |
|||
Archetype_node_id_valid: |
|||
{
"name": "ITEM_SINGLE",
"documentation": "Logical single value data structure. Used to represent any data which is logically a single value, such as a person's height or weight.",
"ancestors": [
"ITEM_STRUCTURE"
],
"properties": {
"item": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "item",
"is_mandatory": true,
"type": "ELEMENT"
}
},
"functions": {
"as_hierarchy": {
"name": "as_hierarchy",
"documentation": "Generate a CEN EN13606-compatible hierarchy consisting of a single `ELEMENT`.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "ELEMENT"
}
}
}
}
ITEM_LIST Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
ITEM_LIST |
|
|---|---|---|
Description |
Logical list data structure, where each item has a value and can be referred to by a name and a positional index in the list. The list may be empty. Use Used to represent any data which is logically a list of values, such as blood pressure, most protocols, many blood tests etc. Misuse: Not to be used for time-based lists, which should be represented with the proper temporal class, i.e. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
Physical representation of the list. |
|
Functions |
Signature |
Meaning |
1..1 |
item_count (): |
Count of all items. |
0..1 |
Retrieve the names of all items. |
|
1..1 |
Retrieve the item with name ‘a_name’. |
|
1..1 |
Retrieve the i-th item with name. |
|
1..1 |
as_hierarchy (): |
Generate a CEN EN13606-compatible hierarchy consisting of a single |
Invariants |
Valid_structure: |
|
| ITEM_LIST | |||
|---|---|---|---|
Logical list data structure, where each item has a value and can be referred to by a name and a positional index in the list. The list may be empty. Use Used to represent any data which is logically a list of values, such as blood pressure, most protocols, many blood tests etc. Misuse: Not to be used for time-based lists, which should be represented with the proper temporal class, i.e. |
|||
Inherits: Any, PATHABLE, LOCATABLE, DATA_STRUCTURE, ITEM_STRUCTURE |
|||
Attributes |
|||
name: |
Runtime name of this fragment, used to build runtime paths. This is the term provided via a clinical application or batch process to name this EHR construct: its retention in the EHR faithfully preserves the original label by which this entry was known to end users. |
||
archetype_node_id: |
Design-time archetype id of this node taken from its generating archetype; used to build archetype paths. Always in the form of an at code, e.g. at0005 . This value enables a "standardised" name for this node to be generated, by referring to the generating archetype local ontology. At an archetype root point, the value of this attribute is always the stringified form of the archetype_id found in the archetype_details object. |
||
uid: |
Optional globally unique object identifier for root points of archetyped structures. |
||
Links to other archetyped structures (data whose root object inherits from ARCHETYPED, such as ENTRY, SECTION and so on). Links may be to structures in other compositions. |
|||
archetype_details: |
Details of archetyping used on this node. |
||
feeder_audit: |
Audit trail from non-openEHR system of original commit of information forming the content of this node, or from a conversion gateway which has synthesised this node. |
||
Physical representation of the list. |
|||
Functions |
|||
Value equality. |
|||
Reference equality. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in "Interval<Time>". |
|||
parent (): |
Parent of this node in a compositional hierarchy. |
||
item_at_path ( |
The item at a path (relative to this item); only valid for unique paths, i.e. paths that resolve to a single item. |
||
List of items corresponding to a non-unique path. |
|||
path_exists ( |
True if the path exists in the data with respect to the current item. |
||
path_unique ( |
True if the path corresponds to a single item in the data. |
||
The path to an item relative to the root of this archetyped structure. |
|||
concept (): |
Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node) |
||
is_archetype_root (): |
True if this node is the root of an archetyped structure. |
||
as_hierarchy (): |
Generate a CEN EN13606-compatible hierarchy consisting of a single |
||
item_count (): |
Count of all items. |
||
Retrieve the names of all items. |
|||
Retrieve the item with name ‘a_name’. |
|||
Retrieve the i-th item with name. |
|||
Invariants |
|||
Links_valid: |
|||
Archetyped_valid: |
|||
Archetype_node_id_valid: |
|||
Valid_structure: |
|||
{
"name": "ITEM_LIST",
"documentation": "Logical list data structure, where each item has a value and can be referred to by a name and a positional index in the list. The list may be empty. Use Used to represent any data which is logically a list of values, such as blood pressure, most protocols, many blood tests etc. \n\nMisuse: Not to be used for time-based lists, which should be represented with the proper temporal class, i.e. `HISTORY`.",
"ancestors": [
"ITEM_STRUCTURE"
],
"properties": {
"items": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "items",
"documentation": "Physical representation of the list. ",
"type_def": {
"container_type": "List",
"type": "ELEMENT"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"item_count": {
"name": "item_count",
"documentation": "Count of all items.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Integer"
}
},
"names": {
"name": "names",
"documentation": "Retrieve the names of all items.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "DV_TEXT"
},
"is_nullable": true
},
"named_item": {
"name": "named_item",
"documentation": "Retrieve the item with name ‘a_name’.",
"parameters": {
"a_name": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_name",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "ELEMENT"
}
},
"ith_item": {
"name": "ith_item",
"documentation": "Retrieve the i-th item with name.",
"parameters": {
"i": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "i",
"type": "Integer"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "ELEMENT"
}
},
"as_hierarchy": {
"name": "as_hierarchy",
"documentation": "Generate a CEN EN13606-compatible hierarchy consisting of a single `CLUSTER` containing the `ELEMENTs` of this list.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "CLUSTER"
}
}
},
"invariants": {
"Valid_structure": " items.forall (i:ITEM | i.type = \"ELEMENT\")"
}
}
ITEM_TABLE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
ITEM_TABLE |
|
|---|---|---|
Description |
Logical relational database style table data structure, in which columns are named and ordered with respect to each other. Implemented using Cluster-per-row encoding. Each row Cluster must have an identical number of Elements, each of which in turn must have identical names and value types in the corresponding positions in each row. Some columns may be designated key' columns, containing key data for each row, in the manner of relational tables. This allows row-naming, where each row represents a body site, a blood antigen etc. All values in a column have the same data type. Used for representing any data which is logically a table of values, such as blood pressure, most protocols, many blood tests etc. Misuse: Not to be used for time-based data, which should be represented with the temporal class |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
Physical representation of the table as a list of |
|
Functions |
Signature |
Meaning |
1..1 |
row_count (): |
Number of rows in the table. |
1..1 |
column_count (): |
Return number of columns in the table. |
0..1 |
Return set of row names. |
|
0..1 |
Return set of column names. |
|
1..1 |
Return i-th row. |
|
1..1 |
Return |
|
1..1 |
Return |
|
1..1 |
Return row with name = |
|
1..1 |
Return |
|
1..1 |
Return rows with particular keys. |
|
1..1 |
Return cell at a particular location. |
|
1..1 |
as_hierarchy (): |
Generate a CEN EN13606-compatible hierarchy consisting of a single |
Invariants |
Valid_structure: |
|
| ITEM_TABLE | |||
|---|---|---|---|
Logical relational database style table data structure, in which columns are named and ordered with respect to each other. Implemented using Cluster-per-row encoding. Each row Cluster must have an identical number of Elements, each of which in turn must have identical names and value types in the corresponding positions in each row. Some columns may be designated key' columns, containing key data for each row, in the manner of relational tables. This allows row-naming, where each row represents a body site, a blood antigen etc. All values in a column have the same data type. Used for representing any data which is logically a table of values, such as blood pressure, most protocols, many blood tests etc. Misuse: Not to be used for time-based data, which should be represented with the temporal class |
|||
Inherits: Any, PATHABLE, LOCATABLE, DATA_STRUCTURE, ITEM_STRUCTURE |
|||
Attributes |
|||
name: |
Runtime name of this fragment, used to build runtime paths. This is the term provided via a clinical application or batch process to name this EHR construct: its retention in the EHR faithfully preserves the original label by which this entry was known to end users. |
||
archetype_node_id: |
Design-time archetype id of this node taken from its generating archetype; used to build archetype paths. Always in the form of an at code, e.g. at0005 . This value enables a "standardised" name for this node to be generated, by referring to the generating archetype local ontology. At an archetype root point, the value of this attribute is always the stringified form of the archetype_id found in the archetype_details object. |
||
uid: |
Optional globally unique object identifier for root points of archetyped structures. |
||
Links to other archetyped structures (data whose root object inherits from ARCHETYPED, such as ENTRY, SECTION and so on). Links may be to structures in other compositions. |
|||
archetype_details: |
Details of archetyping used on this node. |
||
feeder_audit: |
Audit trail from non-openEHR system of original commit of information forming the content of this node, or from a conversion gateway which has synthesised this node. |
||
Physical representation of the table as a list of |
|||
Functions |
|||
Value equality. |
|||
Reference equality. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in "Interval<Time>". |
|||
parent (): |
Parent of this node in a compositional hierarchy. |
||
item_at_path ( |
The item at a path (relative to this item); only valid for unique paths, i.e. paths that resolve to a single item. |
||
List of items corresponding to a non-unique path. |
|||
path_exists ( |
True if the path exists in the data with respect to the current item. |
||
path_unique ( |
True if the path corresponds to a single item in the data. |
||
The path to an item relative to the root of this archetyped structure. |
|||
concept (): |
Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node) |
||
is_archetype_root (): |
True if this node is the root of an archetyped structure. |
||
as_hierarchy (): |
Generate a CEN EN13606-compatible hierarchy consisting of a single |
||
row_count (): |
Number of rows in the table. |
||
column_count (): |
Return number of columns in the table. |
||
Return set of row names. |
|||
Return set of column names. |
|||
Return i-th row. |
|||
Return |
|||
Return |
|||
Return row with name = |
|||
Return |
|||
Return rows with particular keys. |
|||
element_at_cell_ij ( |
Return cell at a particular location. |
||
Invariants |
|||
Links_valid: |
|||
Archetyped_valid: |
|||
Archetype_node_id_valid: |
|||
Valid_structure: |
|||
{
"name": "ITEM_TABLE",
"documentation": "Logical relational database style table data structure, in which columns are named and ordered with respect to each other. Implemented using Cluster-per-row encoding. Each row Cluster must have an identical number of Elements, each of which in turn must have identical names and value types in the corresponding positions in each row. \n\nSome columns may be designated key' columns, containing key data for each row, in the manner of relational tables. This allows row-naming, where each row represents a body site, a blood antigen etc. All values in a column have the same data type. \n\nUsed for representing any data which is logically a table of values, such as blood pressure, most protocols, many blood tests etc. \n\nMisuse: Not to be used for time-based data, which should be represented with the temporal class `HISTORY`. The table may be empty. ",
"ancestors": [
"ITEM_STRUCTURE"
],
"properties": {
"rows": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "rows",
"documentation": "Physical representation of the table as a list of `CLUSTERs`, each containing the data of one row of the table. ",
"type_def": {
"container_type": "List",
"type": "CLUSTER"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"row_count": {
"name": "row_count",
"documentation": "Number of rows in the table.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Integer"
}
},
"column_count": {
"name": "column_count",
"documentation": "Return number of columns in the table.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Integer"
}
},
"row_names": {
"name": "row_names",
"documentation": "Return set of row names.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "DV_TEXT"
},
"is_nullable": true
},
"column_names": {
"name": "column_names",
"documentation": "Return set of column names.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "DV_TEXT"
},
"is_nullable": true
},
"ith_row": {
"name": "ith_row",
"documentation": "Return i-th row.",
"parameters": {
"i": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "i",
"type": "Integer"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "CLUSTER"
}
},
"has_row_with_name": {
"name": "has_row_with_name",
"documentation": "Return `True` if there is a column with name = `_a_key_`.",
"parameters": {
"a_key": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_key",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"has_column_with_name": {
"name": "has_column_with_name",
"documentation": "Return `True` if there is a column with name = `_a_key_`.",
"parameters": {
"a_key": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_key",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"named_row": {
"name": "named_row",
"documentation": "Return row with name = `_a_key_`.",
"parameters": {
"a_key": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_key",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "CLUSTER"
}
},
"has_row_with_key": {
"name": "has_row_with_key",
"documentation": "Return `True` if there is a row with key `_keys_`.",
"parameters": {
"keys": {
"_type": "P_BMM_CONTAINER_FUNCTION_PARAMETER",
"name": "keys",
"is_nullable": true,
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"row_with_key": {
"name": "row_with_key",
"documentation": "Return rows with particular keys.",
"parameters": {
"keys": {
"_type": "P_BMM_CONTAINER_FUNCTION_PARAMETER",
"name": "keys",
"is_nullable": true,
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "CLUSTER"
}
},
"element_at_cell_ij": {
"name": "element_at_cell_ij",
"documentation": "Return cell at a particular location.",
"parameters": {
"i": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "i",
"type": "Any"
},
"j": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "j",
"type": "Integer"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "ELEMENT"
}
},
"as_hierarchy": {
"name": "as_hierarchy",
"documentation": "Generate a CEN EN13606-compatible hierarchy consisting of a single `CLUSTER` containing the `CLUSTERs` representing the columns of this table. ",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "CLUSTER"
}
}
},
"invariants": {
"Valid_structure": "rows.for_all (items.for_all (instance_of (\"ELEMENT\")))"
}
}
ITEM_TREE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
ITEM_TREE |
|
|---|---|---|
Description |
Logical tree data structure. The tree may be empty. Used for representing data which are logically a tree such as audiology results, microbiology results, biochemistry results. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
The items comprising the |
|
Functions |
Signature |
Meaning |
1..1 |
True if path a_path' is a valid leaf path. |
|
1..1 |
Return the leaf element at the path a_path'. |
|
1..1 |
as_hierarchy (): |
Generate a CEN EN13606-compatible hierarchy, which is the same as the tree’s physical representation. |
| ITEM_TREE | |||
|---|---|---|---|
Logical tree data structure. The tree may be empty. Used for representing data which are logically a tree such as audiology results, microbiology results, biochemistry results. |
|||
Inherits: Any, PATHABLE, LOCATABLE, DATA_STRUCTURE, ITEM_STRUCTURE |
|||
Attributes |
|||
name: |
Runtime name of this fragment, used to build runtime paths. This is the term provided via a clinical application or batch process to name this EHR construct: its retention in the EHR faithfully preserves the original label by which this entry was known to end users. |
||
archetype_node_id: |
Design-time archetype id of this node taken from its generating archetype; used to build archetype paths. Always in the form of an at code, e.g. at0005 . This value enables a "standardised" name for this node to be generated, by referring to the generating archetype local ontology. At an archetype root point, the value of this attribute is always the stringified form of the archetype_id found in the archetype_details object. |
||
uid: |
Optional globally unique object identifier for root points of archetyped structures. |
||
Links to other archetyped structures (data whose root object inherits from ARCHETYPED, such as ENTRY, SECTION and so on). Links may be to structures in other compositions. |
|||
archetype_details: |
Details of archetyping used on this node. |
||
feeder_audit: |
Audit trail from non-openEHR system of original commit of information forming the content of this node, or from a conversion gateway which has synthesised this node. |
||
The items comprising the |
|||
Functions |
|||
Value equality. |
|||
Reference equality. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in "Interval<Time>". |
|||
parent (): |
Parent of this node in a compositional hierarchy. |
||
item_at_path ( |
The item at a path (relative to this item); only valid for unique paths, i.e. paths that resolve to a single item. |
||
List of items corresponding to a non-unique path. |
|||
path_exists ( |
True if the path exists in the data with respect to the current item. |
||
path_unique ( |
True if the path corresponds to a single item in the data. |
||
The path to an item relative to the root of this archetyped structure. |
|||
concept (): |
Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node) |
||
is_archetype_root (): |
True if this node is the root of an archetyped structure. |
||
as_hierarchy (): |
Generate a CEN EN13606-compatible hierarchy, which is the same as the tree’s physical representation. |
||
True if path a_path' is a valid leaf path. |
|||
Return the leaf element at the path a_path'. |
|||
Invariants |
|||
Links_valid: |
|||
Archetyped_valid: |
|||
Archetype_node_id_valid: |
|||
{
"name": "ITEM_TREE",
"documentation": "Logical tree data structure. The tree may be empty. Used for representing data which are logically a tree such as audiology results, microbiology results, biochemistry results.",
"ancestors": [
"ITEM_STRUCTURE"
],
"properties": {
"items": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "items",
"documentation": "The items comprising the `ITEM_TREE`. Can include 0 or more `CLUSTERs` and/or 0 or more individual `ELEMENTs`.",
"type_def": {
"container_type": "List",
"type": "ITEM"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"has_element_path": {
"name": "has_element_path",
"documentation": "True if path a_path' is a valid leaf path.\n",
"parameters": {
"a_path": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_path",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"element_at_path": {
"name": "element_at_path",
"documentation": "Return the leaf element at the path a_path'.",
"parameters": {
"a_path": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_path",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "ELEMENT"
}
},
"as_hierarchy": {
"name": "as_hierarchy",
"documentation": "Generate a CEN EN13606-compatible hierarchy, which is the same as the tree's physical representation.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "CLUSTER"
}
}
}
}
Instance Structures
ITEM_SINGLE Instance Structure
The figure below illustrates a ITEM_SINGLE instance, in both physical and logical forms.
ITEM_SINGLEITEM_LIST Instance Structure
The following figure illustrates a typical ITEM_LIST structure, in this case for a BP protocol.
ITEM_LISTITEM_TABLE Instance Structure
The next figure illustrates a table of visual acuity test results.
ITEM_TABLEITEM_TREE Instance Structure
The following figure illustrates the logical and concrete forms of an example ITEM_TREE instance, representing a biochemistry result.
ITEM_TREE