History Package
Overview
The history package defines classes which formalise the concept of past, linear time, via which historical data of any structural complexity can be recorded. It supports both instantaneous and interval event samples within periodic and aperiodic series.
Regardless of whether the actual data consist of a single sample or many, they are represented in the same way: as a history of events, i.e. as a time series, allowing all software to access data in a uniform way, whether it be a single measurement of weight, a long series of three- or four-dimensional images, or a series of encapsulated multimedia items. The type of data contained in a History structure may be any openEHR data, including text, coded, quantitative, time, or multimedia. In the case of quantitative and date/time data (rm.data_types.quantity package in openEHR Data Types), the data are formally quantitative, but for the vast majority of cases of other types of data (text, coded etc), there is an obvious quantitative interpretation associated with the values. An example is samples whose data values are coded terms such as 'low', 'normal', 'high', 'critical high', representing blood pressure measurements over time.
Instantaneous events are representing using the type POINT_EVENT, for which the value (data attribute) always represents an actual instantaneous value of a datum at a point in time. However, time series data may also be represented using the INTERVAL_EVENT type, enabling values other than 'actual' to be recorded for intervals of time. Events recorded in this form are accordingly tagged with a mathematical function, such as 'actual', 'mean', 'change' and so on, as defined by the openEHR event math function vocabulary.
The model also supports the inclusion of 'summary' data, i.e. a textual or image item which summarises in some way the entire history.
In formal terms, the model defines the constrained generic (otherwise known as 'template' or 'parameterised') types HISTORY<T→ITEM_STRUCTURE>, EVENT<T→ITEM_STRUCTURE>, POINT_EVENT<T>, and INTERVAL_EVENT<T> where the type parameter is constrained to the ITEM_STRUCTURE type, and defines the type of the data recorded in an instance of HISTORY. The effect is that repeated instances of spatially complex data can recur in time, corresponding to the way data are actually measured. An aperiodic series of POINT_EVENT instances would typically be used to represent manual measurements repeated in time. Periodic histories of INTERVAL_EVENT instances would typically be used to represent vital signs monitor output (which is usually delivered in averaged form potentially with additional minimum and maximum values).
As with all other parts of the openEHR reference model, the history package is designed so that archetypes define the domain semantics of HISTORY instances. The history package is shown on the left of [data_structures_package].
Basic Semantics
The intention of the History model is to represent time-based data for which every sample in the series is a measurement of the same phenomenon (e.g. patient heart rate) and is obtained using the same measurement method (e.g. pulse oximeter). Samples taken in this way can be reliably treated as comparable, i.e. representing changes in the same phenomenon over time, and accordingly can be safely used for time-based computation, such as graphing, statistical analysis and so on. A History can contain any mixture of POINT_EVENT and INTERVAL_EVENT instances. Clearly it is impossible for the model to guarantee completely correct usage on its own, however there two major safeguards.
Firstly, the use of generic types forces the type of the data in each Event to be the same. A History of type HISTORY<ITEM_LIST> therefore constrains the type of the data at each Event (EVENT.item) to be of type ITEM_LIST and nothing else.
Secondly, the use of archetyping (typically within openEHR Observation archetypes) ensures the actual structure of the ITEM_STRUCTURE subtype is defined in the same way for every sample - e.g. a two-item list representing systolic and diastolic blood pressure.
Timing
An instance of the HISTORY class contains the origin: DV_DATE_TIME attribute, indicating what is considered the '0-point' of the time series, and a series of instances of the EVENT subtype, each containing a time: DV_DATE_TIME attribute representing the absolute time of the event. The relative offset
of any Event is computed as the difference between the EVENT.time and HISTORY.origin by the EVENT.offset function. For Interval events (i.e. instances of INTERVAL_EVENT), the time attribute always refers to the end time of the event, since this is the time at which the data (e.g. average) are true.
The origin time of a History does not have to be the time of the first sample - it might be the time of an event such as child-birth with respect to which the samples are recorded, e.g. Apgar scores (Apgar is a 0-10 score indicating the health of a newborn based on breathing, heartrate, colour, muscletone and reflexes) at 1 and 3 minute offsets.
Periodicity and aperiodicity are expressed via the is_periodic and period attributes. For a periodic time-series, period is set to the period duration value and is_periodic returns True. The total duration of the History is given by the HISTORY.duration function. The following figure illustrates a number of variations in History periodicity and Event type.
Point Events
The simplest kind of Event in a History is a 'point' event, expressed by instances of the class POINT_EVENT, representing an instantaneous value. A HISTORY instance may be composed solely of Point events, as would be the case with a number of blood pressure values measured over time as the patient changes position. An Apgar result is a typical example of aperiodic point data, typically consisting of 2 or 3 events, each containing 5 values and a 6th value repersenting the Apgar score for that time point. Point data may also be available from monitoring devices. For fine-granularity (e.g. 1 second) data, the number of samples may be too voluminous for the health record, and more efficient recording in the form of summary Interval events (see below) might be desired. The diagram below illustrates the structure of a HISTORY containing POINT_EVENTs.
HISTORY<T> of POINT_EVENTsInterval Events
Instances of the INTERVAL_EVENT class are used to express values corresponding to an interval in time. The INTERVAL_EVENT.width attribute defines the duration of the interval; and the inherited time value corresponds to the trailing edge of the event.
The semantics of the Interval event type in this model are that the values effectively summarise actual instantaneous values of a datum that have occurred during the period of the event interval. The mathematical meaning of the data value of any particular interval event is given by the math_function attribute. This is coded by the openEHR vocabulary event math function, and takes values such as 145|minimum|, 144|maximum|, 146|mean|, 147|change| and so on. The math function value on a particular event applies to all the data points attached to the event data attribute.
The particular math functions used in each Interval event in a History may vary throughout the History; for example, one 4-hour Interval event might contain data representing average values, while a following event might contain data representing maximum values for the same or a later time point. Such data can be conveniently used for generating sophisticated graphs of the underlying datum over time. The next figure illustrates a History containing 2 pairs of 4-hour blood pressure Interval events, with each pair containing maximum and mean blood pressure value structures for +4h and +8h timepoints (each of which consist of a systolic and diastolic value).
HISTORY<T> of INTERVAL_EVENTsInterval events can overlap other interval or point events within the same History. A situation where this may occur is with measurement of different periods of vital signs, such as 4-hourly blood pressure events, overlapped by a 24-hour event which contains the values over a period of 6 x 4 hour periods. In general a long Interval event can overlap any combination of Point or Interval events, as shown in the following figure.
Change Data
One sub-category of interval data that deserves mention is change data. There are three event math function terms used for indicating changes in data values as follows:
-
147|change|: this means that the value recorded is the difference between the value now and the value some time previously. It can be positive or negative; -
522|increase|: the value recorded for the change is positive. The name (i.e.ELEMENT.name) chosen for the item in an archetype carries the semantic of positivity e.g. 'increase of ….; rise of….; ….gain' etc; -
521|decrease|: the value recorded for the change is positive. But the name chosen for the item carries the semantic of negativity e.g. 'decrease of ….; fall of ….; …. loss'.
The following examples show how the data and these math functions are coordinated.
-
weight last week was 76 kg. Wait this week = 74 kg. Possible instances:
| Item Name in Archetype |
Value stored |
Type | Math Function |
|---|---|---|---|
'weight change' |
+ 2kg |
|
|
'weight loss' |
(+)2kg |
|
|
'weight loss' |
True |
|
|
-
weight last week was 80 kg. Weight this week = 83 kg. Possible instances:
| Item Name in Archetype |
Value stored |
Type | Math Function |
|---|---|---|---|
'weight change' |
(+)3kg |
|
|
'weight increase' |
(+)3kg |
|
|
'weight gain' |
True |
|
|
The use of these math function indicators allows the correct representation of change values, no matter how they were captured, in a computable form.
Summary Event Data
A relatively common situation particularly in laboratory testing is the existence of a "summarising" event which accompanies more detailed historical data. Examples where this arises include:
-
a series of exams with a single radiologist report for all of them (the report might include one or more key images);
-
graphical summary of a dynamic challenge test such as Glucose tolerance test;
-
some comment about the pattern of values on a set of observed values in series.
Such data are accommodated within the model via the optional HISTORY.summary attribute, which is
itself a structure, archetypable separately from the structure of the main data. In the first example
above, the summary data might consist of an ITEM_SINGLE object containing a textual report; in the
second, an ITEM_SINGLE object containing a image within a DV_MULTIMEDIA instance.
Efficient Representation of Fine-grained Device Data
A useful practical consequence of the Interval Event is that it allows long periods of stable data to be represented with a single Interval event, while interesting perturbations will be represented with a number of fine-grained Interval or Point Events. In the example in the next figure, Event instances are used represent 4 hours of data consisting to 14,400 x 1 second samples from a blood pressure monitor. The optional INTERVAL_EVENT.sample_count attribute can be used to record the number of original samples summarised in the event. In the illustration, the math_function is shown as 146|mean|; clearly in the first long period, the monitored datum was not absolutely flat. The implication is that the recording software was configured to regard variations in a small band (e.g. 5mm Hg) as insignificant, and only to create new Event objects when the underlying values moved outside the band. Another approach woould have been to create two Interval Event objects for each long period, one giving minimum value, the other maxium value, still based on the principle of generating one such pair for periods when the underlying data remained within specified limits. Regardless of the details, this general approach provides a way to include hours of fine-grained data from devices like vital signs monitors in very little space; the data simply need to be transfomed into equivalent openEHR History form first.
State
A feature particular to a model of recording historical data for scientific and clinical use is the ability to record 'state'. In openEHR, 'state' is understood as time-based information about the whole entity from which the values recorded in the data attribute are recorded. The state attribute thus records data necessary for the correct interpretation of the primary values recorded in the data attribute. An example is where the primary datum is heart rate (values representing rate of the heart beating). Useful state data may include anything else from the owning entity (a human being) that affects the heart rate, such as the level of exertion of the subject (resting, after 3 minutes hard cycling etc). In clinical situations, the state data are often crucial to the safe use of the primary data, since the latter might be normal or abnormal depending on the patient state.
In openEHR there are two ways of recording state. One is via the use of a separate HISTORY structure within the OBSERVATION class (see ehr.composition.content.entry package). The other is via the use of the state attribute of type ITEM_STRUCTURE defined in the class EVENT itself. Experience with openEHR archetypes and systems has shown that the latter method corresponds to the most common clinical need, which is to be able to record the state at the time of the event (the other method allows for the recording of independent state events). A simple example is the recording of 3 glucose levels during a glucose tolerance test. The state information for each event is, respectively (in a typical test):
-
0-minute sample: 'post 8-hour fast;
-
1-hour sample: 'post 75g oral glucose challenge';
-
2-hour sample: 'post 75g oral glucose challenge'.
The History structure for this example is illustrated in the following figure.
HISTORYClass Descriptions
HISTORY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
HISTORY<T> |
|
|---|---|---|
Description |
Root object of a linear history, i.e. time series structure. This is a generic class whose type parameter must be a descendant of For a periodic series of events, period will be set, and the time of each Event in the History must correspond; i.e. the |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
origin: |
Time origin of this event history. The first event is not necessarily at the origin point. |
0..1 |
period: |
Period between samples in this segment if periodic. |
0..1 |
duration: |
Duration of the entire History; either corresponds to the duration of all the events, and/or the duration represented by the summary, if it exists. |
0..1 |
summary: |
Optional summary data that aggregates, organizes, reduces and transforms the event series. This may be a text or image that presents a graphical presentation, or some data that assists with the interpretation of the data. |
0..1 |
The events in the series. This attribute is of a generic type whose parameter must be a descendant of |
|
Functions |
Signature |
Meaning |
1..1 |
is_periodic (): |
Indicates whether history is periodic. |
Invariants |
Events_valid: |
|
Periodic_validity: |
||
Period_consistency: |
||
| HISTORY<T> | |||
|---|---|---|---|
Root object of a linear history, i.e. time series structure. This is a generic class whose type parameter must be a descendant of For a periodic series of events, period will be set, and the time of each Event in the History must correspond; i.e. the |
|||
Inherits: Any, PATHABLE, LOCATABLE, DATA_STRUCTURE |
|||
Attributes |
|||
Runtime name of this fragment, used to build runtime paths. This is the term provided via a clinical application or batch process to name this EHR construct: its retention in the EHR faithfully preserves the original label by which this entry was known to end users. |
|||
Design-time archetype identifier of this node taken from its generating archetype; used to build archetype paths. Always in the form of an at-code, e.g. At an archetype root point, the value of this attribute is always the stringified form of the |
|||
LOCATABLE.uid: |
Optional globally unique object identifier for root points of archetyped structures. |
||
Links to other archetyped structures (data whose root object inherits from |
|||
LOCATABLE.archetype_details: |
Details of archetyping used on this node. |
||
LOCATABLE.feeder_audit: |
Audit trail from non-openEHR system of original commit of information forming the content of this node, or from a conversion gateway which has synthesised this node. |
||
origin: |
Time origin of this event history. The first event is not necessarily at the origin point. |
||
period: |
Period between samples in this segment if periodic. |
||
duration: |
Duration of the entire History; either corresponds to the duration of all the events, and/or the duration represented by the summary, if it exists. |
||
summary: |
Optional summary data that aggregates, organizes, reduces and transforms the event series. This may be a text or image that presents a graphical presentation, or some data that assists with the interpretation of the data. |
||
The events in the series. This attribute is of a generic type whose parameter must be a descendant of |
|||
Functions |
|||
Value equality: return True if Parameters
|
|||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
Parent of this node in a compositional hierarchy. |
|||
PATHABLE.item_at_path ( |
The item at a path (relative to this item); only valid for unique paths, i.e. paths that resolve to a single item. |
||
PATHABLE.items_at_path ( |
List of items corresponding to a non-unique path. |
||
PATHABLE.path_exists ( |
True if the path exists in the data with respect to the current item. |
||
PATHABLE.path_unique ( |
True if the path corresponds to a single item in the data. |
||
The path to an item relative to the root of this archetyped structure. |
|||
Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node) |
|||
True if this node is the root of an archetyped structure. |
|||
DATA_STRUCTURE.as_hierarchy (): |
Hierarchical equivalent of the physical representation of each subtype, compatible with CEN EN 13606 structures. |
||
is_periodic (): |
Indicates whether history is periodic. |
||
Invariants |
|||
LOCATABLE.Links_valid: |
|||
LOCATABLE.Archetyped_valid: |
|||
LOCATABLE.Archetype_node_id_valid: |
|||
Events_valid: |
|||
Periodic_validity: |
|||
Period_consistency: |
|||
{
"name": "HISTORY",
"documentation": "Root object of a linear history, i.e. time series structure. This is a generic class whose type parameter must be a descendant of `ITEM_STRUCTURE`, ensuring that each Event in the `_events_` of a given instance is of the same structural type, i.e. `ITEM_TREE`, `ITEM_LIST` etc.\n\nFor a periodic series of events, period will be set, and the time of each Event in the History must correspond; i.e. the `EVENT._offset_` must be a multiple of period for each Event. Missing events in a period History are however allowed. ",
"ancestors": [
"DATA_STRUCTURE"
],
"generic_parameter_defs": {
"T": {
"name": "T",
"conforms_to_type": "ITEM_STRUCTURE"
}
},
"properties": {
"origin": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "origin",
"documentation": "Time origin of this event history. The first event is not necessarily at the origin point. ",
"is_mandatory": true,
"type": "DV_DATE_TIME"
},
"period": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "period",
"documentation": "Period between samples in this segment if periodic.",
"type": "DV_DURATION"
},
"duration": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "duration",
"documentation": "Duration of the entire History; either corresponds to the duration of all the events, and/or the duration represented by the summary, if it exists. ",
"type": "DV_DURATION"
},
"summary": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "summary",
"documentation": "Optional summary data that aggregates, organizes, reduces and transforms the event series. This may be a text or image that presents a graphical presentation, or some data that assists with the interpretation of the data.",
"type": "ITEM_STRUCTURE"
},
"events": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "events",
"documentation": "The events in the series. This attribute is of a generic type whose parameter must be a descendant of `ITEM_SUTRUCTURE`.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "EVENT",
"generic_parameters": [
"T"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"is_periodic": {
"name": "is_periodic",
"documentation": "Indicates whether history is periodic. \n",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Events_valid": "(events /= Void and then not events.is_empty) or summary /= Void",
"Periodic_validity": "is_periodic xor period = Void",
"Period_consistency": "is_periodic implies events.for_all (e: EVENT | e.offset. to_seconds.mod(period.to_seconds) = 0)"
}
}
EVENT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EVENT<T> (abstract) |
|
|---|---|---|
Description |
Defines the abstract notion of a single event in a series. This class is generic, allowing types to be generated which are locked to particular spatial types, such as |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
time: |
Time of this event. If the width is non-zero, it is the time point of the trailing edge of the event. |
0..1 |
state: |
Optional state data for this event. |
1..1 |
data: |
The data of this event. |
Functions |
Signature |
Meaning |
1..1 |
offset (): |
Offset of this event from origin, computed as time.diff(parent.origin). |
Invariants |
Offset_validity1: |
|
| EVENT<T> (abstract) | |||
|---|---|---|---|
Defines the abstract notion of a single event in a series. This class is generic, allowing types to be generated which are locked to particular spatial types, such as |
|||
Attributes |
|||
Runtime name of this fragment, used to build runtime paths. This is the term provided via a clinical application or batch process to name this EHR construct: its retention in the EHR faithfully preserves the original label by which this entry was known to end users. |
|||
Design-time archetype identifier of this node taken from its generating archetype; used to build archetype paths. Always in the form of an at-code, e.g. At an archetype root point, the value of this attribute is always the stringified form of the |
|||
LOCATABLE.uid: |
Optional globally unique object identifier for root points of archetyped structures. |
||
Links to other archetyped structures (data whose root object inherits from |
|||
LOCATABLE.archetype_details: |
Details of archetyping used on this node. |
||
LOCATABLE.feeder_audit: |
Audit trail from non-openEHR system of original commit of information forming the content of this node, or from a conversion gateway which has synthesised this node. |
||
time: |
Time of this event. If the width is non-zero, it is the time point of the trailing edge of the event. |
||
state: |
Optional state data for this event. |
||
data: |
The data of this event. |
||
Functions |
|||
Value equality: return True if Parameters
|
|||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
Parent of this node in a compositional hierarchy. |
|||
PATHABLE.item_at_path ( |
The item at a path (relative to this item); only valid for unique paths, i.e. paths that resolve to a single item. |
||
PATHABLE.items_at_path ( |
List of items corresponding to a non-unique path. |
||
PATHABLE.path_exists ( |
True if the path exists in the data with respect to the current item. |
||
PATHABLE.path_unique ( |
True if the path corresponds to a single item in the data. |
||
The path to an item relative to the root of this archetyped structure. |
|||
Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node) |
|||
True if this node is the root of an archetyped structure. |
|||
offset (): |
Offset of this event from origin, computed as time.diff(parent.origin). |
||
Invariants |
|||
LOCATABLE.Links_valid: |
|||
LOCATABLE.Archetyped_valid: |
|||
LOCATABLE.Archetype_node_id_valid: |
|||
Offset_validity1: |
|||
{
"name": "EVENT",
"documentation": "Defines the abstract notion of a single event in a series. This class is generic, allowing types to be generated which are locked to particular spatial types, such as `EVENT<ITEM_LIST>`. Subtypes express point or intveral data. ",
"is_abstract": true,
"ancestors": [
"LOCATABLE"
],
"generic_parameter_defs": {
"T": {
"name": "T",
"conforms_to_type": "ITEM_STRUCTURE"
}
},
"properties": {
"time": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "time",
"documentation": "Time of this event. If the width is non-zero, it is the time point of the trailing edge of the event. ",
"is_mandatory": true,
"type": "DV_DATE_TIME"
},
"state": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "state",
"documentation": "Optional state data for this event.",
"type": "ITEM_STRUCTURE"
},
"data": {
"_type": "P_BMM_SINGLE_PROPERTY_OPEN",
"name": "data",
"documentation": "The data of this event.",
"is_mandatory": true,
"type": "T"
}
},
"functions": {
"offset": {
"name": "offset",
"documentation": "Offset of this event from origin, computed as time.diff(parent.origin).",
"post_conditions": {
"Post_condition": "Result = time.diff(parent.origin)"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_DURATION"
}
}
},
"invariants": {
"Offset_validity1": "offset /= Void and then offset = time.diff (parent.origin)"
}
}
POINT_EVENT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
POINT_EVENT<T> |
|
|---|---|---|
Description |
Defines a single point event in a series. |
|
Inherit |
||
| POINT_EVENT<T> | |||
|---|---|---|---|
Defines a single point event in a series. |
|||
Attributes |
|||
Runtime name of this fragment, used to build runtime paths. This is the term provided via a clinical application or batch process to name this EHR construct: its retention in the EHR faithfully preserves the original label by which this entry was known to end users. |
|||
Design-time archetype identifier of this node taken from its generating archetype; used to build archetype paths. Always in the form of an at-code, e.g. At an archetype root point, the value of this attribute is always the stringified form of the |
|||
LOCATABLE.uid: |
Optional globally unique object identifier for root points of archetyped structures. |
||
Links to other archetyped structures (data whose root object inherits from |
|||
LOCATABLE.archetype_details: |
Details of archetyping used on this node. |
||
LOCATABLE.feeder_audit: |
Audit trail from non-openEHR system of original commit of information forming the content of this node, or from a conversion gateway which has synthesised this node. |
||
EVENT.time: |
Time of this event. If the width is non-zero, it is the time point of the trailing edge of the event. |
||
EVENT.state: |
Optional state data for this event. |
||
EVENT.data: |
The data of this event. |
||
Functions |
|||
Value equality: return True if Parameters
|
|||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
Parent of this node in a compositional hierarchy. |
|||
PATHABLE.item_at_path ( |
The item at a path (relative to this item); only valid for unique paths, i.e. paths that resolve to a single item. |
||
PATHABLE.items_at_path ( |
List of items corresponding to a non-unique path. |
||
PATHABLE.path_exists ( |
True if the path exists in the data with respect to the current item. |
||
PATHABLE.path_unique ( |
True if the path corresponds to a single item in the data. |
||
The path to an item relative to the root of this archetyped structure. |
|||
Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node) |
|||
True if this node is the root of an archetyped structure. |
|||
EVENT.offset (): |
Offset of this event from origin, computed as time.diff(parent.origin). |
||
Invariants |
|||
LOCATABLE.Links_valid: |
|||
LOCATABLE.Archetyped_valid: |
|||
LOCATABLE.Archetype_node_id_valid: |
|||
EVENT.Offset_validity1: |
|||
{
"name": "POINT_EVENT",
"documentation": "Defines a single point event in a series.",
"ancestors": [
"EVENT"
],
"generic_parameter_defs": {
"T": {
"name": "T"
}
}
}
INTERVAL_EVENT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
INTERVAL_EVENT<T> |
|
|---|---|---|
Description |
Defines a single interval event in a series. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
width: |
Duration of the time interval during which the values recorded under |
0..1 |
sample_count: |
Optional count of original samples to which this event corresponds. |
1..1 |
math_function: |
Mathematical function of the data of this event, e.g. maximum, mean etc. Coded using openEHR vocabulary |
Functions |
Signature |
Meaning |
1..1 |
interval_start_time (): |
Start time of the interval of this event. |
Invariants |
Math_function_validity: |
|
Interval_start_time_valid: |
||
| INTERVAL_EVENT<T> | |||
|---|---|---|---|
Defines a single interval event in a series. |
|||
Attributes |
|||
Runtime name of this fragment, used to build runtime paths. This is the term provided via a clinical application or batch process to name this EHR construct: its retention in the EHR faithfully preserves the original label by which this entry was known to end users. |
|||
Design-time archetype identifier of this node taken from its generating archetype; used to build archetype paths. Always in the form of an at-code, e.g. At an archetype root point, the value of this attribute is always the stringified form of the |
|||
LOCATABLE.uid: |
Optional globally unique object identifier for root points of archetyped structures. |
||
Links to other archetyped structures (data whose root object inherits from |
|||
LOCATABLE.archetype_details: |
Details of archetyping used on this node. |
||
LOCATABLE.feeder_audit: |
Audit trail from non-openEHR system of original commit of information forming the content of this node, or from a conversion gateway which has synthesised this node. |
||
EVENT.time: |
Time of this event. If the width is non-zero, it is the time point of the trailing edge of the event. |
||
EVENT.state: |
Optional state data for this event. |
||
EVENT.data: |
The data of this event. |
||
width: |
Duration of the time interval during which the values recorded under |
||
sample_count: |
Optional count of original samples to which this event corresponds. |
||
math_function: |
Mathematical function of the data of this event, e.g. maximum, mean etc. Coded using openEHR vocabulary |
||
Functions |
|||
Value equality: return True if Parameters
|
|||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
Parent of this node in a compositional hierarchy. |
|||
PATHABLE.item_at_path ( |
The item at a path (relative to this item); only valid for unique paths, i.e. paths that resolve to a single item. |
||
PATHABLE.items_at_path ( |
List of items corresponding to a non-unique path. |
||
PATHABLE.path_exists ( |
True if the path exists in the data with respect to the current item. |
||
PATHABLE.path_unique ( |
True if the path corresponds to a single item in the data. |
||
The path to an item relative to the root of this archetyped structure. |
|||
Clinical concept of the archetype as a whole (= derived from the archetype_node_id' of the root node) |
|||
True if this node is the root of an archetyped structure. |
|||
EVENT.offset (): |
Offset of this event from origin, computed as time.diff(parent.origin). |
||
interval_start_time (): |
Start time of the interval of this event. |
||
Invariants |
|||
LOCATABLE.Links_valid: |
|||
LOCATABLE.Archetyped_valid: |
|||
LOCATABLE.Archetype_node_id_valid: |
|||
EVENT.Offset_validity1: |
|||
Math_function_validity: |
|||
Interval_start_time_valid: |
|||
{
"name": "INTERVAL_EVENT",
"documentation": "Defines a single interval event in a series. ",
"ancestors": [
"EVENT"
],
"generic_parameter_defs": {
"T": {
"name": "T"
}
},
"properties": {
"width": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "width",
"documentation": "Duration of the time interval during which the values recorded under `data` are true and, if set, the values recorded under `state` are true. Void if an instantaneous event.",
"is_mandatory": true,
"type": "DV_DURATION"
},
"sample_count": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "sample_count",
"documentation": "Optional count of original samples to which this event corresponds.",
"type": "Integer"
},
"math_function": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "math_function",
"documentation": "Mathematical function of the data of this event, e.g. maximum, mean etc. Coded using https://github.com/openEHR/terminology/blob/master/openEHR_RM/en/openehr_terminology.xml[openEHR vocabulary `event math function`]. Default value `640|actual|`, meaning 'actual value'.",
"is_mandatory": true,
"type": "DV_CODED_TEXT"
}
},
"functions": {
"interval_start_time": {
"name": "interval_start_time",
"documentation": "Start time of the interval of this event.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_DATE_TIME"
}
}
},
"invariants": {
"Math_function_validity": "terminology (Terminology_id_openehr).has_code_for_group_id (Group_id_event_math_function, math_function.defining_code)",
"Interval_start_time_valid": "interval_start_time = time - width"
}
}
History Instance Structures
Single Sample
The following diagram illustrates a single weight measurement. The Event objects contain the timing information, which in this case is simply the time of measurement (the origin).
5-minute Blood Pressure Averages
The next figure illustrates two Interval events representing 5 minute blood pressure averages, the first at 5 minutes' offset from an initial event and lasting 5 minutes, the second 5 minutes later.