Package :: am
Parent Package: am
Package :: archetype
The model of an archetype is straightforward at an abstract level, mimicking the structure of an archetype document as defined in the openEHR Archetype Definition Language
(ADL) document.
An archetype is a modelled as a particular kind of AUTHORED_RESOURCE, and as such, includes descriptive meta-data, language information and revision history.
The ARCHETYPE class adds identifying information, a definition - expressed in terms of constraints on instances of an object model, and an ontology. The archetype definition, the ‘main’ part of an archetype, is an instance of a C_COMPLEX_OBJECT, which is to say, the root of the constraint structure of an archetype always takes the form of a constraint on a non-primitive object type.
The last section of an archetype, the ontology, is represented by its own class, and is what allows the archetypes to be natural language-and terminology-neutral.
A utility class, VALIDITY_KIND is also included in the Archetype package. This class contains one integer attribute and three constant definitions, and is intended to be used as the type of any attribute in this constraint model whose value is logically ‘mandatory’, ‘optional’, or ‘disallowed’. It is used in this model in the classes C_Date, C_Time and C_Date_Time.
Parent Package: archetype
Class ARCHETYPE
AUTHORED_RESOURCE
| +--ARCHETYPE
Archetype equivalent to ARCHETYPED class in Common reference model.
Defines semantics of identfication, lifecycle, versioning, composition and specialisation.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
adl_version : String | 0..1 | -- | | |
archetype_id : ARCHETYPE_ID | 1 | -- | | Multi-axial identifier of this archetype in archetype space. |
concept : String | 1 | -- | | The normative meaning of the archetype as a whole, expressed as a local archetype code,
typically “at0000”. |
parent_archetype_id : ARCHETYPE_ID | 0..1 | -- | | Identifier of the specialisation parent of this archetype. |
uid : HIER_OBJECT_ID | 0..1 | -- | | OID identifier of this archetype. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| definition : C_COMPLEX_OBJECT | 1 | -- | Root node of this archetype |
| ontology : ARCHETYPE_ONTOLOGY | 1 | -- | The ontology of the archetype. |
| invariants : Set<ASSERTION> | 0..1 | * |
|
| Operations |
| Signature | Constraints | Documentation |
concept_name(a_lang : String)
:
String | | The concept name of the archetype in language.
a_lang; corresponds to the term definition of the concept_code attribute in the archetype tology. |
constraint_references_valid()
:
Boolean | | True if every CONSTRAINT_REF.reference found on a C_OBJECT node in the archetype definition is found in ontology. constraint_codes. |
internal_references_valid()
:
Boolean | | True if every ARCHETYPE_INTERNAL_REF. target_path refers to a legitimate node in the archetype definition. |
is_specialised()
:
Boolean | | True if this archetype is a specialisation of another. |
is_valid()
:
Boolean | | True if the archetype is valid overall; various tests should be used, including checks on node_ids, internal references, and constraint references. |
logical_paths(a_lang : String)
:
Set<String> | | Set of language-dependent paths extracted from archetype. Paths obey the same syntax as physical_paths, but with node_ids replaced by their meanings from the ontology. |
node_ids_valid()
:
Boolean | | True if every node_id found on a C_OBJECT node is found in ontology.term_codes. |
physical_paths()
:
Set<String> | | Set of language-independent paths extracted from archetype. Paths obey Xpath-like syntax and are formed from alternations of C_OBJECT.node_id and C_ATTRIBUTE.rm_attribute_name values. |
previous_version()
:
String | | Version of predecessor archetype of this archetype,
if any. |
short_concept_name()
:
String | | The short concept name of the archetype extracted from the archetype_id. |
specialisation_depth()
:
Integer | | Specialisation depth of this archetype; larger than 0 if this archetype has a parent.
Derived from ontology.specialisation_depth. |
version()
:
String | | Version of this archetype, extracted from id. |
| Constraints |
| Name | Expression |
| revision_history_validity | inv: is_controlled implies (revision_history <> Void
and revision_history.is_empty) |
| archetype_id_validity | inv: archetype_id <> Void |
| description_exists | inv: description <> Void |
| ontology_exists | inv: ontology <> Void |
| definition_exists | inv: definition <> Void |
| uid_validity | inv: uid <> Void implies not uid.is_empty |
| original_language_valid | inv: original_language <>void and
language <> Void
and code_set(Code_set_id_languages).has_code(original_language) |
| version_validity | inv:version <> Void and
version.is_equal(archetype_id.version_id) |
| has_parent | post: is_specialised implies parent_archetype_id <>Void |
| invariants_valid | inv: invariants <> Void implies not invariants.is_empty |
| concept_valid | inv: ontology.has_term_code(concept_code) |
| Specialisation_validity | inv: is_specialised implies specialisation_depth > 0 |
Parent Package: archetype
Class VALIDITY_KIND
An enumeration of three values which may commonly occur in constraint models.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
disallowed : Integer | 0..1 | -- | 1003 | Constant to indicate disallowed presence of something |
mandatory : Integer | 0..1 | -- | 1001 | Constant to indicate mandatory presence of something |
optional : Integer | 0..1 | -- | 1002 | Constant to indicate optional presence of something |
value : Integer | 0..1 | -- | | Actual value |
| Operations |
| Signature | Constraints | Documentation |
valid_validity(a_validity : Integer)
:
Boolean |
post: a_validity >= mandatory and
a_validity <= disallowed | Function to test validity values. |
| Constraints |
| Name | Expression |
| Validity | inv: valid_validity(value) |
Parent Package: archetype
Package :: assertion
Assertions are expressed in archetypes in typed first-order predicate logic (FOL). They are used in two places: to express archetype slot constraints, and to express invariants in complex object constraints. In both of these places, their role is to constrain something inside the archetype. Constraints on external resources such as terminologies are expressed in the constraint binding part of the archetype ontology, described in the Ontology Package
The concrete syntax of assertion statements in archetypes is designed to be compatible with the OMG Object Constraint Language (OCL). Archetype assertions are essentially statements that contain the following elements:
• variables, which are attribute names, or ADL paths terminating in attribute names (i.e. equivalent of referencing class feature in a programming language);
• manifest constants of any primitive type, plus date/time types
• arithmetic operators: +, *, -, /, ^ (exponent)
• relational operators: >, <, >=, <=, =, !=, matches
• Boolean operators: not, and, or, xor
• quantifiers applied to container variables: for_all, exists
The package described here is currently designed to allow the representation of a general-purpose binary expression tree, as would be generated by a parser. This may be replaced in the future by a more specific model, if needed.
Parent Package: assertion
Class EXPR_ITEM{Abstract}
Direct Subclassifiers:
EXPR_LEAF, EXPR_OPERATOR
Abstract parent of all expression tree items.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
type : String | 1 | -- | | Type name of this item. For leaf nodes, must be the name of a primitive type, or else a reference model type. The type for any relational or boolean operator will be “BOOLEAN”, while the type for any arithmetic operator, will be “REAL” or “INTEGER” |
| Constraints |
| Name | Expression |
| type_valid | inv: type <> Void and not type.is_empty |
Parent Package: assertion
Class EXPR_LEAF
EXPR_ITEM
| +--EXPR_LEAF
Expression tree leaf item
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
item : Any | 1 | -- | | The value referred to; a manifest constant, an attribute path, or a C_PRIMITIVE. [Future: possibly function names as well, even if not constrained in the archetype - as long as they
are in the reference model]. |
reference_type : String | 1 | -- | | Type of reference: “constant”, “attribute”, “function” |
Parent Package: assertion
Class EXPR_OPERATOR{Abstract}
EXPR_ITEM
| +--EXPR_OPERATOR
Direct Subclassifiers:
EXPR_BINARY_OPERATOR, EXPR_UNARY_OPERATOR
Abstract parent of operator types.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
operator : | 1 | -- | | Code of operator. |
precedence_overridden : Boolean | 0..1 | -- | | True if the natural precedence of operators is overridden in the expression represented by this node of the expression tree. If True, parentheses should be introduced around the totality of the syntax expression corresponding to this operator node and its operands. |
Parent Package: assertion
Class EXPR_UNARY_OPERATOR
EXPR_OPERATOR
| +--EXPR_UNARY_OPERATOR
Unary operator expression node.
| Constraints |
| Name | Expression |
| operand_valid | inv: operand <> Void |
Parent Package: assertion
Class EXPR_BINARY_OPERATOR
EXPR_OPERATOR
| +--EXPR_BINARY_OPERATOR
Binary operator expression node.
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| left_operand : EXPR_ITEM | 1 | -- | Left operand node. |
| right_operand : EXPR_ITEM | 1 | -- | Right operand node. |
| Constraints |
| Name | Expression |
| left_operand_valid | inv: left_operand <> Void |
| right_operand_valid | inv: right_operand <> Void |
Parent Package: assertion
Class ASSERTION_VARIABLE
Definition of a named variable used in an assertion expression. Note: the definition of named variables may change; still under development in ADL2.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
definition : String | 1 | -- | | Formal definition of the variable. (see ADL2 specification; still under development). |
name : String | 1 | -- | | Name of variable. |
| Constraints |
| Name | Expression |
| Definition_valid | inv: definition <> Void and not definition.is_empty |
| Name_valid | inv: name <> Void and not name.is_empty
|
Parent Package: assertion
Class ASSERTION
Structural model of a typed first order predicate logic assertion, in the form of an expression tree, including optional variable definitions.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
string_expression : String | 1 | -- | | String form of expression, in case an expression evaluator taking String expressions is used for evaluation. |
tag : String | 0..1 | -- | | Expression tag, used for differentiating multiple assertions. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| variables : List<ASSERTION_VARIABLE> | 0..1 | 0..* ordered | Definitions of variables used in the assertion expression. |
| expression : EXPR_ITEM | 1 | -- | Root of expression tree. |
| Constraints |
| Name | Expression |
| expression_valid | inv: expression <> Void and
expression.type.is_equal('Boolean') |
| tag_valid | inv: tag <> Void implies not tag.is_empty |
Parent Package: assertion
Class OPERATOR_KIND
Enumeration type for operator types in assertion expressions
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
op_and : Integer | 0..1 | -- | 2011 | And logical operator |
op_divide : Integer | 0..1 | -- | 2023 | Divide operator (‘/’) |
op_eq : Integer | 0..1 | -- | 2001 | Equals operator (‘=’ or ‘==’) |
op_exists : Integer | 0..1 | -- | 2016 | Exists quantifier operator |
op_exp : Integer | 0..1 | -- | 2024 | Exponent operator (‘^’) |
op_for_all : Integer | 0..1 | -- | 2015 | For-all quantifier operator |
op_ge : Integer | 0..1 | -- | 2005 | Greater-than or equals operator (‘>=’) |
op_gt : Integer | 0..1 | -- | 2006 | Greater-than operator (‘>’) |
op_implies : Integer | 0..1 | -- | 2014 | Implies logical operator |
op_le : Integer | 0..1 | -- | 2003 | Less-than or equals operator (‘<=’) |
op_lt : Integer | 0..1 | -- | 2004 | Less-than operator (‘<’) |
op_matches : Integer | 0..1 | -- | 2007 | Matches operator (‘matches’ or ‘is_in’) |
op_minus : Integer | 0..1 | -- | 2021 | Minus operator (‘-’) |
op_multiply : Integer | 0..1 | -- | 2022 | Multiply operator (‘*’) |
op_ne : Integer | 0..1 | -- | 2002 | Not equals operator (‘!=’ or ‘/=’ or ‘<>’) |
op_not : Integer | 0..1 | -- | 2010 | Not logical operator |
op_or : Integer | 0..1 | -- | 2012 | Or logical operator |
op_plus : Integer | 0..1 | -- | 2020 | Plus operator (‘+’) |
op_xor : Integer | 0..1 | -- | 2013 | Xor logical operator |
value : Integer | 0..1 | -- | | Actual value of this instance |
| Operations |
| Signature | Constraints | Documentation |
valid_operator(an_op : Integer)
:
Boolean |
post:an_op >= op_eq and
an_op <= op_exp | Function to test operator values. |
| Constraints |
| Name | Expression |
| validity | inv: valid_operator(value) |
Parent Package: archetype
Package :: constraint_model
The following statements summarise the main features of this package.
Any archetype definition is an instance of a C_COMPLEX_OBJECT, which can be thought of as expressing constraints on a object that is of some particular type (recorded in the attribute rm_type_name ) in a reference model, and which is larger than a simple instance of a primitive type such as String or Integer.
A C_COMPLEX_OBJECT consists of attributes of type C_ATTRIBUTE, which are constraints on the attributes (i.e. any property, including relationships) of the reference model type. Accordingly, each C_ATTRIBUTE records the name of the constrained attribute (in rm_attr_name), the existence and cardinality expressed by the constraint (depending on whether the attribute it constrains is a multiple or single relationship), and the constraint on the object to which this C_ATTRIBUTE refers via its children attribute (according to its reference model) in the form of further C_OBJECTs.
The key subtypes of C_OBJECT, are C_COMPLEX_OBJECT (described above) C_PRIMITIVE_OBJECT (constraints on instances of primitive types such as String, Integer, Boolean and Date).
The other subtypes of C_OBJECT, namely, ARCHETYPE_SLOT, ARCHETYPE_INTERNAL_REF and CONSTRAINT_REF are used to express, respectively, a `slot' where further archetypes can be used to continue describing constraints; a reference to a part of the current archetype that expresses exactly the same constraints needed at another point; and a reference to a constraint on a constraint defined in the archetype ontology, which in turn points to an external knowledge resource, such as a terminology.
All nodes in an archetype constraint structure are instances of the supertype ARCHETYPE_CONSTRAINT, which provides a number of important common features to all nodes.
Parent Package: constraint_model
Class ARCHETYPE_CONSTRAINT{Abstract}
Direct Subclassifiers:
C_ATTRIBUTE, C_OBJECT
Archetype equivalent to LOCATABLE class in openEHR Common reference model. Defines common constraints for any inheritor of LOCATABLE in any reference model.
| Operations |
| Signature | Constraints | Documentation |
has_path(a_path : String)
:
Boolean |
pre: a_path <> Void | True if the relative path a_path exists at this node. |
is_subset_of(other : ARCHETYPE_CONSTRAINT)
:
Boolean |
pre: other <> Void | True if constraints represented by other are narrower than this node. |
is_valid()
:
Boolean | | True if this node (and all its sub-nodes) is a valid archetype node for its type. This function should be implemented by each subtype to perform semantic validation of itself, and then call the is_valid function in any subparts, and generate the result appropriately. |
path()
:
String | | Path of this node relative to root of archetype. |
| Constraints |
| Name | Expression |
| path_exists | inv: path <> Void |
Parent Package: constraint_model
Class C_ATTRIBUTE{Abstract}
ARCHETYPE_CONSTRAINT
| +--C_ATTRIBUTE
Direct Subclassifiers:
C_MULTIPLE_ATTRIBUTE, C_SINGLE_ATTRIBUTE
Abstract model of constraint on any kind of attribute node.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
existence : Interval<Integer> | 1 | -- | | Constraint on every attribute, regardless of whether it is singular or of a container type, which indicates whether its target object exists or not (i.e. is mandatory or not). |
rm_attribute_name : String | 1 | -- | | Reference model attribute within the enclosing type represented by a C_OBJECT . |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| children : Set<C_OBJECT> | 0..1 | * | Child C_OBJECT nodes. Each such node represents a constraint on the type of this attribute in its reference model. Multiples occur both for multiple items in the case of container attributes, and alternatives in the case of singular attributes. |
| Constraints |
| Name | Expression |
| existence_set | inv: existence <> Void and (existence.lower >= 0 and existence.upper <= 1) |
| rm_attribute_name_valid | inv: rm_attribute_name <> Void and not rm_attribute_name.is_empty |
| children_validity | inv: any_allowed xor children <> Void |
Parent Package: constraint_model
Class C_OBJECT{Abstract}
ARCHETYPE_CONSTRAINT
| +--C_OBJECT
Direct Subclassifiers:
C_DEFINED_OBJECT, C_REFERENCE_OBJECT
Abstract model of constraint on any kind of object node.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
node_id : String | 1 | -- | | Semantic id of this node, used to differentiate sibling nodes of the same type. [Previously called `meaning']. Each node_id must be defined in the archetype ontology as a term code. |
occurrences : Interval<Integer> | 1 | -- | | Occurrences of this object node in the data, under the owning attribute. Upper limit can only be greater than 1 if owning attribute has a cardinality of more than 1). |
rm_type_name : String | 1 | -- | | Reference model type that this node corresponds to. |
| Constraints |
| Name | Expression |
| rm_type_name_valid | inv: rm_type_name <> Void and
not node_id.is_empty |
| node_id_valid | inv: node_id <> Void and not node_id.is_empty |
Parent Package: constraint_model
Class CARDINALITY
Expresses constraints on the cardinality of container objects which are the values of multiply-valued attributes, including uniqueness and ordering, providing the means to state that a container acts like a logical list, set or bag. The cardinality cannot contradict the cardinality of the corresponding attribute within the relevant reference model.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
interval : Interval<Integer> | 1 | -- | | The interval (range) of this cardinality. |
is_ordered : Boolean | 1 | -- | | True if the members of the container attribute to which this cardinality refers are ordered. |
is_unique : Boolean | 1 | -- | | True if the members of the container attribute to which this cardinality refers are unique. |
| Operations |
| Signature | Constraints | Documentation |
is_bag()
:
Boolean |
post: is_bag=not is_ordered and not is_unique | True if the semantics of this cardinality represent a set, i.e. unordered, unique membership. |
is_list()
:
Boolean |
post: is_list=is_ordered and not is_unique | True if the semantics of this cardinality represent a list, i.e. ordered, non-unique membership. |
is_set()
:
Boolean |
post: is_set=not is_ordered and is_unique | True if the semantics of this cardinality represent a bag, i.e. unordered, non-unique membership. |
| Constraints |
| Name | Expression |
| validity | inv: not interval.lower_unbounded |
Parent Package: constraint_model
Class CONSTRAINT_REF
C_REFERENCE_OBJECT
| +--CONSTRAINT_REF
Reference to a constraint described in the same archetype, but outside the main constraint structure. This is used to refer to constraints expressed in terms of external resources, such as constraints on terminology value sets.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
reference : String | 1 | -- | | Reference to a constraint in the archetype local ontology. |
| Constraints |
| Name | Expression |
| Consistency | inv: not any_allowed |
| reference_valid | inv: reference <> Void
|
Parent Package: constraint_model
Class ARCHETYPE_INTERNAL_REF
C_REFERENCE_OBJECT
| +--ARCHETYPE_INTERNAL_REF
A constraint defined by proxy, using a reference to an object constraint defined
elsewhere in the same archetype.
Note that since this object refers to another node, there are two objects with available
occurrences values. The local occurrences value on an
ARCHETYPE_INTERNAL_REF should always be used; when setting this from a serialised
form, if no occurrences is mentioned, the target occurrences should be used
(not the standard default of {1..1}); otherwise the locally specified occurrences
should be used as normal. When serialising out, if the occurrences is the same as
that of the target, it can be left out.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
target_path : String | 1 | -- | | Reference to an object node using archetype path notation. |
| Constraints |
| Name | Expression |
| consistency | inv: not any_allowed |
| target_path_valid | inv: target_path <>Void and not target_path.is_empty
and ultimate_root.has_path(target_path)
|
Parent Package: constraint_model
Class ARCHETYPE_SLOT
C_REFERENCE_OBJECT
| +--ARCHETYPE_SLOT
Constraint describing a `slot' where another archetype can occur.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
excludes : List<ASSERTION> | 0..1 | -- | | List of constraints defining other archetypes that cannot be included at this point. |
includes : List<ASSERTION> | 0..1 | -- | | List of constraints defining other archetypes that could be included at this point. |
| Constraints |
| Name | Expression |
| includes_valid | inv: includes <> Void implies not includes.is_empty |
| excludes_valid | inv: excludes <> Void implies not excludes.is_empty |
| validity | inv: any_allowed xor includes <> Void
or excludes <> Void |
Parent Package: constraint_model
Class C_SINGLE_ATTRIBUTE
C_ATTRIBUTE
| +--C_SINGLE_ATTRIBUTE
Concrete model of constraint on a single-valued attribute node. The meaning of the inherited children attribute is that they are alternatives.
| Operations |
| Signature | Constraints | Documentation |
alternatives()
:
List<C_OBJECT> | | List of alternative constraints for the single child of this attribute within the data. |
| Constraints |
| Name | Expression |
| alternatives_exists | inv: alternatives <> Void |
Parent Package: constraint_model
Class C_MULTIPLE_ATTRIBUTE
C_ATTRIBUTE
| +--C_MULTIPLE_ATTRIBUTE
Abstract model of constraint on any kind of attribute node.
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| cardinality : CARDINALITY | 0..1 | -- | Cardinality of this attribute constraint, if it constrains a container attribute. |
| Operations |
| Signature | Constraints | Documentation |
members()
:
List<C_OBJECT> | | List of constraints representing members of the container value of this attribute within the data. Semantics of the uniqueness and ordering of items in the container are given by the cardinality . |
| Constraints |
| Name | Expression |
| members_valid | inv: members <> Void and members->for_all(co: C_OBJECT | co.occurrences.upper <= 1) |
| cardinality_validity | inv: cardinality <> Void |
Parent Package: constraint_model
Class C_DOMAIN_TYPE{Abstract}
C_DEFINED_OBJECT
| +--C_DOMAIN_TYPE
Direct Subclassifiers:
C_DV_STATE, C_DV_ORDINAL, C_DV_QUANTITY, C_CODE_PHRASE
Abstract parent type of domain-specific constrainer types, to be defined in external packages.
| Constraints |
| Name | Expression |
| Assumed_value_valid | inv: has_assumed_value implies valid_value(assumed_value) |
Parent Package: constraint_model
Class C_COMPLEX_OBJECT
C_DEFINED_OBJECT
| +--C_COMPLEX_OBJECT
Constraint on complex objects, i.e. any object that consists of other object constraints.
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| attributes : Set<C_ATTRIBUTE> | 0..1 | * | List of constraints on attributes of the reference model type represented by this object.
|
| invariants : Set<ASSERTION> | 0..1 | 0..* | Invariant statements about this object. Statements are expressed in first order predicate logic, and usually refer to at least two attributes. |
| Constraints |
| Name | Expression |
| attributes_valid | inv: any_allowed xor (attributes <> Void and not
attributes.is_empty) |
Parent Package: constraint_model
Class C_PRIMITIVE_OBJECT
C_DEFINED_OBJECT
| +--C_PRIMITIVE_OBJECT
Constraint on a primitive type.
| Constraints |
| Name | Expression |
| item_exists | inv: any_allowed xor item <> Void |
Parent Package: constraint_model
Class C_DEFINED_OBJECT{Abstract}
C_OBJECT
| +--C_DEFINED_OBJECT
Direct Subclassifiers:
C_DOMAIN_TYPE, C_PRIMITIVE_OBJECT, C_COMPLEX_OBJECT
Abstract parent type of C_OBJECT subtypes that are defined by value, i.e. whosedefinitions are actually in the archetype rather than being by reference.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
assumed_value : Any | 0..1 | -- | | Value to be assumed if none sent in data |
| Operations |
| Signature | Constraints | Documentation |
any_allowed()
:
Boolean | | True if any value (i.e. instance) of the refer-ence model type would be allowed.
Redefined in descendants. |
default_value()
:
Any | | Generate a default value from this constraint object |
has_assumed_value()
:
Boolean | | True if there is an assumed value |
valid_value(a_value : Any)
:
Boolean |
pre: a_value <> Void | True if a_value is valid with respect to con-straint expressed in concrete instance of this type. |
| Constraints |
| Name | Expression |
| Assumed_value_valid | inv: has_assumed_value implies valid_value(assumed_value) |
Parent Package: constraint_model
Class C_REFERENCE_OBJECT{Abstract}
C_OBJECT
| +--C_REFERENCE_OBJECT
Direct Subclassifiers:
ARCHETYPE_SLOT, ARCHETYPE_INTERNAL_REF, CONSTRAINT_REF
Abstract parent type of C_OBJECT subtypes that are defined by reference.
Parent Package: constraint_model
Package :: primitive
Ultimately any archetype definition will devolve down to leaf node constraints on instances of primitive types. The primitives package defines the semantics of constraint on such types. Most of the types provide at least two alternative ways to represent the constraint; for example the C_DATE type allows the constraint to be expressed in the form of a pattern (defined in the ADL specification) or an Interval. Note that the interval form of dates is probably only useful for historical date checking (e.g. the date of an antique or a particular batch of vaccine), rather than constraints on future date/times.
Parent Package: primitive
Class C_STRING
C_PRIMITIVE
| +--C_STRING
Constraint on instances of STRING .
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
assumed_value : String | 0..1 | -- | | The value to assume if this item is not included in data, due to being part of an optional structure. |
list : Set<List<String>> | 0..1 | 0..* | | List of Strings specifying constraint |
list_open : Boolean | 0..1 | -- | | True if the list is being used to specify the constraint but is not considered exhaustive. |
pattern : String | 0..1 | -- | | Regular expression pattern for proposed instances of String to match. |
| Constraints |
| Name | Expression |
| pattern_exists | inv: pattern <> Void implies not pattern.is_empty |
| consistency | inv: pattern <> Void xor list <> Void |
Parent Package: primitive
Class C_BOOLEAN
C_PRIMITIVE
| +--C_BOOLEAN
Constraint on instances of Boolean .
Both attributes cannot be set to False, since this would mean that the Boolean value being constrained cannot be True or False.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
assumed_value : Boolean | 0..1 | -- | | The value to assume if this item is not included in data, due to being part of an optional structure. |
false_valid : Boolean | 1 | -- | | True if the value False is allowed |
true_valid : Boolean | 1 | -- | | True if the value True is allowed |
| Constraints |
| Name | Expression |
| Default_value_consistency | inv: (default_value.value and true_valid) or
(not default_value.value and false_valid) |
| binary_consistency | inv: true_valid or false_valid |
Parent Package: primitive
Class C_DURATION
C_PRIMITIVE
| +--C_DURATION
ISO 8601-compatible constraint on instances of Duration. In ISO 8601 terms, constraints might are of the form “PWD” (weeks and/or days), “PDTHMS” (days, hours, minutes, seconds) and so on. In official ISO 8601:2004, the ‘W’ (week) designator cannot be mixed in; allowing it is an openEHR-wide exception.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
assumed_value : Duration | 0..1 | -- | | The value to assume if this item is not included in data, due to being part of an optional structure. |
days_allowed : Boolean | 0..1 | -- | | True if days are allowed in the constrained Duration. |
fractional_seconds_allowed : Boolean | 0..1 | -- | | True if fractional seconds are allowed in the constrained Duration. |
hours_allowed : Boolean | 0..1 | -- | | True if hours are allowed in the constrained Duration. |
minutes_allowed : Boolean | 0..1 | -- | | True if minutes are allowed in the constrained Duration. |
months_allowed : Boolean | 0..1 | -- | | True if months are allowed in the constrained Duration. |
range : Interval<Duration> | 0..1 | -- | | Constraint on instances of Duration . |
seconds_allowed : Boolean | 0..1 | -- | | True if seconds are allowed in the constrained Duration. |
weeks_allowed : Boolean | 0..1 | -- | | True if weeks are allowed in the constrained Duration. |
years_allowed : Boolean | 0..1 | -- | | True if years are allowed in the constrained Duration |
| Constraints |
| Name | Expression |
| range_valid | inv: range <> Void or (years_allowed or months_allowed or
weeks_allowed or days_allowed or
hours_allowed or minutes_allowed or
seconds_allowed or fractional_seconds_allowed) |
Parent Package: primitive
Class C_DATE_TIME
C_PRIMITIVE
| +--C_DATE_TIME
ISO 8601-compatible constraint on instances of Date_Time. There is no validity flag for ‘year’, since it must always be by definition mandatory in order to have a sensible date/time at all. Syntax expressions of instances of this class include “YYYY-MM-DDT??:??:??” (date/time ith optional time) and “YYYY-MMDDTHH: MM:xx” (date/time, seconds not allowed).
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
assumed_value : Date_Time | 0..1 | -- | | The value to assume if this item is not included in data, due to being part of an optional structure. |
day_validity : VALIDITY_KIND | 0..1 | -- | | Validity of day in constrained date. |
hour_validity : VALIDITY_KIND | 0..1 | -- | | Validity of hour in constrained time. |
millisecond_validity : VALIDITY_KIND | 0..1 | -- | | Validity of millisecond in constrained time. |
minute_validity : VALIDITY_KIND | 0..1 | -- | | Validity of minute in constrained time. |
month_validity : VALIDITY_KIND | 0..1 | -- | | Validity of month in constrained date. |
range : Interval<Date_Time> | 0..1 | -- | | Range of Date_times specifying constraint |
second_validity : VALIDITY_KIND | 0..1 | -- | | Validity of second in constrained time. |
timezone_validity : VALIDITY_KIND | 0..1 | -- | | Validity of timezone in constrained date. |
| Operations |
| Signature | Constraints | Documentation |
validity_is_range()
:
Boolean | | True if validity is in the form of a range; useful for developers to check which kind of constraint has been set. |
| Constraints |
| Name | Expression |
| second_validity_disallowed | inv: second_validity = VALIDITY_KIND.disallowed
implies millisecond_validity = VALIDITY_KIND.disallowed |
| second_validity_optional | inv: second_validity = VALIDITY_KIND.optional implies
(millisecond_validity = VALIDITY_KIND.optional or
millisecond_validity = VALIDITY_KIND.disallowed) |
| minute_validity_optional | inv: minute_validity = VALIDITY_KIND.optional implies
(second_validity = VALIDITY_KIND.optional or second_validity = VALIDITY_KIND.disallowed) |
| minute_validity_disallowed | inv: minute_validity = VALIDITY_KIND.disallowed
implies second_validity = VALIDITY_KIND.disallowed |
| hour_validity_disallowed | inv: hour_validity = VALIDITY_KIND.disallowed
implies minute_validity = VALIDITY_KIND.disallowed |
| day_validity_disallowed | inv: day_validity = VALIDITY_KIND.disallowed implies
hour_validity = VALIDITY_KIND.disallowed |
| month_validity_disallowed | inv: month_validity = VALIDITY_KIND.disallowed
implies day_validity = VALIDITY_KIND.disallowed |
| day_validity_optional | inv: day_validity = VALIDITY_KIND.optional implies
(hour_validity = VALIDITY_KIND.optional or hour_validity =VALIDITY_KIND.disallowed)
|
| hour_validity_optional | inv: hour_validity = VALIDITY_KIND.optional implies
(minute_validity = VALIDITY_KIND.optional or minute_validity = VALIDITY_KIND.disallowed) |
| validity_is_range | inv: validity_is_range = (range <> Void) |
| month_validity_optional | inv: month_validity = VALIDITY_KIND.optional implies
(day_validity = VALIDITY_KIND.optional or
day_validity = VALIDITY_KIND.disallowed)
|
Parent Package: primitive
Class C_INTEGER
C_PRIMITIVE
| +--C_INTEGER
Constraint on instances of Integer .
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
assumed_value : Integer | 0..1 | -- | | The value to assume if this item is not included in data, due to being part of an optional structure. |
list : Set<Integer> | 0..1 | -- | | Set of Integers specifying constraint |
range : Interval<Integer> | 0..1 | -- | | Range of Integers specifying constraint |
| Constraints |
| Name | Expression |
| consistency | inv: list <> Void xor range <> Void |
Parent Package: primitive
Class C_TIME
C_PRIMITIVE
| +--C_TIME
ISO 8601-compatible constraint on instances of Time. There is no validity flag for ‘hour’, since it must always be by definition mandatory in order to have a sensible time at all. Syntax xpressions of instances of this class include “HH:??:xx” (time with optional minutes and seconds not allowed).
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
assumed_value : Time | 0..1 | -- | | The value to assume if this item is not included in data, due to being part of an optional structure. |
millisecond_validity : VALIDITY_KIND | 0..1 | -- | | Validity of millisecond in constrained time. |
minute_validity : VALIDITY_KIND | 0..1 | -- | | Validity of minute in constrained time. |
range : Interval<Time> | 0..1 | -- | | Interval of Times specifying constraint |
second_validity : VALIDITY_KIND | 0..1 | -- | | Validity of second in constrained time. |
timezone_validity : VALIDITY_KIND | 0..1 | -- | | Validity of timezone in constrained date. |
| Operations |
| Signature | Constraints | Documentation |
validity_is_range()
:
Boolean | | True if validity is in the form of a range; useful for developers to check which kind of constraint has been set. |
| Constraints |
| Name | Expression |
| minute_validity_optional | inv: minute_validity = VALIDITY_KIND.optional implies
(second_validity = VALIDITY_KIND.optional or second_validity =
VALIDITY_KIND.disallowed) |
| second_validity_disallowed | inv: second_validity = VALIDITY_KIND.disallowed
implies millisecond_validity = VALIDITY_KIND.disallowed |
| second_validity_optional: | inv: second_validity = VALIDITY_KIND.optional implies
(millisecond_validity = VALIDITY_KIND.optional or
millisecond_validity = VALIDITY_KIND.disallowed) |
| minute_validity_disallowed | inv: minute_validity = VALIDITY_KIND.disallowed
implies second_validity = VALIDITY_KIND.disallowed |
| validity_is_range | inv: validity_is_range = (range <> Void) |
Parent Package: primitive
Class C_REAL
C_PRIMITIVE
| +--C_REAL
Constraint on instances of Real .
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
assumed_value : Real | 0..1 | -- | | The value to assume if this item is not included in data, due to being part of an optional structure. |
list : Set<Set<Real>> | 0..1 | 0..* | | Set of Reals specifying constraint |
range : Interval<Real> | 0..1 | -- | | Range of Real specifying constraint |
| Constraints |
| Name | Expression |
| consistency | inv: list <> Void xor range <> Void |
Parent Package: primitive
Class C_DATE
C_PRIMITIVE
| +--C_DATE
ISO 8601-compatible constraint on instances of Date in the form either of a set of validity values, or an actual date range. There is no validity flag for ‘year’, since it must always be by definition mandatory in order to have a sensible date at all.
Syntax expressions of instances of this class include “YYYY-??-??” (date with optional month and day).
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
assumed_value : Date | 0..1 | -- | | The value to assume if this item is not included in data, due to being part of an optional structure. |
day_validity : VALIDITY_KIND | 0..1 | -- | | Validity of day in constrained date. |
month_validity : VALIDITY_KIND | 0..1 | -- | | Validity of month in constrained date. |
range : Interval<Date> | 0..1 | -- | | Interval of Dates specifying constraint |
timezone_validity : VALIDITY_KIND | 0..1 | -- | | Validity of timezone in constrained date. |
| Operations |
| Signature | Constraints | Documentation |
validity_is_range()
:
Boolean | | True if validity is in the form of a range; useful for developers to check which kind of constraint has been set. |
| Constraints |
| Name | Expression |
| validity_is_range | inv: validity_is_range = (range <> Void) |
| month_validity_optional | inv: month_validity = VALIDITY_KIND.optional implies
(day_validity = VALIDITY_KIND.optional or day_validity =
VALIDITY_KIND.disallowed) |
| month_validity_disallowed | inv: month_validity = {VALIDITY_KIND}.disallowed
implies day_validity = {VALIDITY_KIND}.disallowed |
Parent Package: primitive
Class C_PRIMITIVE{Abstract}
Direct Subclassifiers:
C_STRING, C_INTEGER, C_TIME, C_REAL, C_BOOLEAN, C_DATE, C_DURATION, C_DATE_TIME
| Operations |
| Signature | Constraints | Documentation |
assumed_value()
:
Any | | Value to be assumed if none sent in data |
default_value()
:
Any | | Generate a default value from this constraint object |
has_assumed_value()
:
Boolean | | True if there is an assumed value |
valid_value(a_value : Any)
:
Boolean |
pre: a_value <> Void | True if a_value is valid with respect to constraint expressed in concrete instance of this type. |
| Constraints |
| Name | Expression |
| Assumed_value_valid | inv: has_assumed_value implies valid_value(assumed_value) |
primitive
Enumeration VALIDITY_KIND
| Constraints |
| Name | Expression |
| Validity | inv: valid_validity(value) |
Parent Package: archetype
Package :: ontology
All linguistic and terminological entities in an archetype are represented in the ontology part of an archetype, whose semantics are given in the Ontology package.
Parent Package: ontology
Class ARCHETYPE_ONTOLOGY
Local ontology of an archetype.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
constraint_codes : List<String> | 1 | -- | | List of all term codes in the ontology. These correspond to the "ac" codes in an ADL archetype, or equivalently, the CONSTRAINT_REF . reference values in the archetype definition. |
specialisation_depth : Integer | 1 | -- | | Specialisation depth of this archetype. Unspecialised archetypes have depth 0, with each additional level of specialisation adding 1 to the specialisation_depth. |
term_attribute_names : List<String> | 1 | -- | | List of `attribute' names in ontology terms, typically includes `text', `description', `provenance' etc. |
term_codes : List<String> | 1 | -- | | List of all term codes in the ontology. Most of these correspond to "at" codes in an ADL archetype, which are the node_ids on C_OBJECT descendants. There may be an extra one, if a different term is used as the overall archetype concept_code from that used as the node_id of the outermost C_OBJECT in the definition part. |
terminologies_available : Set<String> | 1 | -- | | List of terminologies to which term or constraint bindings exist in this terminology. |
| Operations |
| Signature | Constraints | Documentation |
constraint_binding(a_terminology : String, a_code : String)
:
String |
pre: has_terminology(a_terminology_id) and
constraint_codes.has(a_code) | Binding of constraint corresponding to a_code in target external terminology a_terminology_id , as a string, which is usually a formal query expression. |
constraint_definition(a_lang : String, a_code : String)
:
ARCHETYPE_TERM |
pre: has_language(a_lang) and
constraint_codes.has(a_code) post: is_set=not is_ordered and is_unique | Constraint definition for a code, in a specified language. |
has_language(a_lang : String)
:
Boolean | | True if language `a_lang' is present in archetype ontology. |
has_terminology(a_terminology : String)
:
Boolean |
pre: has_terminology(a_terminology_id) pre: has_terminology(a_terminology_id) and
term_codes.has(a_code) | True if terminology `a_terminology' is present in archetype ontology. |
term_binding(a_terminology : String, a_code : String)
:
CODE_PHRASE |
pre: has_terminology(a_terminology_id) and
term_codes.has(a_code) | Binding of term corresponding to a_code in target external terminology a_terminology_id as a CODE_PHRASE . |
term_definition(a_lang : String, a_code : String)
:
ARCHETYPE_TERM |
pre: has_language(a_lang) and
term_codes.has(a_code) | Term definition for a code, in a specified language. |
| Constraints |
| Name | Expression |
| term_bindings_exists | inv: term_bindings <> void |
| terminologies_available_exists | inv: terminologies_available <> void |
| term_attribute_names_valid | inv: term_attribute_names <> void and
term_attribute_names.has('text') and
term_attribute_names.has('description') |
| constraint_bindings_exists | inv: constraint_bindings <> void |
| parent_archetype_valid | inv: parent_archetype <> Void and
parent_archetype.description = Current |
| constraint_codes_exists | inv: constraint_codes <> void |
| concept_code_valid | inv: term_codes.has (concept_code) |
| term_codes_exists | inv: term_codes <> void |
Parent Package: ontology
Class ARCHETYPE_TERM
Representation of any coded entity (term or constraint) in the archetype ontology.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
code : String | 1 | -- | | Code of this term. |
items : Hash<String,String> | 1 | -- | | Hash of keys ("text", "description" etc) and corresponding values. |
| Constraints |
| Name | Expression |
| code_valid | inv: code <> void and not code.is_empty |
| keys_valid | inv: keys <> Void |
Parent Package: am
Package :: openehr_profile
Parent Package: openehr_profile
Package :: data_types
This data type specification constitutes the lowest level of technical specification of openEHR, and describes a set of types suitable for use in clinical and related information structures. In order for such types to exist, a set of primitive types is assumed, namely Integer, Real, Boolean, Character, String, List, Set, and Array. These have standard definitions in the OMG object model used in UML, OCL, and are available in almost all type systems. The exact assumptions are described in the openEHR Support Reference Model. A number of symbolic definitions (similar to constants in programming) are also described in the Support RM.
The data types described here are named with the class prefix “DV_”, and inherit from the class DATA_VALUE. They have two distinct uses in reference models. Firstly, they may be used as “data values” in reference model structures wherever the DATA_VALUE class appears, for example, in the EHR Reference Model via the ELEMENT.value attribute. Additionally, specific subtypes of the data types described here can also be used as attribute types in other classes in reference models, such as date/times, coded terms and so on. The difference is that in the former case, only subtypes of DATA_VALUE may be used, whilst in the latter case, other types may be used as well, from the assumed set of basic types.
Parent Package: data_types
Package :: basic
Parent Package: basic
Class TRANSITION
Definition of a state machine transition.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
action : String | 0..1 | -- | | Side-effect action to execute during the firing of this transition |
event : String | 1 | -- | | Event which fires this transition |
guard : String | 0..1 | -- | | Guard condition which must be true for this transition to fire |
| Constraints |
| Name | Expression |
| Action_valid | inv: action <> Void implies not action.is_empty
|
| Guard_valid | inv: guard <> Void implies not guard.is_empty
|
| Event_valid | inv: event <> Void and not event.is_empty
|
| Next_state_valid | inv: next_state <> Void |
Parent Package: basic
Class C_DV_STATE
C_DOMAIN_TYPE
| +--C_DV_STATE
Constrainer type for DV_STATE instances. The attribute c_value defines a state/event table which constrains the allowed values of the attribute value in a DV_STATE instance, as well as the order of transitions between values.
| Constraints |
| Name | Expression |
| c_value_exists | inv: value <> Void |
Parent Package: basic
Class STATE{Abstract}
Direct Subclassifiers:
NON_TERMINAL_STATE, TERMINAL_STATE
Abstract definition of one state in a state machine.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
name : String | 1 | -- | | name of this state |
| Constraints |
| Name | Expression |
| Name_valid | inv: name <> Void and not name.is_empty |
| Transitions_valid | inv: transitions <> Void and not transitions.is_empty |
Parent Package: basic
Class STATE_MACHINE
Definition of a state machine in terms of states, transition events and outputs, and
next states.
| Constraints |
| Name | Expression |
| States_valid | inv: states <> Void and not states.isempty |
Parent Package: basic
Class TERMINAL_STATE
STATE
| +--TERMINAL_STATE
Parent Package: basic
Class NON_TERMINAL_STATE
STATE
| +--NON_TERMINAL_STATE
Definition of a non-terminal state in a state machine, i.e. one that has transitions.
| Constraints |
| Name | Expression |
| Transitions_valid | inv: transitions <> Void and not transitions.is_empty |
Parent Package: data_types
Package :: quantity
Parent Package: quantity
Class C_QUANTITY_ITEM
Constrain instances of DV_QUANTITY.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
magnitude : Interval<Real> | 0..1 | -- | |
Constraint on the magnitude of the DV_QUANTITY.
|
precision : Interval<Integer> | 0..1 | -- | |
Constraint on the precision of the DV_QUANTITY.
A value of -1 means that precision is unconstrained.
|
units : String | 0..1 | -- | |
Constraint on the units of the DV_QUANTITY.
|
| Operations |
| Signature | Constraints | Documentation |
precision_unconstrained()
:
Boolean |
inv: units <> Void and not units.is_empty | True if no constraint on precision; True if precision = -1. |
| Constraints |
| Name | Expression |
| units_valid | inv: units<> Void and not units.is_empty |
Parent Package: quantity
Class C_DV_ORDINAL
C_DOMAIN_TYPE
| +--C_DV_ORDINAL
Class specifying constraints on instances of DV_ORDINAL. Custom constrainer type for instances of DV_ORDINAL.
| Constraints |
| Name | Expression |
| Items_valid | inv: not list.is_empty |
| Ordinals_valid | inv:items <> Void xor any_allowed |
Parent Package: quantity
Class C_DV_QUANTITY
C_DOMAIN_TYPE
| +--C_DV_QUANTITY
Constrain instances of DV_QUANTITY.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
property : CODE_PHRASE | 0..1 | -- | | Optional constraint on units property |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| list : List<C_QUANTITY_ITEM> | 0..1 | 0..* ordered |
|
| list : Set<C_QUANTITY_ITEM> | 0..1 | 0..* | List of value/units pairs. |
| Constraints |
| Name | Expression |
| List_valid | inv: list <> Void implies not list.is_empty
|
| overall_validity | inv: (list <> Void or property <> Void)
xor any_allowed |
| property_valid | inv: property <> Void implies
terminology(Terminology_id_openehr)
.has_code_for_group_id
(Group_id_property, property)
|
Parent Package: data_types
Package :: text
Parent Package: text
Class C_CODE_PHRASE
C_DOMAIN_TYPE
| +--C_CODE_PHRASE
Express constraints on instances of CODE_PHRASE. The terminology_id attribute
may be specified on its own to indicate any term from a specified terminology;
the code_list attribute may be used to limit the codes to a specific list.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
code_list : List<String> | 0..1 | -- | | List of allowed codes; may be empty, meaning any code in the terminology may be used. |
| Operations |
| Signature | Constraints | Documentation |
any_allowed()
:
Boolean |
post: Result = terminology_id = Void
and code_list = Void | True if any CODE_PHRASE instance allowed. |
| Constraints |
| Name | Expression |
| Any_allowed_validity | inv: any_allowed xor terminology_id <> Void
|
| List_validity | inv: code_list <> Void implies (not code_list.is_empty and
terminology_id <> Void) |
Parent Package: am
Package :: template
Package :: assumed_types
This package provides models for common generic and container types not directly supported in UML.
Parent Package: assumed_types
Class List{Abstract}
Aggregate
| +--List
Ordered container that may contain duplicates.
| Operations |
| Signature | Constraints | Documentation |
first()
:
T | | Return first element. |
last()
:
T | | Return last element. |
| Constraints |
| Name | Expression |
| Last_validity | inv: not is_empty implies last <> Void |
| First_validity | inv: not is_empty implies first <> Void |
Parent Package: assumed_types
Class Set{Abstract}
Aggregate
| +--Set
Non-ordered conatiner that does not contain duplicates
Parent Package: assumed_types
Class Interval
Any
| +--Interval
Direct Subclassifiers:
DV_INTERVAL
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
lower : T | 1 | -- | | Lower bound. |
lower_included : Boolean | 1 | -- | | lower boundary value included in range if not lower_unbounded |
lower_unbounded : Boolean | 1 | -- | | lower boundary open (i.e. = -infinity) |
upper : T | 1 | -- | | Upper bound. |
upper_included : Boolean | 1 | -- | | upper boundary value included in range if not upper_unbounded |
upper_unbounded : Boolean | 1 | -- | | upper boundary open (i.e. = +infinity) |
| Constraints |
| Name | Expression |
| Limits_comparable | inv: (not upper_unbounded and not lower_unbounded) implies
lower.strictly_comparable_to(upper) |
| Limits_consistent | inv: (not upper_unbounded and not lower_unbounded) implies
lower <= upper
|
| Lower_included_valid | inv: lower_unbounded implies not lower_included |
| Upper_included_valid | inv: upper_unbounded implies not upper_included |
Parent Package: assumed_types
Class Hash{Abstract}
Aggregate
| +--Hash
Type representing a keyed table of values. T is the value type, and U the type of
the keys.
| Operations |
| Signature | Constraints | Documentation |
has_key(a_key : U)
:
Boolean | | Test for membership of a key |
item(a_key : T)
:
T | | Return item for key ‘a_key’. Equivalent to ISO 11404 fetch operation. |
Parent Package: assumed_types
Class Aggregate{Abstract}
Any
| +--Aggregate
Direct Subclassifiers:
Set, String, List, Hash, Array
Abstract parent of of the aggregate types List, Set, Array
and Hash.
| Operations |
| Signature | Constraints | Documentation |
count()
:
Integer | | Number of items in container |
has(v : T)
:
Boolean | | Test for membership of a value |
is_empty()
:
Boolean | | True if container is empty. |
Parent Package: assumed_types
Class Array{Abstract}
Aggregate
| +--Array
Container whose storage is assumed to be contiguous
Parent Package: assumed_types
Class ISO8601_DATE
TIME_DEFINITIONS
| +--ISO8601_DATE
Implementing Classifiers:
DV_DATE
Represents an absolute point in time, as measured on the Gregorian calendar, and specified only to the day.
| Operations |
| Signature | Constraints | Documentation |
as_string()
:
String | |
ISO8601 string for date, in format YYYYMMDD or
YYYY-MM-DD, or a partial invariant. See
valid_iso8601_date for validity.
|
day()
:
Integer | | returns the day of the momth, derived from the string value |
day_unknown()
:
Boolean | | Indicates whether day in month is unknown.
If so, and month is known, the date is of the form “YYYY-MM” or “YYYYMM”. |
infix('<' : Character, other : ISO8601_DATE)
:
Boolean | | Arithmetic comparison with other date. True if this date is closer to the origin than other. |
is_extended()
:
Boolean | | True if this date uses ‘-’ separators. |
is_partial()
:
Boolean | | True if this date is partial, i.e. if day or more is missing. |
month()
:
Integer |
pre: not month_unknown | returns the month in year derived from the string value |
month_unknown()
:
Boolean | | Indicates whether month in year is unknown. If so, the date is of the form “YYYY”. |
valid_iso8601_date(s : String)
:
Boolean | |
String is a valid ISO 8601 date, i.e. takes the complete
form:
•YYYYMMDD
or the extended form:
•YYYY-MM-DD
or one of the partial forms:
•YYYYMM
•YYYY
or the equivalent extended form:
•YYYY-MM
Where:
•YYYY is the string form of any positive number in the
range “0000” - “9999”
(zero-filled to four digits)
•MM is “01” - “12” (zero-filled to two
digits)
•DD is “01” - “31” (zero-filled to two
digits)
The combinations of YYYY, MM, DD numbers ust be correct with
respect to the Gregorian calendar.
|
year()
:
Integer | | returns the year derived from the string value |
| Constraints |
| Name | Expression |
| Hour_valid | inv: valid_hour(hour, minute, second) |
| Second_valid | inv: not second_unknown implies valid_second(second) |
| Partial_validity | inv:minute_unknown implies second_unknown |
| Year_valid | inv: valid_year(year) |
Parent Package: assumed_types
Class ISO8601_TIME
TIME_DEFINITIONS
| +--ISO8601_TIME
Implementing Classifiers:
DV_TIME
Represents an absolute point in time from an origin usually interpreted as meaning the start of the current day, specified to the second.
| Operations |
| Signature | Constraints | Documentation |
as_string()
:
String | |
ISO8601 string for time, i.e. in form:
hhmmss[,sss][Z|±hhmm] or the extended form:
hh:mm:ss[,sss][Z|±hhmm], or a partial invariant.
See valid_iso8601_time for validity.
|
fractional_second()
:
Double |
pre: not second_unknown | Fractional seconds (just the factional part). |
has_fractional_second()
:
Boolean | | True if the fractional_second part is signficant (i.e. even if = 0.0). |
hour()
:
Integer | | Hour in day, in 24-hour time. |
infix('<' : Character, other : ISO8601_TIME)
:
Boolean | | Arithmetic comparison with other time. True if this date is closer to previous midnight than other. |
is_decimal_sign_comma()
:
Boolean | | True if this time has a decimal part indicated by ‘,’ (comma) rather than ‘.’ (period). |
is_extended()
:
Boolean | | True if this time uses ‘:’ separators. |
is_partial()
:
Boolean | | True if this date is partial, i.e. if seconds or more is missing. |
minute()
:
Integer |
pre: not minute_unknown | Minute in hour.
|
minute_unknown()
:
Boolean | | Indicates whether minute is unknown. If so, the time is of the form “hh”. |
second()
:
Integer |
pre: not second_unknown | Second in minute. |
second_unknown()
:
Boolean | | Indicates whether second is unknown. If so and month is known, the time is of the form
“hh:mm” or “hhmm”. |
timezone()
:
ISO8601_TIMEZONE | | Timezone; may be Void. |
valid_iso8601_time(s : String)
:
Boolean | |
String is a valid ISO 8601 date, i.e. takes the form:
•hhmmss[,sss][Z | ±hhmm]
or the extended form:
•hh:mm:ss[,sss][Z | ±hhmm]
or one of the partial forms:
•hhmm or hh
or the extended form:
•hh:mm
with an additional optional timezone indicator of:
•Z or ±hhmm
Where:
•hh is “00” - “24” (0-filled to two digits)
•mm is “00” - “59” (0-filled to two digits)
•ss is “00” - “60” (0-filled to two digits)
•sss is any numeric string, representing an
optional fractional second
•Z is a literal meaning UTC (modern
replacement for GMT), i.e. timezone +0000
•±hhmm, i.e. +hhmm or -hhmm, indicating
the timezone.
The only combination allowed when hh=24 is
“24:00:00”, meaning “end of the calendar day”
according to the standard.
|
| Constraints |
| Name | Expression |
| Hour_valid | inv: valid_hour(hour, minute, second) |
| Minute_valid | inv: not minute_unknown implies valid_minute(minute) |
| Second_valid | inv: not second_unknown implies valid_second(second) |
| Partial_validity | inv:minute_unknown implies second_unknown |
| Fractional_second_valid | inv: has_fractional_second implies (not second_unknown and valid_fractional_second(fractional_second)) |
Parent Package: assumed_types
Class ISO8601_DATE_TIME
TIME_DEFINITIONS
| +--ISO8601_DATE_TIME
Implementing Classifiers:
DV_DATE_TIME
| Operations |
| Signature | Constraints | Documentation |
as_string()
:
String |
post: valid_iso8601_date_time(Result) |
ISO8601 string for date/time, in format
YYYYMMDDThhmmss[,sss][Z | ±hhmm]
or in extended format
YYYY-MM-DDThh:mm:ss[,sss][Z |±hhmm]
or a partial variant; see valid_iso8601_date_time() below.
|
day()
:
Integer | | day in month |
day_unknown()
:
Boolean | | Indicates whether day in month is unknown. |
fractional_second()
:
Double | | fractional seconds |
has_fractional_second()
:
Boolean | | True if the fractional_second part is signficant (i.e. even if = 0.0). |
hour()
:
Integer | | hour in day |
hour_unknown()
:
Boolean | | Indicates whether hour in day is known. |
infix('<' : Character, other : ISO8601_DATE_TIME)
:
Boolean | | Arithmetic comparison with other date/time.
True if this date/time is closer to origin than other. |
is_decimal_sign_comma()
:
Boolean | | True if this time has a decimal part indicated by ‘,’ (comma) rather than ‘.’ (period). |
is_extended()
:
Boolean | | True if this date/time uses ‘-’, ‘:’ separators. |
is_partial()
:
Boolean | | True if this date is partial, i.e. if seconds or more is missing. |
minute()
:
Integer | | minute in hour |
minute_unknown()
:
Boolean | | Indicates whether minute in hour is known. |
month()
:
Integer | | month in year |
month_unknown()
:
Boolean | | Indicates whether month in year is unknown. |
second()
:
Integer | | second in minute |
second_unknown()
:
Boolean | | Indicates whether minute in hour is known. |
timezone()
:
ISO8601_TIMEZONE | | Timezone; may be Void. |
valid_fractional_second(fs : Double)
:
Boolean |
post: Result = (fs>= 0.0 and fs >1.0) | |
valid_iso8601_date_time(s : String)
:
Boolean | |
String is a valid ISO 8601 date-time, i.e.
takes the form:
•YYYYMMDDThhmmss[,sss][Z|±hhmm]
or the extended form:
•YYYY-MM-DDThh:mm:ss[,sss][Z|±hhmm]
or one of the partial forms:
•YYYYMMDDThhmm
•YYYYMMDDThh
or the equivalent extended forms:
•YYYY-MM-DDThh:mm
•YYYY-MM-DDThh
(meanings as in DV_DATE, DV_TIME) and
the values in each field are valid.
|
year()
:
Integer | | year |
| Constraints |
| Name | Expression |
| Partial_validity_minute | inv: minute_unknown implies second_unknown |
| Month_valid | inv: valid_month(month) |
| Partial_validity_hour | inv: not hour_unknown |
| Partial_validity_month | inv: not month_unknown |
| Second_valid | inv: not second_unknown implies valid_second(second) |
| Day_valid | inv: valid_day(year, month, day) |
| Year_valid | inv: valid_year(year) |
| Partial_validity_day | inv: not day_unknown |
| Fractional_second_valid | inv: has_fractional_second implies (not second_unknown and valid_fractional_second(fractional_second)) |
| Hour_valid | inv: valid_hour(hour, minute, second) |
| Minute_valid | inv: not minute_unknown implies valid_minute(minute) |
| Fractional_second_valid: | inv: has_fractional_second implies (not second_unknown
and valid_fractional_second(fractional_second)) |
| Partial_validity_year | inv: not month_unknown |
Parent Package: assumed_types
Class ISO8601_DURATION
TIME_DEFINITIONS
| +--ISO8601_DURATION
Implementing Classifiers:
DV_DURATION
| Operations |
| Signature | Constraints | Documentation |
as_string()
:
String | |
ISO8601 string for duration, in format
• P[nnY][nnM][nnW][nnD][T[nnH][nnM][nnS]]
|
days()
:
Integer | | number of 24 hour days |
fractional_second()
:
Double | | fractional seconds |
hours()
:
Integer | | number of 60 minute hours |
is_decimal_sign_comma()
:
Boolean | | True if this time has a decimal part indicated by ‘,’ (comma) rather than ‘.’ (period). |
minutes()
:
Integer | | number of 60 second minutes |
months()
:
Integer | | number of months of nominal 30 day length |
seconds()
:
Integer | | number of seconds |
valid_iso8601_duration(s : String)
:
Boolean | |
String is a valid ISO 8601 duration, i.e. takes the form:
•P[nnY][nnM][nnW][nnD][T[nnH][nnM][nnS]
Where each nn represents a number of years, months, etc. nnW
represents a number of 7-day weeks.
Note: allowing the W designator in the
same
expression as other designators is an
exception
to the published standard, but
necessary
in clinical information (typically for
representing
pregnancy duration).
|
weeks()
:
Integer | | number of 7 day weeks |
years()
:
Integer | | number of years of nominal 365-day length |
| Constraints |
| Name | Expression |
| months_valid | inv: months >= 0 |
| years_valid | inv: years >= 0 |
| hours_valid | inv: hours >= 0 |
| days_vlid | inv: days >= 0 |
| minutes_valid | inv: minutes >= 0 |
| fractional_second_valid | inv: fractional_seconds >= 0.0 and fractional_seconds < 1.0 |
| weeks_valid | inv: weeks >= 0 |
| seconds_valid | inv: seconds >= 0 |
Parent Package: assumed_types
Class TIME_DEFINITIONS
Any
| +--TIME_DEFINITIONS
Direct Subclassifiers:
ISO8601_DATE, ISO8601_DURATION, ISO8601_DATE_TIME, ISO8601_TIMEZONE, ISO8601_TIME
Implementing Classifiers:
DV_DURATION
Definitions for date/time classes. Note that the timezone limits are set by where
the international dateline is. Thus, time in New Zealand is quoted using +12:00,
not -12:00.
| Operations |
| Signature | Constraints | Documentation |
valid_day(y,m,d : Integer)
:
Boolean |
post: Result = (d>=1 and d<= Days_in_month(m,y)) | |
valid_hour(h,m,s : Integer)
:
Boolean |
post: Result=(h>=0 and h<Hours_in_day) or (h=Hours_in_day and m=0 and s=0) | |
valid_minute(m : Integer)
:
Boolean |
post: Result = (m>=0 and m<Minutes_in_hour) | |
valid_month(m : Integer)
:
Boolean | | |
valid_second(s : Integer)
:
Boolean | | |
valid_year(y : Integer)
:
Boolean |
post: Result=(y>=0) | True if v>=0 |
Parent Package: assumed_types
Class ISO8601_TIMEZONE
TIME_DEFINITIONS
| +--ISO8601_TIMEZONE
Parent Package: assumed_types
Class String
Aggregate
| +--String
| Operations |
| Signature | Constraints | Documentation |
as_integer()
:
Integer |
pre: is_integer | Return the integer corresponding to the integer value represented in this string. |
infix('+' : Character, other : String)
:
String | | Concatenation operator - causes ‘other’ to be appended to this string |
is_empty()
:
Boolean | | True if string is empty, i.e. equal to “”. |
is_integer()
:
Boolean | | True if string can be parsed as an integer. |
Package :: rm
Parent Package: rm
Package :: common
Parent Package: common
Package :: archetyped
Parent Package: archetyped
Class LOCATABLE{Abstract}
PATHABLE
| +--LOCATABLE
Direct Subclassifiers:
DATA_STRUCTURE, EVENT, COMPOSITION, FOLDER, CONTACT, ACTIVITY, EHR_STATUS, CAPABILITY, EHR_ACCESS, PARTY_RELATIONSHIP, PARTY_IDENTITY, PARTY, ADDRESS, CONTENT_ITEM
Root class of all information model classes that can be archetyped.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
archetype_node_id : String | 1 | -- | | 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. |
name : DV_TEXT | 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. |
uid : UID_BASED_ID | 0..1 | -- | | Optional globally unique object identifier for root points of archetyped structures. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| links : Set<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. |
| archetype_details : ARCHETYPED | 0..1 | -- | Details of archetyping used on this node. |
| feeder_audit : Set<FEEDER_AUDIT> | 0..1 | 0..* | 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. |
| Operations |
| Signature | Constraints | Documentation |
concept()
:
DV_TEXT |
pre: is_archetype_root | Clinical concept of the archetype as a whole (= derived from the ‘archetype_node_id’ of the root node) |
is_archetype_root()
:
Boolean | | True if this node is the root of an archetyped structure. |
| Constraints |
| Name | Expression |
| Name_valid | inv: name <> Void |
| Archetype_node_id_valid | inv: archetype_node_id <> Void and not
archetype_node_id.is_empty |
| Links_valid | inv: links <> Void implies not links.empty |
| Archetyped_valid | inv: is_archetype_root xor archetype_details = Void |
Parent Package: archetyped
Class LINK
The LINK type defines a logical relationship between two items, such as two ENTRYs or an ENTRY and a COMPOSITION. Links can be used across compositions, and across EHRs. Links can potentially be used between interior (i.e. non-archetype root) nodes, although this probably should be prevented in archetypes. Multiple LINKs can be attached to the root object of any archetyped structure to give the effect of a 1->N link
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
meaning : DV_TEXT | 1 | -- | | Used to describe the relationship, usually in clinical terms, such as “in response to” (the relationship between test results and an order), “follow-up to” and so on. Such relationships
can represent any clinically meaningful connection between pieces of information.
Values for meaning include those described in Annex C, ENV 13606 pt 2 [11] under the categories of “generic”, “documenting and reporting”, “organisational”, “clinical”,
“circumstancial”, and “view management”. |
target : DV_EHR_URI | 1 | -- | | The logical “to” object in the link relation, as per the linguistic sense of the meaning attribute. |
type : DV_TEXT | 1 | -- | | The type attribute is used to indicate a clinical or domain-level meaning for the kind of link,
for example “problem” or “issue”. If type values are designed appropriately, they can be used
by the requestor of EHR extracts to categorise links which must be followed and which can be broken when the extract is created. |
| Constraints |
| Name | Expression |
| Meaning_valid | inv: meaning <> Void |
| Type_valid | inv: type <> Void |
| Target_valid | inv: target <> Void |
Parent Package: archetyped
Class FEEDER_AUDIT
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
feeder_system_item_ids : List<DV_IDENTIFIER> | 0..1 | -- | | Identifiers used for the item in the feeder system, where the feeder system is distinct from the originating system. |
original_content : DV_ENCAPSULATED | 0..1 | -- | | Optional inline inclusion of or reference to original content corresponding to the openEHR content at this node. Typically a URI reference to a document or message in a persistent store associated with the EHR. |
originating_system_item_ids : List<DV_IDENTIFIER> | 0..1 | -- | | Identifiers used for the item in the originating system, e.g. filler and placer ids. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| originating_system_audit : FEEDER_AUDIT_DETAILS | 1 | -- | Any audit information for the information item from the originating system. |
| feeder_system_audit : FEEDER_AUDIT_DETAILS | 0..1 | -- | Any audit information for the information item from the feeder system, if different from the originating system. |
| Constraints |
| Name | Expression |
| Originating_system_audit_valid | inv: originating_system_audit <> Void |
Parent Package: archetyped
Class ARCHETYPED
Archetypes act as the configuration basis for the particular structures of instances defined by the reference model. To enable archetypes to be used to create valid data, key classes in the reference model act as “root” points for archetyping; accordingly, these classes have the archetype_details attribute set. An instance of the class ARCHETYPED contains the relevant archetype identification information, allowing generating archetypes to be matched up with data instances
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
archetype_id : ARCHETYPE_ID | 1 | -- | | Globally unique archetype identifier. |
rm_version : String | 1 | -- | | Version of the openEHR reference model used to create this object. Expressed in terms of the release version string, e.g. “1.0”, “1.2.4”. |
template_id : TEMPLATE_ID | 0..1 | -- | | Globally unique template identifier, if a template was active at this point in the structure.
Normally, a template would only be used at the top of a top-level structure, but the possibility
exists for templates at lower levels. |
| Constraints |
| Name | Expression |
| rm_version_valid | inv: rm_version <> Void and not rm_version.is_empty |
| archetype_id_valid | inv: archetype_id <> Void |
Parent Package: archetyped
Class FEEDER_AUDIT_DETAILS
Audit details for any system in a feeder system chain. Audit details here means the general notion of who/where/when the information item to which the audit is attached was created. None of the attributes is defined as mandatory, however, in different scenarios, various combinations of attributes will usually be mandatory. This can be controlled by specifying feeder audit details in legacy archetypes.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
location : PARTY_IDENTIFIED | 0..1 | -- | | Identifier of the particular site/facility within an organisation which handled the item. For
computability, this identifier needs to be e.g. a PKI identifier which can be included in the identifier list of the PARTY_IDENTIFIED object. |
provider : PARTY_IDENTIFIED | 0..1 | -- | | Optional provider(s) who created, committed, forwarded or otherwise handled the item. |
subject : PARTY_PROXY | 0..1 | -- | | Identifiers for subject of the received information item. |
system_id : String | 1 | -- | | Identifier of the system which handled the information item. |
time : DV_DATE_TIME | 0..1 | -- | | Time of handling the item. For an originating system, this will be time of creation, for an intermediate feeder system, this will be a time of accession or other time of handling, where
available. |
version_id : String | 0..1 | -- | | Any identifier used in the system such as “interim”, “final”, or numeric versions if available. |
| Constraints |
| Name | Expression |
| System_id_valid | inv: system_id <> Void and not system_id.is_empty |
Parent Package: archetyped
Class PATHABLE{Abstract}
Direct Subclassifiers:
EVENT_CONTEXT, ISM_TRANSITION, LOCATABLE, INSTRUCTION_DETAILS
Abstract parent of all classes whose instances are reachable by paths, and which know how to locate child object by paths. The parent feature may be implemented as a function or attribute.
| Operations |
| Signature | Constraints | Documentation |
item_at_path(a_path : String)
:
Any |
post: Result <> Void pre: path <>Void and
valid_path(a_path) | The item at a path (relative to this item); only valid for unique paths, i.e. paths that resolve to a single item. |
items_at_path(a_path : String)
:
List<Any> |
pre: path <>Void and not
path_unique(a_path) post: Result <> Void | List of items corresponding to a non-unique path
path. |
parent()
:
PATHABLE | | Parent of this node in compositional hierarchy. |
path_exists(a_path : String)
:
Boolean | | True if the path exists in the data with respect to the current item. |
path_of_item(a_loc : PATHABLE)
:
String |
pre: an_item <> Void | The path to an item relative to the root of this archetyped structure. |
path_unique(a_path : String)
:
Boolean |
pre: a_path <> Void and path_exists(a_path) | True if the path corresponds to a single item in the data. |
Parent Package: common
Package :: change_control
In various openEHR reference models, the semantics of formal change control are required. There are two architectural aspects of managing changes to data.
The first is the concept of a complex information object, being versioned in time, meaning that its creation and all subsequent modifications cause new “versions” to be created, rather than literally overwriting the existing data. Each version includes an audit trail, typically containing the dentity of a user, the date/time of the change, and a reason for the change.
The second aspect recognises that repositories are made up of complex information objects, and that changes are not in fact just made to individual objects, but to the respository itself. Any change by a user may change more than one versioned object in the repository, and the set of such changes - a “change-set” - constitutes the logical unit of change to the repository, taking it from one valid state to the next.
Parent Package: change_control
Class VERSIONED_OBJECT
Version control abstraction, defining semantics for versioning one complex object.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
owner_id : OBJECT_REF | 1 | -- | | Reference to object to which this versioned repository belongs, e.g. the id of the containing EHR. |
time_created : DV_DATE_TIME | 1 | -- | | Time of initial creation of this versioned object. |
uid : HIER_OBJECT_ID | 1 | -- | | Unique identifier of this version repository. |
| Operations |
| Signature | Constraints | Documentation |
all_version_ids()
:
List<OBJECT_VERSION_ID> | | Return a list of ids of all versions in this object. |
all_versions(T)
:
List<VERSION> | | Return a list of all versions in this object. |
commit_attestation()
:
|
pre: an_attestation <> Void and
has_version_id(a_ver_id) | Add a new attestation to a specified original version. Attestations can only be added to Original versions.
Parameters:
(an_attestation: ATTESTATION;
a_ver_id: OBJECT_VERSION_ID;
signing_key: String)
require
Attestation_valid: an_attestation /= Void
Version_id_valid: has_version_id(a_ver_id)
and is_original_version(a_ver_id) |
commit _imported_version()
:
| | Add a new imported version.
Details of version id etc come from the ORIGINAL_VERSION being committed.
Parameters:
(a_contribution_id: OBJECT_REF;
an_audit: AUDIT_DETAILS;
a_version: ORIGINAL_VERSION)
require
Contribution_valid: a_contribution /= Void
audit_valid: an_audit /= Void
Version_valid: a_version /= Void |
commit _original_merged_version()
:
| | Add a new original merged version. This commit function adds a parameter containing the ids of other versions merged into the current one.
Parameters:
(a_contribution_id: OBJECT_REF;
a_new_version_uid, a_preceding_version_uid:
OBJECT_VERSION_ID;
an_audit: AUDIT_DETAILS;
a_lifecycle_state: DV_CODED_TEXT;
a_data: T;
an_other_input_uids:
Set;
signing_key: String)
require
Contribution_valid: a_contribution /= Void
New_version_valid: a_new_version_uid /= Void
Preceding_version_id_valid:
all_version_ids.has(a_preceding_version_uid) or
else version_count = 0
audit_valid: an_audit /= Void
data_valid: a_version_data /= Void
lifecycle_state_valid: a_lifecycle_state /= Void
Merge_input_ids_valid: an_other_input_uids /=
Void |
commit_original_version()
:
| | Add a new original version.
Parameters:
(a_contribution: OBJECT_REF;
a_new_version_uid, a_preceding_version_uid:
OBJECT_VERSION_ID;
an_audit: AUDIT_DETAILS;
a_lifecycle_state: DV_CODED_TEXT;
a_data: T;
signing_key: String)
require
Contribution_valid: a_contribution /= Void
New_version_valid: a_new_version_uid /= Void
Preceding_version_uid_valid:
all_version_ids.has(a_preceding_version_uid) or
else version_count = 0
audit_valid: an_audit /= Void
data_valid: a_version_data /= Void
lifecycle_state_valid: a_lifecycle_state /= Void
|
has_version_at_time(a_time : DV_DATE_TIME)
:
Boolean |
pre: a_time <> Void | True if a version for time ‘a_time’ exists. |
has_version_id(a_ver_id : OBJECT_VERSION_ID)
:
Boolean |
pre: a_ver_id <> Void | True if a version with a_ver_id exists. |
is_original_version(a_ver_id : OBJECT_VERSION_ID)
:
Boolean |
pre: a_ver_id <> Void and has_version_id(a_ver_id) | True if version with an id is an ORIGINAL_VERSION. |
latest_trunk_version()
:
VERSION | | Return the most recently added trunk version. |
latest_version()
:
VERSION | | Return the most recently added version (i.e. on trunk or any branch). |
lifecycle_state()
:
DV_CODED_TEXT |
post: Result = latest_trunk_version.lifecycle_state
| Return the lifecycle state from the latest trunk version.
Useful for determining if the version container is logically deleted. |
revision_history()
:
REVISION_HISTORY | | History of all audits and attestations in this versioned repository. |
version_at_time(a_time : DV_DATE_TIME)
:
VERSION |
pre: has_version_at_time(a_time) | Return the version for time ‘a_time’. |
version_count()
:
Integer | | Return the total number of versions in this object |
version_with_id(a_ver_id : OBJECT_VERSION_ID)
:
OBJECT_VERSION_ID |
pre: has_version_id(a_ver_id) | Return the version with id ‘a_ver_id’. |
| Constraints |
| Name | Expression |
| owner_id_valid | inv: owner_id <> Void |
| all_versions_valid | inv: all_versions <> Void and all_versions.count =
version_count |
| version_count_valid | inv: version_count >= 1 |
| uid_valid | inv: uid <> Void |
| latest_version_valid | inv: latest_version <> Void |
| all_version_ids_valid | inv: all_version_ids <>Void and all_version_ids.count =
version_count |
| revision_history_valid | inv: revision_history <> Void |
| time_created_valid | inv: time_created <> Void |
Parent Package: change_control
Class CONTRIBUTION
Documents a contribution of one or more versions added to a change-controlled repository.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
uid : HIER_OBJECT_ID | 1 | -- | | Unique identifier for this contribution. |
versions : List<OBJECT_REF> | 1 | -- | | Set of references to versions causing changes to this EHR. Each contribution contains a list of versions, which may include paths pointing to any number of VERSIONABLE items, i.e. items of type COMPOSITION and FOLDER. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| audit : AUDIT_DETAILS | 1 | -- | Audit trail corresponding to the committal of this Contribution. |
| Constraints |
| Name | Expression |
| Versions_valid | inv: versions <> Void and not versions.is_empty |
| Description_valid | inv: audit.description <> Void |
| audit_validmed2 | inv: audit <> Void |
| uid_valid | inv: uid <> Void |
Parent Package: change_control
Class VERSION{Abstract}
Direct Subclassifiers:
ORIGINAL_VERSION, IMPORTED_VERSION, MERGED_VERSION
One version within a Version container, containing data, create and commit audit trails, and optional attestations.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
contribution : OBJECT_REF | 1 | -- | | Contribution in which this version was added. |
signature : String | 0..1 | -- | | OpenPGP digital signature or digest of content committed in this Version. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| commit_audit : AUDIT_DETAILS | 1 | -- | Audit trail corresponding to the committal of this version to the VERSION_REPOSITORY where it is currently located. |
| attestations : Set<ATTESTATION> | 0..1 | 0..* | Set of attestations relating to this version. |
| data : T | 0..1 | -- | The data being versioned. |
| Constraints |
| Name | Expression |
| Contribution_valid | inv: contribution <> Void and contribution.type.is_equal('CONTRIBUTION') |
| Data_valid | inv: data <> Void |
| Uid_valid | inv: uid <> Void |
| Owner_id_valid | inv: owner_id <> Void and
owner_id.value.is_equal(uid.object_id.value) |
| Lifecycle_state_valid | inv: lifecycle_state <> Void and terminology(
Term_id_openehr).
codes_for_group_name(Group_id_version_lifecycle_state,
'en').has(lifecycle_state.defining_code) |
| Commit_audit_valid | inv: commit_audit <> Void |
| Create_audit_valid | inv: create_audit <> Void and create_audit = commit_audit |
| Preceding_version_uid_validity | inv: uid.version_tree_id.is_first xor preceding_version_uid <> Void |
Parent Package: change_control
Class MERGED_VERSION
VERSION
| +--MERGED_VERSION
Merged Versions, recording the list of input versions to the merge in addition to standard Version attributes.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
input_version_ids : Set<OBJECT_VERSION_ID> | 0..1 | -- | | Identifiers of the Versions used as input into this merged version. There is no guarantee that the identifiers of all content Versions are included here. |
| Constraints |
| Name | Expression |
| Input_version_ids_valid | inv: input_version_ids <> Void and not
input_version_ids.is_empty |
Parent Package: change_control
Class IMPORTED_VERSION
VERSION
| +--IMPORTED_VERSION
Versionable objects that have been copied from another location and imported into a local version container.
| Constraints |
| Name | Expression |
| Original_create_audit_valid | inv: original_create_audit <> Void |
| Create_audit_valid | inv: create_audit <> Void and create_audit =original_create_audit |
Parent Package: change_control
Class ORIGINAL_VERSION
VERSION
| +--ORIGINAL_VERSION
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
lifecycle_state : DV_CODED_TEXT | 1 | -- | | Lifecycle state of the content item in this version. |
preceding_version_uid : OBJECT_VERSION_ID | 1 | -- | | Unique identifier of the version of which this version is a modification; Void if this is the first version. |
uid : OBJECT_VERSION_ID | 1 | -- | | Unique identifier of this version, containing owner_id, version_tree_id and creating_system_id. |
Parent Package: common
Package :: directory
The directory package provides a simple abstraction of a versioned folder structure. The VERSIONED_FOLDER class is the binding of VERSIONED_OBJECT to FOLDER, i.e. it is a VERSIONED_OBJECT.
This means that each of its versions is a FOLDER structure. It provides a means of versioning FOLDER structures over time, which is useful in the EHR, Demographics service or anywhere else where Folders are used to group things.
Parent Package: directory
Class VERSIONED_FOLDER
Parent Package: directory
Class FOLDER
LOCATABLE
| +--FOLDER
The concept of a named folder.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
items : List<OBJECT_REF> | 0..1 | -- | | The list of references to other (usually) versioned objects logically in this folder. |
| Constraints |
| Name | Expression |
| Folders_valid | inv: folders <> Void implies not folders.empty |
Parent Package: common
Package :: generic
Parent Package: generic
Class PARTICIPATION
Model of a participation of a Party (any Actor or Role) in an activity.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
function : DV_TEXT | 1 | -- | | The function of the Party in this participation (note that a given party might participate in more than one way in a particular activity). This attribute should be coded, but cannot be limited to the HL7v3:ParticipationFunction vocabulary, since it is too limited and hospital-oriented. |
mode : DV_CODED_TEXT | 1 | -- | | The mode of the performer / activity interaction, e.g. present, by telephone, by email etc. |
time : DV_INTERVAL<DV_DATE_TIME> | 0..1 | -- | | The time interval during which the participation took place, if it is used in an observational context (i.e. recording facts about the past); or the intended time interval of the participation when used in future contexts, such as EHR Instructions. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| performer : PARTY_REF | 1 | -- |
|
| performer : PARTY_PROXY | 1 | -- | The id and possibly demographic system link of the party participating in the activity. |
| Constraints |
| Name | Expression |
| Performer_valid | inv: performer <> Void |
| Mode_valid | inv: mode <> Void and terminology(Terminology_id_openehr).
has_code_for_group_id(Group_id_participation_mode, mode.defining_code) |
| Function_valid | inv: function <> Void and
function.generating_type.is_equal('DV_CODED_TEXT') implies
terminology(Terminology_id_openehr).
has_code_for_group_id(Group_id_participation_function, function.
defining_code) |
Parent Package: generic
Class REVISION_HISTORY
Defines the notion of a revision history of audit items, each associated with the version for which that audit was committed.
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| items : List<REVISION_HISTORY_ITEM> | 0..1 | * ordered | The items in this history. |
| Operations |
| Signature | Constraints | Documentation |
most_recent_version()
:
String |
post: Result.is_equal(items.last.version_id.value) | The version id of the most recent item, as a String. |
most_recent_version_time_committed()
:
String |
post: Result.is_equal(items.last.audits.first.time_committed.value) | The commit date/time of the most recent item, as a String. |
Parent Package: generic
Class REVISION_HISTORY_ITEM
An entry in a revision history, corresponding to a version from a versioned container
Consists of AUDIT_DETAILS instances with revision identifier of the revision to which the AUDIT_DETAILS intance belongs.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
version_id : OBJECT_VERSION_ID | 1 | -- | | Version identifier for this revision. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| audits : Set<AUDIT_DETAILS> | 1 | 1..* | The audits for this revision; there will always be at least one commit audit (which may itself be an ATTESTATION), there may also be further attestations. |
| Constraints |
| Name | Expression |
| Version_id_valid | inv: version_id <> Void |
| Audit_valid | inv: audit <> Void and not audits.is_empty |
Parent Package: generic
Class PARTY_PROXY{Abstract}
Direct Subclassifiers:
PARTY_IDENTIFIED, PARTY_SELF
Abstract concept of a proxy description of a party, including an optional link to
data for this party in a demographic or other identity management system.
Subtyped into PARTY_IDENTIFIED and PARTY_SELF.
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| external_ref : PARTY_REF | 0..1 | -- | Optional reference to more detailed demographic or identification information for this party, in an external system. |
Parent Package: generic
Class PARTY_SELF
PARTY_PROXY
| +--PARTY_SELF
Party proxy representing the subject of the record.
Parent Package: generic
Class PARTY_IDENTIFIED
PARTY_PROXY
| +--PARTY_IDENTIFIED
Direct Subclassifiers:
PARTY_RELATED
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
identifiers : List<DV_IDENTIFIER> | 0..1 | -- | | One or more formal identifiers (possibly computable). |
name : String | 0..1 | -- | | Optional human-readable name (in String form). |
Parent Package: generic
Class PARTY_RELATED
PARTY_IDENTIFIED
| +--PARTY_RELATED
Relationship of subject of this ENTRY to the subject of the record. May be coded. If it is the atient, coded as “self”.
| Constraints |
| Name | Expression |
| Relationship_valid | inv: relationship <> Void and
terminology(Terminology_id_openehr).
has_code_for_group_id(Group_id_subject_relationship, relationship.
defining_code) |
Parent Package: generic
Class ATTESTATION
AUDIT_DETAILS
| +--ATTESTATION
Record an attestation of a party (the committer) to item(s) of record content. The type of attestation is
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
attested_view : DV_MULTIMEDIA | 1 | -- | | Optional visual representation of content attested e.g. screen image. |
is_pending : Boolean | 1 | -- | | True if this attestation is outstanding; False means it has been completed. |
items : Set<DV_EHR_URI> | 0..1 | -- | | Items attested, expressed as fully qualified runtime paths to the items in question.
Although not recommended, these may include fine-grained items which have been attested in some other system. Otherwise it is assumed to be for the entire VERSION with which it is associated. |
proof : String | 0..1 | -- | | Proof of attestation. |
reason : DV_TEXT | 1 | -- | | Reason of this attestation. Optionally coded by the openEHR Terminology group “attestation reason”; includes values like “authorisation”, “witness” etc. |
| Constraints |
| Name | Expression |
| Reason_valid | inv: reason <> Void and (reason.
generating_type.is_equal('DV_CODED_TEXT') implies terminology(Terminology_id_openehr).has_code_for_group_id
(Group_id_attestation_reason, reason.defining_code)) |
| Items_valid | inv: items <> Void implies not items.is_empty |
Parent Package: generic
Class AUDIT_DETAILS
Direct Subclassifiers:
ATTESTATION
The set of attributes required to document the committal of an information item to
a repository.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
change_type : DV_CODED_TEXT | 1 | -- | | Type of change. Coded using the openEHR Terminology “audit change type” group. |
description : DV_TEXT | 0..1 | -- | | Reason for committal. |
system_id : String | 1 | -- | | Identity of the system where the change was committed. Ideally this is a machine- and human-processable identifier, but it may not be. |
time_committed : DV_DATE_TIME | 1 | -- | | Time of committal of the item. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| committer : PARTY_PROXY | 1 | -- | Identity and optional reference into identity management service, of user who committed the item. |
| Constraints |
| Name | Expression |
| Committer_valid | inv: committer <> Void |
| Time_committed_valid | inv: time_committed <> Void |
| System_id_valid | inv: system_id <> Void and not system_id.is_empty |
| Change_type_valid | inv: change_type<> Void and
terminology(Terminology_id_openehr).
has_code_for_group_id(Group_id_audit_change_type,
change_type.defining_code) |
Parent Package: common
Package :: resource
The common.resource package defines the structure and semantics of the general notion of an online resource which has been created by a human author, and consequently for which natural language is a factor.
Parent Package: resource
Class TRANSLATION_DETAILS
Class providing details of a natural language translation.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
accreditation : String | 1 | -- | | Accreditation of translator, usually a national translator’s association id |
author : Hash<String,String> | 1 | -- | | Translator name and other demographic details |
language : CODE_PHRASE | 1 | -- | | Language of translation |
other_details : Hash<String,String> | 0..1 | -- | | Any other meta-data |
| Constraints |
| Name | Expression |
| Author_valid | inv: author <> Void |
| Language_valid | inv: language <> Void and code_set('languages').has(language) |
Parent Package: resource
Class RESOURCE_DESCRIPTION
Defines the descriptive meta-data of a resource.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
lifecycle_state : String | 1 | -- | | Lifecycle state of the resource, typically including states such as: initial, submitted, experimental, awaiting_approval, approved, superseded, obsolete. |
original_author : Hash<String,String> | 1 | -- | | Original author of this resource, with all relevant details, including organisation. |
other_contributors : List<String> | 0..1 | -- | | Other contributors to the resource, probably listed in “name ” form. |
other_details : Hash<String,String> | 0..1 | -- | | Additional non language-senstive resource meta-data, as a list of name/value pairs. |
resource_package_uri : String | 0..1 | -- | | URI of package to which this resource belongs. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| details : Set<RESOURCE_DESCRIPTION_ITEM> | 0..1 | * | Details of all parts of resource description that are natural language-dependent. |
| parent_resource : AUTHORED_RESOURCE | 0..1 | -- | Reference to owning resource. |
| Constraints |
| Name | Expression |
| Details_valid | inv: details <> Void and not details.is_empty |
| Parent_resource_valid | inv: parent_resource <> Void implies
parent_resource.description = Current |
| Original_author_valid | inv: original_author <> Void and not
original_author.is_empty |
| Language_valid | inv: details.for_all (d |
parent_resource.languages_available.has(d.language)) |
| Lifecycle_state_valided2 | inv: lifecycle_state <> Void and not
lifecycle_state.is_empty |
Parent Package: resource
Class AUTHORED_RESOURCE{Abstract}
Direct Subclassifiers:
ARCHETYPE
Abstract idea of an online resource created by a human author.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
is_controlled : Boolean | 0..1 | -- | | True if this resource is under any kind of change control (even file copying), in which case revision history is created. |
original_language : CODE_PHRASE | 1 | -- | | Language in which this resource was initially authored. Although there is no language primacy
of resources overall, the language of original authoring is required to ensure natural language translations can preserve quality. Language is relevant in both the description and ontology sections. |
translations : Hash<TRANSLATION_DETAILS, String> | 0..1 | -- | | List of details for each natural translation made of this resource, keyed by language. For each translation listed here, there must be corresponding sections in all language-dependent parts of the resource. The original_language does not appear in this list. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| revision_history : REVISION_HISTORY | 0..1 | -- | The revision history of the resource. Only required if is_controlled = True (avoids large revision histories for informal or private editing situations). |
| description : RESOURCE_DESCRIPTION | 0..1 | -- | Description and lifecycle information of the resource. |
| Operations |
| Signature | Constraints | Documentation |
current_revision()
:
String |
post: Result = revision_history.most_recent_version | Most recent revision in revision_history if is_controlled else “(uncontrolled)”. |
languages_available()
:
Set<String> | | Total set of languages available in this resource, derived from original_language and translations. |
| Constraints |
| Name | Expression |
| Revision_history_valid | inv: is_controlled xor revision_history = Void |
| Current_revision_valid | inv: current_revision <> Void and not is_controlled implies current_revision.is_equal('(uncontrolled)') |
| Original_language_valid | inv: original_language <> void and
code_set(Code_set_id_languages).has_code(original_language.as_string) |
| Languages_available_valid | inv: languages_available <> Void and
languages_available.has(original_language) |
| Translations_valid | inv: translations <> Void implies (not translations.is_empty and not translations.has(orginal_language.code_string)) |
| Description_valid | inv: translations <> Void implies (description.details.for_all(d | translations.has_key(d.language.code_string))) |
Parent Package: resource
Class RESOURCE_DESCRIPTION_ITEM
Language-specific detail of resource description. When a resource is translated for use in another language environment, each RESOURCE_DESCRIPTION_ITEM needs to be copied and translated into the new language.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
copyright : String | 0..1 | -- | | Optional copyright statement for the resource as a knowledge resource. |
keywords : List<String> | 0..1 | -- | | Keywords which characterise this resource, used e.g. for indexing and searching. |
language : CODE_PHRASE | 1 | -- | | The localised language in which the items in this description item are written. Coded from openEHR Code Set “languages”. |
misuse : String | 0..1 | -- | | Description of any misuses of the resource, i.e. contexts in which it should not be used. |
original_resource_uri : Hash<String,String> | 0..1 | -- | | URIs of original clinical document(s) or description of which resource is a formalisation, in the language of this description item; keyed by meaning. |
other_details : Hash<String,String> | 0..1 | -- | | Additional language-senstive resource metadata, as a list of name/value pairs. |
purpose : String | 1 | -- | | Purpose of the resource. |
use : String | 0..1 | -- | | Description of the uses of the resource, i.e. contexts in which it could be used. |
| Constraints |
| Name | Expression |
| copyright_valid | inv: copyright <> Void implies not copyright.is_empty |
| misuse_valid | inv: misuse <> Void implies not misuse.is_empty |
| use_valid | inv: use <> Void implies not use.is_empty |
| purpose_valid | inv: purpose <> Void and not purpose.is_empty |
| Language_valid | inv: language <> Void and code_set('languages').has(language) |
Parent Package: rm
Package :: composition
The Composition is the primary ‘data container’ in the openEHR EHR and is the root point of clinical content. Instances of the Composition class can be considered as self-standing data aggregations, or documents in a document-oriented system (similar to HL7 CDA Documents). The key information in a COMPOSITION is found in its content, context, and composer attributes. The majority of the use of paths in openEHR is likely to be within Compositions.
Parent Package: composition
Class COMPOSITION
LOCATABLE
| +--COMPOSITION
One version in a VERSIONED_COMPOSITION. A composition is considered the unit of modification of the record, the unit of transmission in record extracts, and the unit of attestation by authorising clinicians. In this latter sense, it may be considered equivalent to a signed document.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
category : DV_CODED_TEXT | 1 | -- | | Indicates what broad category this Composition is belogs to, e.g. “persistent” - of longitudinal validity, “event”, “process” etc. |
language : CODE_PHRASE | 1 | -- | | Mandatory indicator of the localised language in which this Entry is written. Coded from
openEHR Code Set “languages”. |
territory : CODE_PHRASE | 1 | -- | | Name of territory in which this Composition was written. Coded from openEHR “countries” code set, which is an expression of the ISO 3166 standard. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| context : EVENT_CONTEXT | 0..1 | -- | The clinical session context of this Composition, i.e. the contextual attributes of the clinical session. |
| content : Set<CONTENT_ITEM> | 0..1 | 0..* | The content of this Composition. |
| composer : PARTY_PROXY | 1 | -- | |
| Operations |
| Signature | Constraints | Documentation |
is_persistent()
:
Boolean | | True if category is a “persistent” type, False otherwise. Useful for finding Compositions in an EHR which are guaranteed to be of interest to most users. |
| Constraints |
| Name | Expression |
| Is_archetype_root | inv: is_archetype_root |
| Content_valid | inv: content <> Void implies not content.is_empty |
| Composer_valid | inv: composer <> Void |
| Territory_valid | inv: territory <> Void and
code_set(Code_set_id_countries).has_code(territory) |
| No_parent | inv: parent = Void |
| Is_persistent_validity | inv: is_persistent implies context = Void |
| Category_validity | inv: category <> Void and
terminology(Terminology_id_openehr).
has_code_for_group_id(Group_id_composition_category, category.
defining_code) |
| language_valid | inv: language <> Void and code_set(Code_set_id_languages).has_code(language)
|
Parent Package: composition
Class EVENT_CONTEXT
PATHABLE
| +--EVENT_CONTEXT
Documents the context information of a healthcare event involving the subject of care and the health system. The context information recorded here are independent of the attributes recorded in the version audit, which document the “system interaction” context, i.e. the context of a user interacting with the health record system. Healthcare events include patient contacts, and any other business activity, such as pathology investigations which take place on behalf of the patient.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
end_time : DV_DATE_TIME | 0..1 | -- | | Optional end time of the clinical session. |
location : String | 0..1 | -- | | The actual location where the session occurred, e.g. “microbiol lab 2”, “home”, “ward A3” and so on. |
other_context : ITEM_STRUCTURE | 0..1 | -- | | Other optional context which will be archetyped. |
setting : DV_CODED_TEXT | 1 | -- | | The setting in which the clinical session took place. Coded using the openEHR Terminology, “setting” group. |
start_time : DV_DATE_TIME | 1 | -- | | Start time of the clinical session or other kind of event during which a provider performs a service of any kind for the patient. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| health_care_facility : PARTY_REF | 0..1 | -- |
|
| composer : PARTY_REF | 1 | -- |
|
| participations : Set<PARTICIPATION> | 0..1 | 0..* | Parties involved in the healthcare event. These would normally include the physician(s) and often the patient (but not the latter if the clinical session is a pathology test for example). |
| health_care_facility : PARTY_IDENTIFIED | 0..1 | -- | The health care facility under whose care the event took place. This is the most specific workgroup or delivery unit within a care delivery enterprise that has an official identifier in the health system, and can be used to ensure medico-legal accountability. |
| Constraints |
| Name | Expression |
| setting_valid | inv: setting <> Void and Terminology(Terminology_id_openehr).has_code_for_group_id
(Group_id_setting, setting.defining_code) |
| participations_validity | inv: participations <> Void implies not participations.
is_empty |
| start_time_valid | inv: start_time <> Void |
| location_valid | inv: location <> Void implies not location.is_empty
|
Parent Package: composition
Package :: content
Parent Package: content
Class CONTENT_ITEM{Abstract}
LOCATABLE
| +--CONTENT_ITEM
Direct Subclassifiers:
SECTION, ENTRY, GENERIC_ENTRY
Abstract ancestor of all concrete content types.
Parent Package: content
Package :: entry
All information which is created in the openEHR health record is expressed as an instance of a class in the entry package, containing the ENTRY class and a number of descendants. An ENTRY instance is logically a single ‘clinical statement’, and may be a single short narrative phrase, but may also contain a significant amount of data, e.g. an entire microbiology result, a psychiatric examination, a complex prescription. In terms of actual content, the Entry classes are the most important in the openEHR EHR Information Model, since they define the semantics of all the ‘hard’ information in the record. They are intended to be achetyped, and in fact, archetypes for Entries make up the vast majority of important clinical archetypes defined.
Parent Package: entry
Class OBSERVATION
CARE_ENTRY
| +--OBSERVATION
Entry subtype for all clinical data in the past or present, i.e. which (by the time it is recorded) has already occurred. OBSERVATION data is expressed using the class HISTORY, which guarantees that it is situated in time.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
data : HISTORY | 1 | -- | | The data of this observation, in the form of a history of values which may be of any complexity. |
state : HISTORY | 0..1 | -- | | Optional recording of the state of subject of this observation during the observation process, in the form of a separate history of values which may be of any complexity. State may also be recorded within the History of the data attribute. |
Parent Package: entry
Class EVALUATION
ENTRY, CARE_ENTRY
| +--EVALUATION
Entry type for evaluation statements.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
data : ITEM_STRUCTURE | 1 | -- | | The data of this evaluation, in the form of a spatial data structure. |
Parent Package: entry
Class INSTRUCTION
CARE_ENTRY, ENTRY
| +--INSTRUCTION
Used to specify actions in the future. Enables simple and complex specifications
to be expressed, including in a fully-computable workflow form.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
expiry_time : DV_DATE_TIME | 0..1 | -- | | Optional expiry date/time to assist determination of when an Instruction can be assumed to have expired. This helps prevent false listing of Instructions as Active when they clearly must have been terminated in some way or other. |
narrative : DV_TEXT | 1 | -- | | Mandatory human-readable version of what the Instruction is about. |
wf_definition : DV_PARSABLE | 0..1 | -- | | Optional workflow engine executable expression of the Instruction. |
| Attributes from Associations |
| | Signature | Optionality | Multiplicity | Documentation |
| activities : Set<ACTIVITY> | 0..1 | * | List of all activities in Instruction. |
| Constraints |
| Name | Expression |
| Narrative_valid | inv: narrative <> Void |
| Activities_valid | inv: activities <> Void implies not activities.is_empty |
Parent Package: entry
Class ENTRY{Abstract}
CONTENT_ITEM
| +--ENTRY
Direct Subclassifiers:
CARE_ENTRY, EVALUATION, INSTRUCTION, ADMIN_ENTRY
The abstract parent of all ENTRY subtypes. An ENTRY is the root of a logical item of “hard” clinical information created in the “clinical statement” context, within a clinical session. There can be numerous such contexts in a clinical session. Observations and other Entry types only ever document information captured/created in the event documented by the enclosing Composition.
An ENTRY is also the minimal unit of information any query should return, since a whole ENTRY (including subparts) records spatial structure, timing information, and contextual information, as well as the subject and generator of the information.
| Attributes |
| Signature | Optionality | Multiplicity | Constant | Documentation |
encoding : CODE_PHRASE | 1 | -- | | Name of character set in which text values in this Entry are encoded. Coded from openEHR Code Set “character sets”. |
language : CODE_PHRASE | 1 | -- | | Mandatory indicator of the localised language in which this Entry is written. Coded from
openEHR Code Set “languages”. |
other_participations : List<PARTICIPATION> | 0..1 | -- | | Other participations at ENTRY level. |
provider : PARTY_PROXY | 0..1 | -- | | Optional identification of provider of the informatoin in this ENTRY, which might be:
• the patient
• a patient agent, e.g. parent, guardian
• the clinician
• a device or software
Generally only used when the recorder needs to make it explicit. Otherwise, Composition
composer and other participants are assumed. |
subject : PARTY_PROXY | 1 | -- | | Id of human subject of this ENTRY, e.g.:
• organ donor
• foetus
• a family member
• another clinically relevant person. |
workflow_id : OBJECT_REF | 0..1 | -- | | Identifier of externally held workflow engine data for this workflow execution, for this subject of care. |
| Operations |
| Signature | Constraints | Documentation |
subject_is_self()
:
Boolean | | Returns True if this Entry is about the subject of the EHR, in which case the subject attribute
is of type PARTY_SELF. |
| Constraints |
| Name | Expression |
| Subject_validity | inv: subject_is_self implies subject.generating_type =
'PARTY_SELF' |
| Archetype_root_point | inv: is_archetype_root |
| Other_participations_valid | inv: other_participations <> Void implies not
other_participations.is_empty
|
| Language_valid | inv: language <> Void and code_set(Code_set_id_languages).has_code(language)
|
| Encoding_valid | inv: encoding <> Void and code_set(Code_set_id_character_sets).has_code(encoding)
|
Parent Package: entry
Class ADMIN_ENTRY
|