The openehr_extract Package
Overview
The rm.extract.openehr_extract package defines an openEHR-specific variant of an
EXTRACT_ITEM, which consists of a form of the VERSIONED_OBJECT<T> class from the rm.common.
change_control package suitable for use in Extracts. The Extract form of the class is
X_VERSIONED_OBJECT<T>, and consists of attributes which replicate functional values from the
EHR form of the class. This class is further subtyped via binding to non-generic types corresponding
to the top-level object types of the openEHR EHR.
The UML diagram below illustrates the rm.extract.openehr_extract package.
The following figure illustrates a typical instance structure of an EHR Extract.
Design
openEHR Extract Item
Items from an openEHR sytem included in an EHR Extract are always top-level objects (Composition,
Directory, EHR_EXTRACT, PARTY, etc, and descendants) are expressed in the serialisable form of
descendants of X_VERSIONED_OBJECT<T>. This type provides a standard interoperable way to serialise all or part of VERSIONED_OBJECTs for lossless transmission between systems, regardless of the
likely implementation differences in versioning at each end. Accordingly, X_VERSIONED_OBJECT
turns most functional properties of VERSIONED_OBJECT into data attributes. The two attributes of
most interest are revision_history, which enables the optional inclusion of the complete revision history
from the original VERSIONED_OBJECT, and versions, which allows any or all of the versions to
be included form the original. The revision history can be requested on its own using by setting the
includes_data flag of the version specification to False.
In most scenarios, versions will be included, and revision_history excluded. Each item in
X_VERSIONED_OBJECT.versions consists of a wrapped copy of an ORIGINAL_VERSION from the
corresponding VERSIONED_OBJECT object in the source system.
EHR Extract Structure
The overall structure of the openEHR EHR for a subject can be replicated with an archetyped Folder structure that creates the groupings of directory, compositions, ehr_access, and ehr_status that are found in an openEHR EHR. This use of folders is not mandatory, but is likely to be useful in most cases, and is the structure shown in Typical EHR Extract structure above.
Demographic Referencing
Within the content an EHR Extract, wherever PARTICIPATION and PARTY_PROXY structures occur
(for the latter, the PARTY_SELF and PARTY_IDENTIFIED descendants), they are preserved intact,
for reasons of fidelity. However, the final 'pointer', i.e. the OBJECT_ID.value may be rewritten
within the Extract to correctly refer to the intended demographic. A typical S_PARTICIPATION
structure is illustrated at the bottom of Typical EHR Extract structure. In this figure, the OBJECT_ID.value has been
rewritten to refer to the uid (11111111) of the first OPENEHR_CONTENT_ITEM object shown in the figure.
Class Descriptions
OPENEHR_CONTENT_ITEM Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
OPENEHR_CONTENT_ITEM |
|
|---|---|---|
Description |
Form of |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
item: |
Content object. |
| OPENEHR_CONTENT_ITEM | |||
|---|---|---|---|
Form of |
|||
Inherits: Any, PATHABLE, LOCATABLE, EXTRACT_ITEM, EXTRACT_CONTENT_ITEM |
|||
Attributes |
|||
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. |
|||
Design-time archetype identifier of this node taken from its generating archetype; used to build archetype paths. Always in the form of an at-code, e.g. At an archetype root point, the value of this attribute is always the stringified form of the |
|||
LOCATABLE.uid: |
Optional globally unique object identifier for root points of archetyped structures. |
||
Links to other archetyped structures (data whose root object inherits from |
|||
LOCATABLE.archetype_details: |
Details of archetyping used on this node. |
||
LOCATABLE.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. |
||
EXTRACT_CONTENT_ITEM.is_primary: |
True if the content item carried in this container was part of the primary set for the Extract, i.e. not added due to link-following. |
||
EXTRACT_CONTENT_ITEM.is_changed: |
True if the content item carried in this container is any kind of change since last send, in repeat sending situations. |
||
EXTRACT_CONTENT_ITEM.is_masked: |
True if the content of this item has not been included due to insufficient access rights of requestor. |
||
item: |
Content object. |
||
Functions |
|||
Value equality: return True if Parameters
|
|||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
Parent of this node in a compositional hierarchy. |
|||
PATHABLE.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. |
||
PATHABLE.items_at_path ( |
List of items corresponding to a non-unique path. |
||
PATHABLE.path_exists ( |
True if the path exists in the data with respect to the current item. |
||
PATHABLE.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. |
|||
Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node) |
|||
True if this node is the root of an archetyped structure. |
|||
Invariants |
|||
LOCATABLE.Links_valid: |
|||
LOCATABLE.Archetyped_valid: |
|||
LOCATABLE.Archetype_node_id_valid: |
|||
EXTRACT_CONTENT_ITEM.Item_validity: |
|||
{
"name": "OPENEHR_CONTENT_ITEM",
"documentation": "Form of `EHR EXTRACT_ITEM` containing openEHR serialised `VERSIONED_OBJECTs`.",
"ancestors": [
"EXTRACT_CONTENT_ITEM"
],
"properties": {
"item": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "item",
"documentation": "Content object.",
"type": "X_VERSIONED_OBJECT"
}
}
}
X_VERSIONED_OBJECT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
X_VERSIONED_OBJECT<T> |
|
|---|---|---|
Description |
Variety of Extract content that consists is a sharable data-oriented version of |
|
Attributes |
Signature |
Meaning |
1..1 |
uid: |
Uid of original |
1..1 |
owner_id: |
Owner_id from original |
1..1 |
time_created: |
Creation time of original |
1..1 |
total_version_count: |
Total number of versions in original |
1..1 |
extract_version_count: |
The number of Versions in this extract for this Versioned object, i.e. the count of items in the versions attribute. May be 0 if only revision history is requested. |
0..1 |
revision_history: |
Optional revision history of the original |
0..1 |
versions: |
0 or more Versions from the original |
| X_VERSIONED_OBJECT<T> | |
|---|---|
Variety of Extract content that consists is a sharable data-oriented version of |
|
Attributes |
|
uid: |
Uid of original |
owner_id: |
Owner_id from original |
time_created: |
Creation time of original |
total_version_count: |
Total number of versions in original |
extract_version_count: |
The number of Versions in this extract for this Versioned object, i.e. the count of items in the versions attribute. May be 0 if only revision history is requested. |
revision_history: |
Optional revision history of the original |
versions: |
0 or more Versions from the original |
{
"name": "X_VERSIONED_OBJECT",
"documentation": "Variety of Extract content that consists is a sharable data-oriented version of `VERSIONED_OBJECT<T>`.",
"generic_parameter_defs": {
"T": {
"name": "T"
}
},
"properties": {
"uid": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "uid",
"documentation": "Uid of original `VERSIONED_OBJECT`.",
"is_mandatory": true,
"type": "HIER_OBJECT_ID"
},
"owner_id": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "owner_id",
"documentation": "Owner_id from original `VERSIONED_OBJECT`, which identifies source EHR.",
"is_mandatory": true,
"type": "OBJECT_REF"
},
"time_created": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "time_created",
"documentation": "Creation time of original `VERSIONED_OBJECT`.",
"is_mandatory": true,
"type": "DV_DATE_TIME"
},
"total_version_count": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "total_version_count",
"documentation": "Total number of versions in original `VERSIONED_OBJECT` at time of creation of this `X_VERSIONED_OBJECT`.",
"is_mandatory": true,
"type": "Integer"
},
"extract_version_count": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "extract_version_count",
"documentation": "The number of Versions in this extract for this Versioned object, i.e. the count of items in the versions attribute. May be 0 if only revision history is requested.",
"is_mandatory": true,
"type": "Integer"
},
"revision_history": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "revision_history",
"documentation": "Optional revision history of the original `VERSIONED_OBJECT`. If included, it is the complete revision history.",
"type": "REVISION_HISTORY"
},
"versions": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "versions",
"documentation": "0 or more Versions from the original `VERSIONED_OBJECT`, according to the Extract specification.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "ORIGINAL_VERSION",
"generic_parameters": [
"T"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
}
}
X_VERSIONED_EHR_ACCESS Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
X_VERSIONED_EHR_ACCESS |
|
|---|---|---|
Description |
Form of |
|
Inherit |
||
| X_VERSIONED_EHR_ACCESS | |
|---|---|
Form of |
|
Inherits: X_VERSIONED_OBJECT |
|
Attributes |
|
X_VERSIONED_OBJECT.uid: |
Uid of original |
X_VERSIONED_OBJECT.owner_id: |
Owner_id from original |
X_VERSIONED_OBJECT.time_created: |
Creation time of original |
X_VERSIONED_OBJECT.total_version_count: |
Total number of versions in original |
X_VERSIONED_OBJECT.extract_version_count: |
The number of Versions in this extract for this Versioned object, i.e. the count of items in the versions attribute. May be 0 if only revision history is requested. |
X_VERSIONED_OBJECT.revision_history: |
Optional revision history of the original |
X_VERSIONED_OBJECT.versions: |
0 or more Versions from the original |
{
"name": "X_VERSIONED_EHR_ACCESS",
"documentation": "Form of `X_VERSIONED_OBJECT` for `EHR_ACCESS` EHR object.",
"ancestors": [
"X_VERSIONED_OBJECT"
]
}
X_VERSIONED_EHR_STATUS Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
X_VERSIONED_EHR_STATUS |
|
|---|---|---|
Description |
Form of |
|
Inherit |
||
| X_VERSIONED_EHR_STATUS | |
|---|---|
Form of |
|
Inherits: X_VERSIONED_OBJECT |
|
Attributes |
|
X_VERSIONED_OBJECT.uid: |
Uid of original |
X_VERSIONED_OBJECT.owner_id: |
Owner_id from original |
X_VERSIONED_OBJECT.time_created: |
Creation time of original |
X_VERSIONED_OBJECT.total_version_count: |
Total number of versions in original |
X_VERSIONED_OBJECT.extract_version_count: |
The number of Versions in this extract for this Versioned object, i.e. the count of items in the versions attribute. May be 0 if only revision history is requested. |
X_VERSIONED_OBJECT.revision_history: |
Optional revision history of the original |
X_VERSIONED_OBJECT.versions: |
0 or more Versions from the original |
{
"name": "X_VERSIONED_EHR_STATUS",
"documentation": "Form of `X_VERSIONED_OBJECT` for `EHR_STATUS` EHR object.",
"ancestors": [
"X_VERSIONED_OBJECT"
]
}
X_VERSIONED_COMPOSITION Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
X_VERSIONED_COMPOSITION |
|
|---|---|---|
Description |
Form of |
|
Inherit |
||
| X_VERSIONED_COMPOSITION | |
|---|---|
Form of |
|
Inherits: X_VERSIONED_OBJECT |
|
Attributes |
|
X_VERSIONED_OBJECT.uid: |
Uid of original |
X_VERSIONED_OBJECT.owner_id: |
Owner_id from original |
X_VERSIONED_OBJECT.time_created: |
Creation time of original |
X_VERSIONED_OBJECT.total_version_count: |
Total number of versions in original |
X_VERSIONED_OBJECT.extract_version_count: |
The number of Versions in this extract for this Versioned object, i.e. the count of items in the versions attribute. May be 0 if only revision history is requested. |
X_VERSIONED_OBJECT.revision_history: |
Optional revision history of the original |
X_VERSIONED_OBJECT.versions: |
0 or more Versions from the original |
{
"name": "X_VERSIONED_COMPOSITION",
"documentation": "Form of `X_VERSIONED_OBJECT` for `COMPOSITION` EHR object.",
"ancestors": [
"X_VERSIONED_OBJECT"
]
}
X_VERSIONED_FOLDER Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
X_VERSIONED_FOLDER |
|
|---|---|---|
Description |
Form of |
|
Inherit |
||
| X_VERSIONED_FOLDER | |
|---|---|
Form of |
|
Inherits: X_VERSIONED_OBJECT |
|
Attributes |
|
X_VERSIONED_OBJECT.uid: |
Uid of original |
X_VERSIONED_OBJECT.owner_id: |
Owner_id from original |
X_VERSIONED_OBJECT.time_created: |
Creation time of original |
X_VERSIONED_OBJECT.total_version_count: |
Total number of versions in original |
X_VERSIONED_OBJECT.extract_version_count: |
The number of Versions in this extract for this Versioned object, i.e. the count of items in the versions attribute. May be 0 if only revision history is requested. |
X_VERSIONED_OBJECT.revision_history: |
Optional revision history of the original |
X_VERSIONED_OBJECT.versions: |
0 or more Versions from the original |
{
"name": "X_VERSIONED_FOLDER",
"documentation": "Form of `X_VERSIONED_OBJECT` for `FOLDER` EHR object.",
"ancestors": [
"X_VERSIONED_OBJECT"
]
}
X_VERSIONED_PARTY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
X_VERSIONED_PARTY |
|
|---|---|---|
Description |
Form of |
|
Inherit |
||
| X_VERSIONED_PARTY | |
|---|---|
Form of |
|
Inherits: X_VERSIONED_OBJECT |
|
Attributes |
|
X_VERSIONED_OBJECT.uid: |
Uid of original |
X_VERSIONED_OBJECT.owner_id: |
Owner_id from original |
X_VERSIONED_OBJECT.time_created: |
Creation time of original |
X_VERSIONED_OBJECT.total_version_count: |
Total number of versions in original |
X_VERSIONED_OBJECT.extract_version_count: |
The number of Versions in this extract for this Versioned object, i.e. the count of items in the versions attribute. May be 0 if only revision history is requested. |
X_VERSIONED_OBJECT.revision_history: |
Optional revision history of the original |
X_VERSIONED_OBJECT.versions: |
0 or more Versions from the original |
{
"name": "X_VERSIONED_PARTY",
"documentation": "Form of `X_VERSIONED_OBJECT` for `PARTY` demographic object.",
"ancestors": [
"X_VERSIONED_OBJECT"
]
}