Generic_extract Package

Overview

The rm.extract.generic_extract package defines a kind of Extract designed to be used by non-openEHR systems (including EHR/EMR systems) that want to send data to another system using openEHR structures defined by archetypes and templates. Such systems typically do not natively contain standardised data of any kind, and usually have quite variable and idiosyncratic support for versioning. The following UML diagram illustrates the rm.extract.generic_extract package.

RM ehr extract.generic extract
Figure 1. rm.extract.generic_extract Package

The figure below illustrates the instance structure of a typical GENERIC_EXTRACT. The containment structure is shown in blue, and content item wrappers (meta-data) in yellow.

typical generic extract
Figure 2. Typical generic extract structure

Design

Structure

The GENERIC_CONTENT_ITEM subtype of EXTRACT_CONTENT_ITEM defines meta-data more or less of which can be populated by typical legacy systems, as well as document sources such as IHE/XDS repositories. Various groups of meta-data are defined: document type / status information, commit audit details and document lifecycle information.

The document meta-data items are as follows:

  • item_type: a coded term indicating the content 'model' or schema, which may be a published standard, and/or some kind of archetype, template or similar content control artefact;

  • item_type_version: version of the item_type model.

The next group of items defines details of creation of the original information. In some systems, this is the same as 'committal', i.e. the act of creating and committing the original data to the system. In other cases, the information in the extract is being assembled for the first time for the purposes of the extract, and the audit information therefore corresponds to this act. The audit details are as follows:

  • author: identity of the author of the original content - this is a UID reference to a demographic item in another part of the current extract;

  • creation_time: date/time when the content was created;

  • authoriser: identity of a professional who authorised this content, if relevant - this is a UID reference to a demographic item in another part of the current extract;

  • authorisation_time: date/time when the content was authorised;

  • item_status: lifecycle status of the content;

  • version_id: version of this particular instance of the content item when it was created and/or committed, in environments where versioning is supported;

  • version_set_id: 'version set' identifier, i.e. identifier of group of versions which together constitute a set of versions in time of a given logical content item;

  • system_id: system where the content was created / committed to / extracted from;

  • other_details: other meta-data, in the form of a keyed list of Strings.

All of these items are optional, reflecting their varying availability in different source systems. An archetype or template of the Extract may force some or all to be mandatory for specific kinds of Extract.

The item attribute carries content which may be any openEHR LOCATABLE structure, including things like COMPOSITION, any kind of ENTRY including GENERIC_ENTRY, ITEM_TREE, or even CLUSTER. This is assumed to have been converted by some data transformation process from data within the original system.

Demographic Referencing

Within the content a generic Extract, expressed using openEHR COMPOSITIONs, participations are expressed using intances of PARTICIPATION. This is clearly somewhat inefficient for the required use here, since they will be constructed on the fly from simpler non-openEHR data, and a more flexible variant may be required for the future.

To Be Determined: a more efficient participation reference mechanism, to support participations constructed on the fly for the purposes of the Extract.

Class Descriptions

GENERIC_CONTENT_ITEM Class

  • Definition

  • Effective

  • BMM

  • UML

Class

GENERIC_CONTENT_ITEM

Description

Single item in generic extract, designed for 13606 and CDA data.

Inherit

EXTRACT_CONTENT_ITEM

Attributes

Signature

Meaning

0..1

item_type: DV_CODED_TEXT

Identifier of model or schema used to create the content.

0..1

item_type_version: String

Version of model or schema used to create the content item.

0..1

author: String

Reference to a demographic entity elsewhere in this Extract representing the author of the item version. The reference should be a UID corresponding to the UID of a GENERIC_CONTENT_ITEM containing the demographic information.

0..1

creation_time: Iso8601_date_time

Time of creation of this item version on the original system. This may be an earlier commit time, or it may be the time at which the item was created during the Extract generation process.

0..1

authoriser: String

Reference to a demographic entity elsewhere in this Extract representing an authoriser of the item version, if relevant. The reference should be a UID corresponding to the UID of a GENERIC_CONTENT_ITEM containing the demographic information.

0..1

authorisation_time: Iso8601_date_time

Time of authorisation of this item version on the original system where relevant.

0..1

item_status: DV_CODED_TEXT

Coded lifecycle status of the item.

0..1

version_id: String

Version id of this item in original system.

0..1

version_set_id: String

Version set id of this item in original system, where applicable.

0..1

system_id: String

Identifier of EMR or other system from which the item was created / extracted. Typically in the form of a domain name.

0..1

other_details: Hash<String,String>

Other details about the content item.

0..1
(effected)

item: LOCATABLE

Content object.

GENERIC_CONTENT_ITEM

Single item in generic extract, designed for 13606 and CDA data.

Inherits: Any, PATHABLE, LOCATABLE, EXTRACT_ITEM, EXTRACT_CONTENT_ITEM

Attributes

LOCATABLE.name: DV_TEXT [1..1]

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.

LOCATABLE.archetype_node_id: String [1..1]

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. at0005. This value enables a 'standardised' name for this node to be generated, by referring to the generating archetype local terminology.

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.

LOCATABLE.uid: UID_BASED_ID [0..1]

Optional globally unique object identifier for root points of archetyped structures.

LOCATABLE.links: List<LINK> [0..1]

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.

LOCATABLE.archetype_details: ARCHETYPED [0..1]

Details of archetyping used on this node.

LOCATABLE.feeder_audit: FEEDER_AUDIT [0..1]

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: Boolean [1..1]

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: Boolean [0..1]

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: Boolean [0..1]

True if the content of this item has not been included due to insufficient access rights of requestor.

item: LOCATABLE [0..1]

Content object.

item_type: DV_CODED_TEXT [0..1]

Identifier of model or schema used to create the content.

item_type_version: String [0..1]

Version of model or schema used to create the content item.

author: String [0..1]

Reference to a demographic entity elsewhere in this Extract representing the author of the item version. The reference should be a UID corresponding to the UID of a GENERIC_CONTENT_ITEM containing the demographic information.

creation_time: Iso8601_date_time [0..1]

Time of creation of this item version on the original system. This may be an earlier commit time, or it may be the time at which the item was created during the Extract generation process.

authoriser: String [0..1]

Reference to a demographic entity elsewhere in this Extract representing an authoriser of the item version, if relevant. The reference should be a UID corresponding to the UID of a GENERIC_CONTENT_ITEM containing the demographic information.

authorisation_time: Iso8601_date_time [0..1]

Time of authorisation of this item version on the original system where relevant.

item_status: DV_CODED_TEXT [0..1]

Coded lifecycle status of the item.

version_id: String [0..1]

Version id of this item in original system.

version_set_id: String [0..1]

Version set id of this item in original system, where applicable.

system_id: String [0..1]

Identifier of EMR or other system from which the item was created / extracted. Typically in the form of a domain name.

other_details: Hash<String,String> [0..1]

Other details about the content item.

Functions

(abstract) Any.is_equal (
other: Any[1]
): Boolean [1..1]

Value equality: return True if this and other are attached to objects considered to be equal in value.

Parameters
other

Other object for comparison.

Any.equal alias "=", "==" (
other: Any[1]
): Boolean [1..1]

Reference equality for reference types, value equality for value types.

Parameters
other

Other object for comparison.

Any.instance_of (
a_type: String[1]
): Any [1..1]

Create new instance of a type.

Any.type_of (
an_object: Any[1]
): String [1..1]

Type name of an object as a string. May include generic parameters, as in "Interval<Time>".

Any.not_equal alias "!=", "≠" (
other: Ordered[1]
): Boolean [1..1]

True if current object not equal to other. Returns not equal().

PATHABLE.parent (): PATHABLE [1..1]

Parent of this node in a compositional hierarchy.

PATHABLE.item_at_path (
a_path: String[1]
): Any

Pre: path_unique (a_path) [1..1]

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 (
a_path: String[1]
): List<Any> [0..1]

List of items corresponding to a non-unique path.

PATHABLE.path_exists (
a_path: String[1]
): Boolean

Pre: not a_path.is_empty [1..1]

True if the path exists in the data with respect to the current item.

PATHABLE.path_unique (
a_path: String[1]
): Boolean

Pre: path_exists (a_path) [1..1]

True if the path corresponds to a single item in the data.

PATHABLE.path_of_item (
a_loc: PATHABLE[1]
): String [1..1]

The path to an item relative to the root of this archetyped structure.

LOCATABLE.concept (): DV_TEXT [1..1]

Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node)

LOCATABLE.is_archetype_root (): Boolean [1..1]

True if this node is the root of an archetyped structure.

Invariants

LOCATABLE.Links_valid: links /= Void implies not links.is_empty

LOCATABLE.Archetyped_valid: is_archetype_root xor archetype_details = Void

LOCATABLE.Archetype_node_id_valid: not archetype_node_id.is_empty

EXTRACT_CONTENT_ITEM.Item_validity: is_masked xor item /= Void

{
    "name": "GENERIC_CONTENT_ITEM",
    "documentation": "Single item in generic extract, designed for 13606 and CDA data.",
    "ancestors": [
        "EXTRACT_CONTENT_ITEM"
    ],
    "properties": {
        "item_type": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "item_type",
            "documentation": "Identifier of model or schema used to create the content.",
            "type": "DV_CODED_TEXT"
        },
        "item_type_version": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "item_type_version",
            "documentation": "Version of model or schema used to create the content item.",
            "type": "String"
        },
        "author": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "author",
            "documentation": "Reference to a demographic entity elsewhere in this Extract representing the author of the item version. The reference should be a UID corresponding to the UID of a `GENERIC_CONTENT_ITEM` containing the demographic information.",
            "type": "String"
        },
        "creation_time": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "creation_time",
            "documentation": "Time of creation of this item version on the original system. This may be an earlier commit time, or it may be the time at which the item was created during the Extract generation process.",
            "type": "Iso8601_date_time"
        },
        "authoriser": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "authoriser",
            "documentation": "Reference to a demographic entity elsewhere in this Extract representing an authoriser of the item version, if relevant. The reference should be a UID corresponding to the UID of a `GENERIC_CONTENT_ITEM` containing the demographic information.",
            "type": "String"
        },
        "authorisation_time": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "authorisation_time",
            "documentation": "Time of authorisation of this item version on the original system where relevant.",
            "type": "Iso8601_date_time"
        },
        "item_status": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "item_status",
            "documentation": "Coded lifecycle status of the item.",
            "type": "DV_CODED_TEXT"
        },
        "version_id": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "version_id",
            "documentation": "Version id of this item in original system.",
            "type": "String"
        },
        "version_set_id": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "version_set_id",
            "documentation": "Version set id of this item in original system, where applicable.",
            "type": "String"
        },
        "system_id": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "system_id",
            "documentation": "Identifier of EMR or other system from which the item was created / extracted. Typically in the form of a domain name.",
            "type": "String"
        },
        "other_details": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "other_details",
            "documentation": "Other details about the content item.",
            "type_def": {
                "root_type": "Hash",
                "generic_parameters": [
                    "String",
                    "String"
                ]
            }
        },
        "item": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "item",
            "documentation": "Content object.",
            "type": "LOCATABLE"
        }
    }
}
GENERIC_CONTENT_ITEM