openEHR logo

openEHR Simplified Information Model 'B'

Issuer: openEHR Specification Program

Release: SM development

Status: DEVELOPMENT

Revision: [latest_issue]

Date: [latest_issue_date]

Keywords: SIM-B, information model, openEHR

openEHR components
© 2019 - 2024 The openEHR Foundation

The openEHR Foundation is an independent, non-profit foundation, facilitating the sharing of health records by consumers and clinicians via open specifications, clinical models and open platform implementations.

Licence

image Creative Commons Attribution-NoDerivs 3.0 Unported. https://creativecommons.org/licenses/by-nd/3.0/

Support

Issues: Problem Reports
Web: specifications.openEHR.org

Acknowledgements

Primary Author

  • xxxx

Contributors

This specification has benefited from formal and informal input from the openEHR and wider health informatics community. The openEHR Foundation would like to recognise the following people for their contributions.

  • xxxx

Support

A significant part of the content of this specification was adapted from the Better (Marand) 'Web Templates' specification, kindly provided by Marand d.o.o. (Slovenia).

Trademarks

  • 'openEHR' is a registered trademark of the openEHR Foundation

  • 'OMG' and 'UML' are registered trademarks of the Object Management Group

1. Preface

1.1. Purpose

This document describes the Simplified Information Model 'B' (SIM-B) format, a simplified form of the openEHR RM, intended to be used to generate the simplified JSON Data Template (sJDT) format. The SIM-B model is designed to enable easier creation of openEHR content (i.e. Compositions etc).

1.2. Status

This specification is in the DEVELOPMENT state. The development version of this document can be found at https://specifications.openehr.org/releases/SM/development/simplified_im_b.html.

Known omissions or questions are indicated in the text with a 'to be determined' paragraph, as follows:

TBD: (example To Be Determined paragraph)

1.3. Feedback

Feedback may be provided on the technical mailing list.

Issues may be raised on the specifications Problem Report tracker.

To see changes made due to previously reported issues, see the SM component Change Request tracker.

1.4. Conformance

xxx

1.5. Tooling

xxx

2. Overview

The Simplified Information Model (SIM) is a version of the canonical Reference Model and Base Model (RM, BASE components respectively) that contains structurally simpler representations of many class attributes, enabling easier construction of string-oriented serialisations such as JSON, compared to the full canonical structures. The SIM is defined as a set of classes named after a sub-set of RM classes, with S_ prepended; for example, in the SIM, the RM class ELEMENT becomes S_ELEMENT.

Various kinds of simpilifications are used in the SIM classes, including:

  • String representation of some fields that are structured in the RM, e.g CODE_PHRASE.terminology_id is of type TERMINOLOGY_ID but in the SIM, it is a String;

  • replacing fully expressed DV_CODED_TEXT or CODE_PHRASE fields that represent codes from openEHR or other fixed (e.g. IANA media type) vocabularies which are determinable from the openEHR RM, with Strings;

  • compressing fields of some sub-part objects into a parent object in the simplified version, reducing the need for long paths, e.g. S_PARTY_PROXY includes fields from PARTY_PROXY.external_ref, of type PARTY_REF.

The cost of doing the above is that some work has to be done to convert an S_XXX instance into an XXX canonical instance, in some cases, requiring the use of a formal representation of the RM. In openEHR, this is available in the form of a BMM model, as described in the openEHR Basic-Meta Model specification. Additionally, some fields in data have to be parsed with various micro-parsers, e.g. for Date/Time.

The subset of RM classes for which SIM classes are defined is limited to the class COMPOSITION and classes reachable from it, or approximately 45 classes. Almost all simplifications are defined in near-leaf classes such as the S_DATA_VALUE descendants, PARTICIPATION and so on; classes such as S_ENTRY and S_COMPOSITION are largely structured the same way as in the canonical RM, except that sub-parts are of type S_XXX rather than XXX, where the latter is an original RM type. The exception to this is replacement of coded fields whose vocabulary is defined in the RM.

TODO: describe transformation rules representation. This could be formalised into the BMM as a new kind of structure, which would allow formal representation in BMM of transformation rules. At the moment, a few example rules are shown below interspersed within class definitions. In the final form, these rules would be removed to a separate section / source file in either BMM, or some formal language.

The specific transformations between SIM and RM instances are expressed in the tables in the Transformation Rules sub-sections below.

2.1. Simplified IM Package

TODO: we may remove the to_rm() / from_from() approach and just stick with rules.

The following UML diagram shows the top-level simplified_im_b package defining the special interface type S_TYPE.

SM simplified im b
Figure 1. sm.simplified_im_b package

2.1.1. Class Definitions

2.1.1.1. S_TYPE Class

Class

S_TYPE (abstract)

Description

Interface defining routine signatures for Simplified RM classes defining how to convert to and from the corresponding RM class.

Specialised in descendants.

Functions

Signature

Meaning

1..1
(abstract)

to_rm (
rm: BMM_MODEL[1]
): Any

Abstract interface of function to convert data of concrete S_ type to an instance of its RM counterpart.

Implement in concrete descendants.

Parameters
rm

Computable representation of canonical RM, used for lookup of terminology ids, types etc changed from or abstracted out of the SRM.

0..1
(abstract)

from_rm (
a_val: Any[1]
)

Abstract procedure to create an S_ instance from a canonical RM instance.

Implement in concrete descendants.

2.2. Base Model Package

The following UML diagram shows the SIM base package defining S_XXX types corresponding to the Base base package types.

SM simplified im b.base
Figure 2. sm.simplified_im_b.base package

2.2.1. Class Definitions

2.2.1.1. S_OBJECT_REF Class

Class

S_OBJECT_REF

Description

Attributes

Signature

Meaning

0..1

id_namespace: String

Equivalent of OBJECT_REF.namespace.

0..1

id_type: String

Equivalent of OBJECT_REF.type.

1..1

id: S_OBJECT_ID

2.2.1.2. S_OBJECT_ID Class

Class

S_OBJECT_ID

Description

2.2.1.3. S_GENERIC_ID Class

Class

S_GENERIC_ID

Description

Inherit

S_OBJECT_ID

Attributes

Signature

Meaning

1..1

scheme: String

3. SIM-B Data types Package

3.1. Overview

The following UML diagram shows the SIM rm.data_types package defining S_XXX types corresponding to the RM rm.data_types package types.

SM simplified im b.rm.data types
Figure 3. sm.simplified_im_b.rm.data_types package

3.2. Serial Formats

3.2.1. S_DV_TEXT

The following shows the SDT serial formats for an S_DV_TEXT instance:

3.2.1.1. Path structure + terse value form
{
    "a/b/c/d": "anxiety"
}
3.2.1.2. Path structure + regular value form
{
    "a/b/c/d|value": "anxiety"
}
3.2.1.3. Regular structure + regular value form

TBD: are the inner attributes supposed to have bars or not, i.e. "|value" etc?

{
    "a" : {
        "b" : {
            "c": {
                "d" : {
                    "|value": "anxiety"
                }
            }
        }
    }
}
3.2.1.4. Regular structure + terse value form
{
    "a" : {
        "b" : {
            "c": {
                "d" : "anxiety"
            }
        }
    }
}

3.2.2. S_DV_CODED_TEXT

The following shows the SDT serial formats for an S_DV_CODED_TEXT instance:

3.2.2.1. Path structure + terse value form
{
    "a/b/c/d": "snomed_ct::48694002|anxiety|"
}
3.2.2.2. Path structure + regular value form
{
    "a/b/c/d|terminology": "snomed_ct",
    "a/b/c/d|code": "48694002",
    "a/b/c/d|value": "anxiety"
}
3.2.2.3. Regular structure + regular value form

TBD: are the inner attributes supposed to have bars or not, i.e. "|terminology" etc?

{
    "a" : {
        "b" : {
            "c": {
                "d" : {
                    "|terminology": "snomed_ct",
                    "|code": "48694002",
                    "|value": "anxiety"
                }
            }
        }
    }
}
3.2.2.4. Regular structure + terse value form
{
    "a" : {
        "b" : {
            "c": {
                "d" : "snomed_ct::48694002|anxiety|"
            }
        }
    }
}

3.2.3. S_DV_QUANTITY

The following shows the SDT serial formats for an S_DV_QUANTITY instance:

3.2.3.1. Path structure + terse value form
{
    "a/b/c/d": "125 mm[Hg]"
}
3.2.3.2. Path structure + regular value form
{
    "a/b/c/d|magnitude": 125,
    "a/b/c/d|units":    "mm[Hg]",
    "a/b/c/d|xx":       "xx_val", -- other DvQ fields
    "a/b/c/d|yy":       "yy_val"
}
3.2.3.3. Regular structure + regular value form

TBD: are the inner attributes supposed to have bars or not, i.e. "|magnitude" etc?

{
    "a" : {
        "b" : {
            "c": {
                "d" : {
                    "magnitude": 125,
                    "units":     "mm[Hg]",
                    "xx":        "xx_val",
                    "yy":        "yy_val"
                }
            }
        }
    }
}
3.2.3.4. Regular structure + terse value form
{
    "a" : {
        "b" : {
            "c": {
                "d" : "125 mm[Hg]"
            }
        }
    }
}

3.2.4. S_DV_PARSABLE

The following shows the SDT serial formats for an S_DV_PARSABLE instance:

3.2.4.1. Path structure + regular value form
{
    "a/b/c/d|formalism": "markdown",
    "a/b/c/d|value":     "This is some markdown https://somwehere.org[linked text]"
}
3.2.4.2. Regular structure + regular value form
{
    "a" : {
        "b" : {
            "c": {
                "d" : {
                    "formalism": "markdown",
                    "value":     "This is some markdown https://somwehere.org[linked text]"
                }
            }
        }
    }
}

3.3. Class Definitions

3.3.1. S_DATA_VALUE Class

Class

S_DATA_VALUE (abstract)

Description

Simplified RM form of DATA_VALUE RM class.

Inherit

S_TYPE

Functions

Signature

Meaning

1..1
(effected)

to_rm (
rm: BMM_MODEL[1]
): DATA_VALUE

0..1
(effected)

from_rm (
a_val: DATA_VALUE[1]
)

3.3.2. S_DV_IDENTIFIER Class

Class

S_DV_IDENTIFIER

Description

Simplified RM form of DV_IDENTIFIER RM class.

Inherit

DV_IDENTIFIER, S_DATA_VALUE

3.3.3. S_DV_TEXT Class

Class

S_DV_TEXT

Description

Simplified RM form of DV_TEXT RM class.

Inherit

S_DATA_VALUE

Attributes

Signature

Meaning

1..1

value: String

(unchanged from RM)

3.3.4. S_DV_CODED_TEXT Class

Class

S_DV_CODED_TEXT

Description

Simplified RM form of DV_CODED_TEXT RM class.

Inherit

S_DV_TEXT

Attributes

Signature

Meaning

1..1

code: String

Converted from DV_CODED_TEXT.defining_code.code_string.

1..1

terminology: String

Converted from DV_CODED_TEXT.defining_code.terminology_id.

3.3.5. S_CODE_PHRASE Class

Class

S_CODE_PHRASE

Description

Simplified RM form of CODE_PHRASE RM class.

Inherit

S_DATA_VALUE

Attributes

Signature

Meaning

1..1

code: String

Converted from CODE_PHRASE.code_string.

1..1

terminology: String

Converted from CODE_PHRASE.terminology_id.

3.3.6. S_DV_PARSABLE Class

Class

S_DV_PARSABLE

Description

Simplified RM form of DV_PARSABLE RM class.

Inherit

S_DATA_VALUE

Attributes

Signature

Meaning

1..1

value: String

Converted from DV_PARSABLE.value.

1..1

formalism: String

Converted from DV_PARSABLE.formalism.

3.3.7. S_DV_QUANTITY Class

Class

S_DV_QUANTITY

Description

Simplified RM form of DV_QUANTITY RM class.

TODO: define

Inherit

S_DATA_VALUE

3.3.8. S_DV_COUNT Class

Class

S_DV_COUNT

Description

Simplified RM form of DV_COUNT RM class.

TODO: define

Inherit

S_DATA_VALUE

3.3.9. S_DV_PROPORTION Class

Class

S_DV_PROPORTION

Description

Simplified RM form of DV_PROPORTION RM class.

TODO: define

Inherit

S_DATA_VALUE

3.3.10. S_DV_ORDINAL Class

Class

S_DV_ORDINAL

Description

Simplified RM form of DV_ORDINAL RM class.

TODO: define

Inherit

S_DATA_VALUE

4. SIM-B Structures

4.1. Data Structures Package

The following UML diagram shows the SIM rm.data_structures package defining S_XXX types corresponding to the RM rm.data_structures package types.

SM simplified im b.rm.data structures
Figure 4. sm.simplified_im_b.rm.data_structures package

4.1.1. Class Definitions

4.1.1.1. S_EVENT Class

Class

S_EVENT (abstract)

Description

Simplified RM form of EVENT RM class.

Inherit

S_LOCATABLE

Attributes

Signature

Meaning

1..1

time: String

Converted from DV_DATE_TIME.

0..1

state: List<S_ITEM>

Converted from ITEM_TREE.

0..1

data: List<S_ITEM>

Converted from ITEM_TREE.

4.1.1.2. S_POINT_EVENT Class

Class

S_POINT_EVENT

Description

Simplified RM form of POINT_EVENT RM class.

Inherit

S_EVENT

4.1.1.3. S_INTERVAL_EVENT Class

Class

S_INTERVAL_EVENT

Description

Simplified RM form of INTERVAL_EVENT RM class.

Inherit

S_EVENT

Attributes

Signature

Meaning

1..1

width: String

Converted from DV_DURATION.

0..1

sample_count: Integer

(unchanged from RM)

1..1

math_function: String

Converted from DV_CODED_TEXT.

4.1.1.4. S_ITEM Class

Class

S_ITEM (abstract)

Description

Simplified RM form of ITEM RM class.

Inherit

S_LOCATABLE

4.1.1.5. S_CLUSTER Class

Class

S_CLUSTER

Description

Simplified RM form of CLUSTER RM class.

Inherit

S_ITEM

Attributes

Signature

Meaning

0..1

items: List<S_ITEM>

(unchanged from RM)

4.1.1.6. S_ELEMENT Class

Class

S_ELEMENT

Description

Simplified RM form of ELEMENT RM class.

Inherit

S_ITEM

Attributes

Signature

Meaning

0..1

value: S_DATA_VALUE

Contains a converted form of original DATA_VALUE.

0..1

null_flavour: String

Converted from DV_CODED_TEXT.

4.2. Common Package

The following UML diagram shows the SIM rm.common package defining S_XXX types corresponding to the RM rm.common package types.

SM simplified im b.rm.common
Figure 5. sm.simplified_im_b.rm.common package

4.2.1. Class Definitions

4.2.1.1. S_LOCATABLE Class

Class

S_LOCATABLE (abstract)

Description

Simplified RM form of LOCATABLE RM class.

Inherit

S_TYPE

Attributes

Signature

Meaning

1..1

name: S_DV_TEXT

(unchanged from RM)

0..1

links: List<S_LINK>

(unchanged from RM)

0..1

feeder_audit: S_FEEDER_AUDIT

(unchanged from RM)

0..1

archetype_details: S_ARCHETYPED

4.2.1.2. S_ARCHETYPED Class

Class

S_ARCHETYPED

Description

Simplified RM form of ARCHETYPED RM class.

Attributes

Signature

Meaning

1..1

archetype_id: String

Converted from ARCHETYPE_ID.

0..1

template_id: String

Converted from TEMPLATE_ID.

0..1

rm_version: String

(unchanged from RM)

Class

S_LINK

Description

Simplified RM form of LINK RM class.

Inherit

S_TYPE

Attributes

Signature

Meaning

1..1

meaning: String

Converted from LINK.meaning.value.

TODO: what if original was coded?

1..1

type: String

Converted from LINK.type.value.

TODO: what if original was coded?

1..1

target: String

Converted from LINK.target.

4.2.1.4. S_FEEDER_AUDIT Class

Class

S_FEEDER_AUDIT

Description

Simplified RM form of FEEDER_AUDIT RM class.

Inherit

S_TYPE

Attributes

Signature

Meaning

1..1

originating_system_audit: S_FEEDER_AUDIT_DETAILS

Converted from originating_system_audit.

TODO: merge into S_FEEDER_AUDIT?

0..1

original_content: S_DV_PARSABLE

Converted from DV_ENCAPSULATED

TODO: what happens for scanned doc images etc, which are presumably DV_MULTIMEDIA?

0..1

feeder_system_item_id: List<S_DV_IDENTIFIER>

(unchanged from RM)

TODO: Web template attribute name is singular form of name in RM - probably going to be confusing.

0..1

originating_system_item_id: List<S_DV_IDENTIFIER>

(unchanged from RM)

TODO: Web template attribute name is singular form of name in RM - probably going to be confusing.

4.2.1.5. S_FEEDER_AUDIT_DETAILS Class

Class

S_FEEDER_AUDIT_DETAILS

Description

Simplified RM form of FEEDER_AUDIT_DETAILS RM class.

TODO: removes 4 attributes from original RM form - lossy copy?

Attributes

Signature

Meaning

1..1

system_id: String

Converted from FEEDER_AUDIT_DETAILS.system_id.

1..1

version_id: String

Converted from FEEDER_AUDIT_DETAILS.version_id.

4.2.1.6. S_PARTY_PROXY Class

Class

S_PARTY_PROXY

Description

Simplified RM form of PARTY_PROXY RM class.

Inherit

S_TYPE

Attributes

Signature

Meaning

0..1

id: String

Equivalent of PARTY_PROXY.external_ref.id.value

0..1

id_namespace: String

Equivalent of PARTY_PROXY.external_ref.namespace.

0..1

id_scheme: String

Equivalent of PARTY_PROXY.external_ref.id.scheme, if external_ref.id is a GENERIC_ID.

4.2.1.7. S_PARTY_IDENTIFIED Class

Class

S_PARTY_IDENTIFIED

Description

Simplified RM form of PARTY_IDENTIFIED RM class.

TODO: PARTY_IDENTIFIED.identifiers not included.

Inherit

S_PARTY_PROXY

Attributes

Signature

Meaning

1..1

name: String

(unchanged from RM)

4.2.1.8. S_PARTICIPATION Class

Class

S_PARTICIPATION

Description

Simplified RM form of PARTICIPATION RM class, for instances where performer is of type PARTY_SELF.

Inherit

S_TYPE

Attributes

Signature

Meaning

1..1

id: String

Converted from PARTICIPATION.performer.external_ref.id.value.

0..1

mode: String

Converted from PARTICIPATION.mode: DV_CODED_TEXT.

1..1

function: String

Converted from PARTICIPATION.function: DV_TEXT.

4.2.1.9. S_PARTICIPATION_IDENTIFIED Class

Class

S_PARTICIPATION_IDENTIFIED

Description

Simplified RM form of PARTICIPATION RM class, for instances where performer is of type PARTY_IDENTIFIED.

Inherit

S_PARTICIPATION

Attributes

Signature

Meaning

1..1

name: String

Converted from PARTICIPATION.performer.name.

4.3. Composition Package

The following UML diagram shows the top-level SIM rm.composition package defining S_COMPOSITION, S_SECTION and the S_ENTRY types.

SM simplified im b.rm.composition
Figure 6. sm.simplified_im_b.rm.composition package

4.3.1. Class Definitions

4.3.1.1. S_COMPOSITION Class

Class

S_COMPOSITION

Description

Simplified RM form of COMPOSITION RM class.

Inherit

S_LOCATABLE

Attributes

Signature

Meaning

1..1

content: S_CONTENT_ITEM

(unchanged from RM)

1..1

composer: S_PARTY_PROXY

Converted to S_PARTY_PROXY or S_PARTY_IDENTIFIED from PARTY_SELF, PARTY_IDENTIFIED or PARTY_RELATED.

1..1

language: String

Converted from DV_DATE_TIME.

1..1

territory: String

ISO3166-1 country code to be used for composition territory (e.g. "GB", "DE", …).

0..1

category: String

Value of Composition category in String form: "event" or "persistent".

0..1

context: S_EVENT_CONTEXT

4.3.1.2. S_EVENT_CONTEXT Class

Class

S_EVENT_CONTEXT

Description

Simplified RM form of EVENT_CONTEXT RM class.

Inherit

S_TYPE

Attributes

Signature

Meaning

1..1

time: String

Converted from DV_DATE_TIME.

0..1

end_time: String

Converted from DV_DATE_TIME.

0..1

location: String

(unchanged from RM)

0..1

participations: List<S_PARTICIPATION>

(unchanged from RM)

0..1

health_care_facility: S_PARTY_IDENTIFIED

(unchanged from RM)

0..1

setting: String

(unchanged from RM)

0..1

other_context: List<S_ITEM>

Converted from ITEM_STRUCTURE.

4.3.1.3. S_CONTENT_ITEM Class

Class

S_CONTENT_ITEM (abstract)

Description

Simplified RM form of CONTENT_ITEM RM class.

Inherit

S_LOCATABLE

4.3.1.4. S_SECTION Class

Class

S_SECTION

Description

Simplified RM form of SECTION RM class.

Inherit

S_CONTENT_ITEM

Attributes

Signature

Meaning

0..1

items: List<S_CONTENT_ITEM>

(unchanged from RM)

4.3.1.5. S_ENTRY Class

Class

S_ENTRY (abstract)

Description

Simplified RM form of ENTRY RM class.

Inherit

S_CONTENT_ITEM

Attributes

Signature

Meaning

0..1

subject: S_PARTY_PROXY

Converted to S_PARTY_PROXY or S_PARTY_IDENTIFIED from PARTY_SELF, PARTY_IDENTIFIED or PARTY_RELATED.

0..1

provider: S_PARTY_PROXY

Converted to S_PARTY_PROXY or S_PARTY_IDENTIFIED from PARTY_SELF, PARTY_IDENTIFIED or PARTY_RELATED.

0..1

other_participations: List<S_PARTICIPATION>

(unchanged from RM)

4.3.1.6. S_ADMIN_ENTRY Class

Class

S_ADMIN_ENTRY

Description

Simplified RM form of ADMIN_ENTRY RM class.

Inherit

S_ENTRY

Attributes

Signature

Meaning

1..1

data: List<S_ITEM>

Converted from ITEM_STRUCTURE.

4.3.1.7. S_CARE_ENTRY Class

Class

S_CARE_ENTRY (abstract)

Description

Simplified RM form of CARE_ENTRY RM class.

Inherit

S_ENTRY

Attributes

Signature

Meaning

0..1

protocol: List<S_ITEM>

Converted from ITEM_STRUCTURE.

4.3.1.8. S_OBSERVATION Class

Class

S_OBSERVATION

Description

Variant of S_OBSERVATION to use for single sample Observations.

Inherit

S_CARE_ENTRY

Attributes

Signature

Meaning

0..1

data: List<S_EVENT>

Converted from OBSERVATION.data.events[1].

0..1

state: List<S_EVENT>

Converted from OBSERVATION.state.events[1].

0..1

history_origin: String

For multi-event series, converted from OBSERVATION.data.origin.

TODO: should be called data_origin.

0..1

history_period: String

For multi-event series, converted from OBSERVATION.data.period.

TODO: should be called data_period.

0..1

history_summary: List<S_ITEM>

For multi-event series, converted from OBSERVATION.data.summary.

TODO: should be called data_summary.

0..1

history_duration: String

For multi-event series, converted from OBSERVATION.data.duration.

TODO: should be called data_duration.

0..1

state_origin: String

For multi-event series, converted from OBSERVATION.state.origin.

0..1

state_period: String

For multi-event series, converted from OBSERVATION.state.period.

0..1

state_summary: List<S_ITEM>

For multi-event series, converted from OBSERVATION.state.summary.

0..1

state_duration: String

For multi-event series, converted from OBSERVATION.state.duration.

4.3.1.9. S_EVALUATION Class

Class

S_EVALUATION

Description

Simplified RM form of EVALUATION RM class.

Inherit

S_CARE_ENTRY

Attributes

Signature

Meaning

1..1

data: List<S_ITEM>

Converted from ITEM_STRUCTURE.

4.3.1.10. S_INSTRUCTION Class

Class

S_INSTRUCTION

Description

Simplified RM form of INSTRUCTION RM class.

Inherit

S_CARE_ENTRY

Attributes

Signature

Meaning

0..1

narrative: String

Converted from DV_TEXT to String.

0..1

expiry_time: String

Converted from DV_DATE_TIME.

0..1

activities: List<S_ACTIVITY>

(unchanged from RM)

4.3.1.11. S_ACTIVITY Class

Class

S_ACTIVITY

Description

Simplified RM form of ACTIVITY RM class.

Attributes

Signature

Meaning

0..1

timing: String

Converted from DV_PARSABLE.

0..1

action_archetype_id: String

(unchanged from RM)

1..1

description: List<S_ITEM>

Converted from ITEM_STRUCTURE.

4.3.1.12. S_ACTION Class

Class

S_ACTION

Description

Simplified RM form of ACTION RM class.

Inherit

S_CARE_ENTRY

Attributes

Signature

Meaning

1..1

time: String

Converted from DV_DATE_TIME.

1..1

description: List<S_ITEM>

Converted to S_CLUSTER from ITEM_STRUCTURE.

1..1

current_state: String

Converted from ism_transition.current_state: DV_CODED_TEXT to String.

0..1

careflow_step: S_DV_CODED_TEXT

Converted from ism_transition.careflow_step.

0..1

transition: String

Converted from ism_transition.transition: DV_CODED_TEXT to String.

0..1

instruction_id: String

Converted from instruction_details.instruction_id.

0..1

activity_id: String

Converted from instruction_details.activity_id.

4.4. Application Context Model

This section defines an 'application context model' that formalises various defaults and other data settings that enable an openEHR client application to more conveniently create larger data sets (Composition structures) to commit to an openEHR EHR through the openEHR REST API.

SM simplified im b.app context
Figure 7. sm.app_context package

4.4.1. Class Definitions

4.4.2. APP_CONTEXT Class

Class

APP_CONTEXT

Description

Class representing application context data items that may be set for a COMPOSITION commit.

Attributes

Signature

Meaning

1..1

language: String

ISO639-1 language code to be used for Composition language (e.g. "en", "de", …).

Equivalent of RM COMPOSITION.language.

To RM: match term text from openEHR languages vocabulary; create CODE_PHRASE with terminology_id = "openEHR".

From RM: COMPOSITION.language.code_string.

1..1

territory: String

ISO3166-1 country code to be used for composition territory (e.g. "GB", "DE", …).

Equivalent of RM COMPOSITION.territory.

To RM: match term text from openEHR country vocabulary; create CODE_PHRASE with terminology_id = "openEHR".

From RM: COMPOSITION.territory.code_string.

1..1

composer_name: String

Name of the person who composed the Composition.

ISO3166-1 country code to be used for composition territory (e.g. "GB", "DE", …).

Equivalent of RM COMPOSITION.composer.name when composer is a PARTY_IDENTIFIED.

To RM: xxx.

From RM: if COMPOSITION.composer is an instance of PARTY_IDENTIFIED, extract composer.name.

0..1

composer_id: String

Equivalent of COMPOSITION.composer.external_ref.id if PARTY_PROXY.external_ref set.

1..1

time: String

Default value to be used for:

  • COMPOSITION_context.start time_;

  • OBSERVATION.history.origin;

  • OBSERVATION.history.events[i].time.

If not specified current time will be used.

Converted from DV_DATE_TIME.value.

0..1

end_time: String

Equivalent of COMPOSITION.context.end_time.

TODO: check: this is just a copy of /context/end_time?

From RM: copy of DV_DATE_TIME.value.

0..1

category: String

Value of Composition category : "event" or "persistent".

To RM: match term text from category vocabulary; create DV_CODED_TEXT with terminology_id = "openEHR".

From RM: COMPOSITION.setting.defining_code.code_string.

TODO: check: this is just a copy of /category; needed here?

0..1

setting: String

Equivalent to COMPOSITION.setting.

To RM: obtain code definition from openEHR setting vocabulary; create DV_CODED_TEXT.

From RM: COMPOSITION.setting.defining_code.code_string.

TODO: check: this is just a copy of /context/setting; needed here?

TODO: There are 2 new codes in EhrScape ?not in openEHR terminology:

  • 435: laboratory

  • 436: imaging

0..1

history_origin: String

Default value for HISTORY.origin within OBSERVATION.data and state` in the commit.

0..1

id_namespace: String

Default namespace for identifier references derived from OBJECT_REF instances.

0..1

id_scheme: String

Default scheme for all identifiers derived from GENERIC_ID instances.

0..1

provider_name: String

Equivalent of ENTRY.provider.name. where ENTRY.provider is a PARTY_IDENTIFIED.

Default for all ENTRY objects.

0..1

provider_id: String

Equivalent of ENTRY.provider.external_ref.id.

Default for all ENTRY objects.

0..1

participation_name: List<String>

Equivalent of COMPOSITION.context.participations[i].performer.name if PARTICIPATION.performer of type PARTY_IDENTIFIED.

0..1

participation_id: List<String>

Equivalent of COMPOSITION.context.participations[i].performer.external_ref.id if PARTICIPATION.performer.external_ref set.

0..1

participation_function: List<String>

Equivalent of COMPOSITION.context.participations[i].function.

0..1

participation_mode: List<String>

Equivalent of COMPOSITION.context.participations[i].mode.

0..1

participation_identifiers: List<String>

Equivalent of COMPOSITION.context.participations[i].performer.identifiers if PARTICIPATION.performer of type PARTY_IDENTIFIED.

0..1

action_time: String

Default value for all ACTION.time instances.

TODO: is this default really needed - having 2 ACTIONs in same commit probably uncommon. Easier to just include in compressed S_ACTION.

0..1

action_ism_transition_current_state: Integer

Default value for ACTION.ism_transition.current_state.

TODO: is this default really needed - having 2 ACTIONs in same commit probably uncommon. Easier to just include in compressed S_ACTION.

0..1

instruction_narrative: String

Default for all INSTRUCTION.narrative occurrences in commit.

0..1

healthcare_facility: S_PARTY_IDENTIFIED

Equivalent of COMPOSITION.context.health_care_facility.

0..1

activity_timing: String

Default for all INSTRUCTION.activities[i].timing occurrences in commit.

TODO: really needed, since multiple INSTRUCTIONs in commit with same timing would be unlilkely.

0..1

location: String

Equivalent of COMPOSITION.context.location.

0..1

workflow_id: S_OBJECT_REF

Default value for ENTRY.workflow_id.

4.4.3. APP_COMPOSITION Class

Class

APP_COMPOSITION

Description

Specialised form of COMPOSITION that adds application context data items and defaults values to simplify structure of committed content.

Inherit

S_COMPOSITION

Attributes

Signature

Meaning

0..1

ctx: APP_CONTEXT

Context data for this COMPOSITION.

5. Transformation Rules

This section contains rules defining the formal relationship between the SIM-B and the openEHR RM and other models on which it is based.

5.1. Composition Package

RM class RM Path SIM class SIM Path Constraint
conversion
rule

EVENT_CONTEXT

S_EVENT_CONTEXT

(default)

OBSERVATION

data

S_OBSERVATION

collapse()

state

collapse()

data.events

data

(default)

state.events

state

(default)

data.origin

history_origin

(default)

data.period

history_period

(default)

data.duration

history_duration

(default)

data.summary

history_summary

(default)

state.origin

state_origin

(default)

state.period

state_period

(default)

state.duration

state_duration

(default)

state.summary

state_summary

(default)

INSTRUCTION

narrative

S_INSTRUCTION

narrative

create C_STRING from C_TERMINOLOGY_CODE at DV_TEXT.value or DV_CODED_TEXT.defining_code

expiry_time

expiry_time

create C_STRING from C_DATE_TIME

ACTIVITY

timing

S_ACTIVITY

timing

action_archetype_id

action_archetype_id

copy()

ACTION

time

S_ACTION

time

create C_STRING from C_DATE_TIME

ism_transition

collapse()

ism_transition.current_state

current_state

default

ism_transition.careflow_step

careflow_step

ism_transition.transition

transition

default

instruction_id

collapse()

instruction_details.instruction_id

instruction_id

n/a

instruction_details.activity_id

activity_id

copy()

5.2. Common Package

RM class RM Path SIM class SIM Path Constraint
conversion
rule

LINK

meaning.value

S_LINK

meaning

LINK

type.value

S_LINK

type

copy()

PARTY_PROXY

external_ref.id.value

S_PARTY_PROXY

id

copy()

PARTY_PROXY

external_ref.namespace

S_PARTY_PROXY

id_namespace

copy()

PARTY_PROXY

external_ref.id.scheme

S_PARTY_PROXY

id_scheme

if external_ref.id instance_of(GENERIC_ID) then {xxx() }

5.3. Data Structures Package

RM class RM Path SIM class SIM Path Constraint
conversion
rule

EVENT

time

S_EVENT

time

create C_STRING from C_DATE_TIME

EVENT

data

collapse()

EVENT

state

collapse()

EVENT

data.items

S_EVENT

data

EVENT

state.items

S_EVENT

state

INTERVAL_EVENT

width

S_INTERVAL_EVENT

width

INTERVAL_EVENT

sample_count

S_INTERVAL_EVENT

sample_count

INTERVAL_EVENT

math_function

S_INTERVAL_EVENT

math_function

create C_STRING from C_TERMINOLOGY_CODE at defining_code

ITEM_TREE

`

collapse()

ITEM_TREE

items

S_CLUSTER

5.4. RM Data types Package

RM class RM Path SIM class SIM Path Constraint
conversion
rule

DV_TEXT

S_DV_TEXT

DV_TEXT

formatting

skip

DV_TEXT

language

skip

DV_TEXT

encoding

skip

DV_CODED_TEXT

S_DV_CODED_TEXT

DV_CODED_TEXT

defining_code.code_string

S_DV_CODED_TEXT

code

DV_CODED_TEXT

defining_code.terminology_id

S_DV_CODED_TEXT

terminology

CODE_PHRASE

code_string

S_CODE_PHRASE

code

CODE_PHRASE

terminology_id

S_CODE_PHRASE

terminology

DV_CODED_TEXT

String

C_TERMINOLOGY to C_STRING on defining_code

DV_TEXT

String

DV_URI

String

C_TERMINOLOGY to C_STRING

5.5. Simplified IM Package

RM class RM Path SIM class SIM Path Constraint
conversion
rule

OBJECT_REF

namespace

S_OBJECT_REF

id_namespace

OBJECT_REF

type

S_OBJECT_REF

id_type

6. Amendment Record

Issue Details Raiser Completed

SM Release 1.0.0 (unreleased)

0.7.0

SPECSM-2. Add Simplified Information Model 'B' (SIM-B);
Initial writing, adapted from the Marand Better Platform 'Web Templates' specification.

openEHR SEC

17 Jul 2019