Data Types Im
Data Types Im
EHR Extract
EHR Demographic Integration Template OM
Composition openEHR Archetype Profile
Security Common Archetype OM ADL
Data Structures
Data Types
Support
Copyright Notice
Date of Issue: 20 Nov 2008 Page 2 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
Amendment Record
2.1.1 SPEC-257: Correct minor typos and clarify text. Replace T Cook 20 Nov 2008
DV_EHR_URI with DV_URI in inheritance of class definition of C Ma,
DV_EHR_URI. R Chen
Clarify the description of the type attribute in DV_PROPORTION
to indicate how it is controlled by PROPORTION_KIND.
Add as_string() function to DV_ENCAPSULATED class in UML
diagram of encapsulated package.
SPEC-261: Indicate how accuracy is treated over add/subtract G Geurts,
operations in DV_QUANTIFIED types. Indicate special values for R Chen
unknown accuracy.
R E L E A S E 1.0.1
R E L E A S E 1.0
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 3 of 88 Date of Issue: 20 Nov 2008
R E L E A S E 0.96
R E L E A S E 0.95
1.9 CR-000126. Correct details of partial date/time classes. T Beale 09 Dec 2004
CR-000112. Add DV_PARTIAL_DATE_TIME class DSTC
CR-000113. Add DATA_VALUE subtype for identifying real- DSTC
world entities
CR-000118. Make package names lower case. T Beale
CR-000119. Improve Data types documentation. T Beale
CR-000102. Make DV_TEXT language and charset optional. DSTC
R E L E A S E 0.9
1.7.7 CR-000041. Visually differentiate primitive types in openEHR D Lloyd, 26 Oct 2003
documents. DSTC,
CR-000034. State representation of date/time classes to be T Beale
ISO8601.
CR-000052. Change DV_DURATION.sign to prefix "-" operation.
CR-000042. Make DV_ORDINAL.rubric a DV_CODED_TEXT;
type attribute not needed.
Date of Issue: 20 Nov 2008 Page 4 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
1.7.3 DV_INTERVAL now inherits from INTERVAL to avoid duplicating T Beale 25 Mar 2003
semantics. (Formally validated).
1.7.2 Minor corrections to diagrams in Text package. Improved head- T Beale, 21 Mar 2003
ing structure, package naming. Corrected error in TEXT package Z Tun
diagram. Replaced TEXT_FORMAT_PROPERTY class with string
attribute of same form. Made MULTIMEDIA.media_type manda-
tory. (Formally validated).
1.7.1 Moved definitions and assumed types to Support Reference T Beale 25 Feb 2003
Model. No semantic changes.
1.7 Formally validated using ISE Eiffel 5.2. Z Tun, 17 Feb 2003
CR-000001. Review of Data Types specification. T Beale
Made pluralities of Terminology name definitions (sect 3.2.1)
consistent.
Corrected types of DV_ENCAPSULATED.language, charset,
DV_MULTIMEDIA.integrity_check_algorithm,
compression_algorithm, media_type.
Corrected pluralities of Terminology name definitions (sect
3.2.1).
Corrected invariants of DV_ENCAPSULATED, DV_MULTI_MEDIA,
DV_QUANTITY, DV_CODED_TEXT, DV_TEXT, DV_INTERVAL,
TERM_MAPPING.
Corrected DV_TEXT.formatting; added TERM_MAPPING validity
function. Made DV_ORDINAL.limits an attribute. Removed
TERM_MAPPING.source; moved COORDINATED_TERM.language
to DV_TEXT; changed type to COOORDINATED_TERM.
Corrected time specification classes.
1.6.1 Rome CEN TC 251 meeting. Updates to HL7 comparison S Heard, 27 Jan 2003
text. DV_DATE now inherits from DV_CUSTOMARY_QUANTITY. T Beale
1.6 Sam Heard complete review. Changed constant terminology S Heard, 13 Dec 2002
defs to runtime-evaluated set; removed DV_PHYSICAL_DATA. T Beale
Added new chapter for generic implementation guidelines, and
new section for assumed types. Post-conditions moved to invar-
iants: DV_TEXT.value, DV_ORDERED.is_simple,
DV_PARTIAL_DATE.probable_date, possible_dates,
DV_PARTIAL_TIME.probable_time, possible_times. Minor
updates to HL7 comparison text. Added explanation to HL7
section.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 5 of 88 Date of Issue: 20 Nov 2008
1.5.7 DV_TEXT_LIST reverted to TEXT_LIST. DV_LINK no longer a data S Heard, 18 Oct 2002
types; renamed to LINK and moved to Common RM. Link pack- Z Tun,
age renamed to “URI”. T Beale,
D Kalra,
M Darlison
1.5.5 Timezone not allowed on pure DV_DATE in ISO8601. T Beale, 2 Sep 2002
S Heard
1.5.3 Further corrections - removed derived ‘/’ markers; renamed T Beale, 20 Aug 2002
TERM_MAPPING.granularity to match. Improved explanation of S Heard,
DV_ORDINAL. DV_QUANTIFIED.units is now a DV_PARSABLE. P Schloeffel,
REFERENCE_RANGE.meaning is now a DV_TEXT. D Lloyd,
DV_ENCAPSULATED.uri is now a DV_URI. DV_LINK.type is now a Z Tun
DV_TEXT. Detailed review by Zar Zar Tun (DSTC).
1.5.2 Further corrections - removed derived ‘/’ markers; renamed T Beale, 15 Aug 2002
TERM_MAPPING.granularity to match. D Lloyd,
S Heard
1.5 Rewrite of section describing text types; addition of new T Beale, 1 Aug 2002
attribute DV_CODED_TEXT.mappings. Removal of S Heard
TERM_REFERENCE.concept_code.
1.4.3 Minor changes to text. Corrections to DV_CODED_TEXT rela- T Beale, 16 Jul 2002
tionships. Made DV_INTERVAL.lower_unbounded and Z Tun
DV_INTERVAL.upper_unbounded functions.
1.4.2 DV_LINK.meaning changed to DV_TEXT (typo in table). Added T Beale, 14 Jul 2002
abstract class DV_WORLD_TIME. D Lloyd
1.3 Added timezone to DV_TIME and DV_DATE_TIME and sign to T Beale, 30 Jun 2002
DV_DURATION; added linguistic_order to TERM_RELATION; D Lloyd
added as_display_string and as_canonical_string to all types.
Added DV_STATE.is_terminal. Renamed TERM_TEXT as
CODED_TEXT.
Date of Issue: 20 Nov 2008 Page 6 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
1.1 Numerous small changes, including: term equivalents, relation- T Beale, 10 May 2002
ships and quantity reference ranges. D Lloyd,
D Kalra, S
Heard
1.0 Separated from the openEHR Reference Model. T Beale 5 May 2002
Acknowledgements
The work reported in this paper has been funded by a number of organisations, including The Univer-
sity College, London; The Cooperative Research Centres Program through the Department of the
Prime Minister and Cabinet of the Commonwealth Government of Australia; Ocean Informatics,
Australia.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 7 of 88 Date of Issue: 20 Nov 2008
Table of Contents
1 Introduction.............................................................................11
1.1 Purpose ................................................................................................ 11
1.2 Related Documents.............................................................................. 11
1.3 Status ................................................................................................... 11
1.4 Peer review .......................................................................................... 11
1.5 Conformance ....................................................................................... 11
2 Background ............................................................................ 13
2.1 Scope ................................................................................................... 13
2.2 Design Criteria..................................................................................... 13
2.3 Prior Work ........................................................................................... 14
3 Introduction............................................................................ 15
3.1 Overview ............................................................................................. 15
3.2 Package Structure ................................................................................ 15
4 Basic Package ......................................................................... 16
4.1 Overview ............................................................................................. 16
4.1.1 Requirements................................................................................. 16
4.1.2 Design............................................................................................ 17
4.2 Class Descriptions ............................................................................... 17
4.2.1 DATA_VALUE Class.................................................................... 18
4.2.2 DV_BOOLEAN Class .................................................................. 18
4.2.3 DV_STATE Class.......................................................................... 19
4.2.4 DV_IDENTIFIER Class ............................................................... 19
5 Text Package........................................................................... 21
5.1 Overview ............................................................................................. 21
5.1.1 Requirements................................................................................. 21
5.1.1.1 Narrative Text ............................................................................................. 22
5.1.1.2 Terminological Entities ............................................................................... 22
5.1.2 Design............................................................................................ 23
5.1.3 Qualification.................................................................................. 24
5.1.4 Meaning Modification................................................................... 24
5.1.4.1 Mode-changing Terms ................................................................................ 24
5.1.4.2 Context Sensitivity ...................................................................................... 24
5.1.4.3 Negation ...................................................................................................... 25
5.1.4.4 Representation of Meaning-Modifying Terms ........................................... 25
5.1.5 Mappings....................................................................................... 26
5.1.5.1 Classification (Broader Terms) ................................................................... 26
5.1.5.2 Equivalent / Synonymous Terms ................................................................ 27
5.1.5.3 More Specific Mappings (Narrower Terms) ............................................... 27
5.1.5.4 The Unified Medical Language System (UMLS) ....................................... 27
5.1.5.5 Legacy Mapping Scenarios ......................................................................... 28
5.1.6 Language Translations .................................................................. 28
5.2 Class Descriptions ............................................................................... 28
5.2.1 DV_TEXT Class ........................................................................... 28
5.2.2 TERM_MAPPING Class .............................................................. 30
5.2.3 CODE_PHRASE Class ................................................................. 31
5.2.4 DV_CODED_TEXT Class ........................................................... 32
Date of Issue: 20 Nov 2008 Page 8 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 9 of 88 Date of Issue: 20 Nov 2008
Date of Issue: 20 Nov 2008 Page 10 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
1 Introduction
1.1 Purpose
This document defines the openEHR Data Types Information Model, used throughout the openEHR
Reference Model. The intended audience includes:
• Standards bodies producing health informatics standards;
• Software development organisations developing EHR systems;
• Academic groups studying the EHR;
• The open source healthcare community;
• Medical informaticians and clinicians intersted in health information;
• Health data managers.
1.3 Status
This document is under development, and is published as a proposal for input to standards processes
and implementation works.
This document is available at http://svn.openehr.org/specification/TAGS/Release-
1.0.1/publishing/architecture/rm/data_types_im.pdf.
The latest version of this document can be found at http://svn.openehr.org/specifica-
tion/TRUNK/publishing/architecture/rm/data_types_im.pdf.
Blue text indicates sections under active development.
1.5 Conformance
Conformance of a data or software artifact to an openEHR Reference Model specification is deter-
mined by a formal test of that artifact against the relevant openEHR Implementation Technology
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 11 of 88 Date of Issue: 20 Nov 2008
Specification(s) (ITSs), such as an IDL interface or an XML-schema. Since ITSs are formal, auto-
mated derivations from the Reference Model, ITS conformance indicates RM conformance.
Date of Issue: 20 Nov 2008 Page 12 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
2 Background
2.1 Scope
The data type specification presented here defines the clinical/scientific data types which are used in
other openEHR models. Harmonisation of data types between information models used by related
services in a health information infrastructure is essential to reducing the conversion work and poten-
tial for errors between these services. Accordingly, the openEHR data type specification is intended to
work not only for the EHR, but also for other models defined by openEHR, such as the openEHR
demographic and terminological models.
The types described here have been derived from data types used in the GEHR [14], Synapses and
SynEx [10], CEN 13606 [11], [13] and the HL7v3 [15] reference models.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 13 of 88 Date of Issue: 20 Nov 2008
Implementability in relational databases has also been considered, and appears relatively straightfor-
ward, since only the data view of the types needs to be represented. Many implementations are likely
to use only a single String or XML string to represent each entire data instance, which significantly
simplifies things.
Date of Issue: 20 Nov 2008 Page 14 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
3 Introduction
3.1 Overview
This specification describes a set of types suitable for use in scientific, clinical and related informa-
tion structures. In order for such types to exist, a set of primitive types is assumed, namely Integer,
Real, Boolean, Character, Octet, String, List<T>, Set<T>, and Array<T>. 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 Information Model. A
number of symbolic definitions (similar to constants in programming) are also described in the Sup-
port IM.
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 val-
ues’ 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.
data_types
quantity encapsulated
date_time
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 15 of 88 Date of Issue: 20 Nov 2008
4 Basic Package
4.1 Overview
The data_types.basic package, illustrated in FIGURE 2, contains types for the concepts of bi-
state, state (in a state machine) and real-world entity identifiers (see the openEHR Common IM for a
discussion on identifier types).
OPENEHR_DEFINITIONS
(support.definition)
basic
DATA_VALUE
4.1.1 Requirements
Bi-state Values
One of the most basic types of data is boolean or bi-state data. The need here is for a type which both
includes a boolean value, and which inherits from the type DATA_VALUE, enabling it to be used as an
ELEMENT.value.
Date of Issue: 20 Nov 2008 Page 16 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
start
cancel, suspend
cancel, supersede start_fail
start restart
supersede
4.1.2 Design
The model defined here in the DV_IDENTIFIER class allows the recording of three things as part of
identifying an item of interest:
• the issuing authority of the kind of id used (e.g. it might be the federal department of health);
• the assigner of the id to the item being identified. This is usually the organisation which cre-
ated the item being identified;
• the identifier given to the item of interest.
In addition, the type of item being identified can also be recorded.
See the Support IM specification for a further discussion of RWEs and IEs, and the definition of IEs
in openEHR.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 17 of 88 Date of Issue: 20 Nov 2008
Purpose Serves as a common ancestor of all data value types in openEHR models.
Invariants
CLASS DV_BOOLEAN
Purpose Items which are truly boolean data, such as true/false or yes/no answers.
For such data, it is important to devise the meanings (usually questions in subjec-
Use
tive data) carefully, so that the only allowed results are in fact true or false.
The DV_BOOLEAN class should not be used as a replacement for naively modelled
MisUse enumerated types such as male/female etc. Such values should be coded, and in
any case the enumeration often has more than two values.
A special use of the Numeric class is defined to represent the Boolean data type,
Synapses
limiting the permitted values to zero or one.
HL7 Boolean (BL) type. HL7 also allows NULL values. See section 12.2.5 on page 81.
Inherit DATA_VALUE
Date of Issue: 20 Nov 2008 Page 18 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS DV_STATE
For representing state values which obey a defined state machine, such as a vari-
Purpose
able representing the states of an instruction or care process.
DV_STATE is expressed as a String but its values are driven by archetype-
Use defined state machines. This provides a powerful way of capturing stateful com-
plex processes in simple data.
The Component Annotation Life Cycle was intended to permit architectural com-
CEN
ponents to include a reference to this aspect of state.
The Element class includes an attribute LifeCycle to indicate the lifecycle of an
Synapses instruction or action, with permitted values taken from the ENV13606-2 Domain
Termlist Component Annotation of the same name.
Inherit DATA_VALUE
CLASS DV_IDENTIFIER
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 19 of 88 Date of Issue: 20 Nov 2008
CLASS DV_IDENTIFIER
Inherit DATA_VALUE
Date of Issue: 20 Nov 2008 Page 20 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
5 Text Package
5.1 Overview
The data_types.text package contains classes for representing all textual values in the health
record, including plain text, coded terms, and narrative text. It is illustrated in FIGURE 4.
DATA_VALUE
coded by openEHR coded by openEHR
(rm.data_types.basic) codeset “languages”
codeset “character sets”
text
DV_PARAGRAPH 1..*
DV_TEXT 0..* TERM_MAPPING
items
value[1]: String mappings match[1]: Character
hyperlink[0..1]: DV_URI purpose[0..1]: DV_CODED_TEXT
formatting[0..1]: String
target 1
0..1
language CODE_PHRASE
DV_CODED_TEXT encoding 0..1 terminology_id[1]:
TERMINOLOGY_ID
defining_code 1 code_string[1]: String
coded by openEHR
Terminology, group
FIGURE 4 rm.data_types.text Package “term mapping purpose”
5.1.1 Requirements
The sections below describe the requirements of text data types. Two overriding principles should be
noted at the outset with regard to text.
1. Regardless of what terminologies are (or are not) available to the clinician and/or the soft-
ware, the primary requirement is that in all cases clinicians are able to record exactly what
they want to say. This means that if they want to record something very general, such as
“cold” or a very specific term such as “Ross River virus infection” they should be able to,
whether or not the appropriate coded terms are available. However, the facility should be
available to additionally code any such textual item, at the time or indeed at some later time,
so as to satisfy reporting or other needs.
2. It is assumed that any client of terminology, such as the EHR, uses a terminology service
which provides a complete interface to the terminology. The design of the DV_CODED_TEXT
type reflects this. Accordingly, there is no concept of “post-coordination” outside the termi-
nology environment allowed by the data types described here: the only thing that is availa-
ble from the terminology service is a key which refers to a lexical entity, which may be a
single term or a code phrase, and which may be part of a reference terminology and/or
linked to element(s) of underlying ontologies. It is also assumed that there is no direct
access to any particular terminology; access to all terminologies (whether simple coded lex-
icons or large semantic networks) is via the same abstract interface.
Terminology Ids are likely to be of various types.
1. Terminology_Id = “local”: this constant value means that the origin of allowable values is
described within the archetype. This is coded to allow translation. The local archetype then
only needs the set of codes and the local translation. The archetype may contain a translation
table if required.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 21 of 88 Date of Issue: 20 Nov 2008
Date of Issue: 20 Nov 2008 Page 22 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
A basic requirement for interoperability of text items, coded using terms (i.e. where the text is the
official rubric for the code), is that both the rubric and the code (or ‘code-phrase’) must be recorded,
to ensure the originally intended text is retained for receivers of EHR information who do not have
access to the terminologies used at the origin. However, where a terminology service is available, the
key can be used to unambiguously locate the string value of the term, and can also be used to find
translations in other languages. (Note that these comments do not apply to mappings, which are
described below).
In some terminologies, there are semantic networks of links emanating from most coded terms, which
classify them or relate them to other terms. Such links provide a means for decision support to make
inferences about specific things found in the record. For instance if the term “leukaemia” is found,
queries to the terminology service can be made in order to deduce that the patient has both a “cancer”
and a “disease of the immune system” (assuming leukaemia is classified under these more general
terms in the terminology).
This specification assumes the existence of a terminology service which is responsible for interrogat-
ing actual terminologies and performing validated coordination of terms, i.e. creating combinations
deemed valid by the underlying source terminology, potentially without even assigning a new code to
the result. All validated coordination is carried out inside the terminology service, and any “term”
made available by the service is already ‘coordinated’. The difference between ‘pre-coordinated’ and
‘post-coordinated’ terms is that the former have a single code, whereas the latter have a code phrase,
or expression that is interpretable by the terminology. For example, the coordination “foot, left” (a
shorthand way of writing the relationship “foot has-laterality left”) could be created by the terminol-
ogy service from the source terms “foot”, “left” and “has-laterality” from a terminology such as
SNOMED. Any such coordination must be valid within the source terminology, i.e. correspond to
valid relationships defined therein.
The class DV_CODED_TEXT described here captures the association of two things:
• the code phrase of a code phrase provided by the terminology service, recorded in the
defining_code attribute.
• the text rubric of the code phrase, recorded in the value attribute (inherited from DV_TEXT);
The class CODE_PHRASE.code_string records a key, in the form of arguments to some retrieval func-
tion in the terminology service interface.
The semantics attached to coordinations of terms may differ. Two categories of coordination
described in the literature are ‘qualification’ and ‘modification’. A common definition of the first is
that “qualification narrows meaning” - i.e. creates a new term whose possible real world instances are
within the set denoted by the original root term. Modification on the other hand changes the meaning
of a root term. Various cases are described below under Meaning Modification. Both coordination
types are assumed to be managed by the terminology service.
Coded terms may also be mapped to terms from other terminologies, which may be intended as equiv-
alents, classifiers, or something in between. The section below on Mappings deals with these.
5.1.2 Design
All atomic text items are either instances of the type DV_TEXT or of DV_CODED_TEXT. The former
allows the expression of text with optional formatting and hyperlinking. The latter additionally con-
nects the text value to a key in the terminology service, with the implication that the key refers to a
terminological entity lexically and semantically identical to the text value.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 23 of 88 Date of Issue: 20 Nov 2008
The model of DV_CODED_TEXT is designed to capture the actual coded term chosen by the user or
software at runtime; it is implicitly assumed that this includes whichever synonym (term of equiva-
lent meaning from the same terminology) was chosen, for terminologies supporting synonyms, and
any coordination of underlying distinct terms. A DV_CODED_TEXT instance can only be used if the
final textual value chosen by the user is lexically identical to the rubric returned by the terminology
service for the key; if the user makes even the slightest change, the identity of rubric / key is lost, and
a mapping (see Mappings on page 26) should be used instead.
The type DV_TEXT should be used wherever a coded or non-coded text item is allowed, while the
type DV_CODED_TEXT should be used wherever a text item must be coded.
The type DV_PARAGRAPH allows larger tracts of text to be built up from lists of DV_TEXT instances,
i.e. instances of DV_TEXT and DV_CODED_TEXT, as illustrated in FIGURE 5.
visible text DV_TEXT DV_CODED_TEXT DV_TEXT
DV_TEXT
blah blah blah blah blah blah blah blah blah blah pneumonia, bronchial blah
defining_code
terminology_id = snomed-ct
CODE_PHRASE
code_string = nnnnnnn
FIGURE 5 A DV_PARAGRAPH
5.1.3 Qualification
Qualification is the process of making a term more specific through the post-coordination of addi-
tional terms. It occurs when a terminology defines relationships between a primary term and other
terms that qualify the primary. For example a coordination using the term “bronchitis” which creates
a qualified term might be “acute bronchitis”; all real world instances of the latter are also instances of
the former.
Date of Issue: 20 Nov 2008 Page 24 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
• a systolic blood pressure in the pulmonary artery has a different meaning than a systemic
arterial blood pressure;
• “total hip replacement” in the context of a “planned procedure";
• “meningitis” in the context of a “differential diagnosis”.
5.1.4.3 Negation
Negation is a special kind of mode change and has been a serious design challenge in the past,
because modifiers like “not” or “no” only make sense when attached to some terms, and create non-
sensical values or ambiguities by arbitrarily association with other terms.
5.1.4.4 Representation of Meaning-Modifying Terms
Rather than provide explicit features for representing modifier terms within DV_CODED_TEXT, the
general principle underlying representation of all post-coordinations other than qualifications, is that
a higher-level, archetyped structure such as an ENTRY (defined in the EHR RM), is a minimal indivis-
ible unit of information. Such higher-level entities can have internal structure, and it is possible (and
desirable) to achieve the effect of combinations of terms through this structure. In the case of ENTRY,
it will be via structuring of CLUSTER/ELEMENT objects. The general rule is: to obtain the full mean-
ing of any terms found in the record, all of the node names in any ENTRY (coded or not) must be con-
sidered from the root to the relevant leaf. Conversely, the “final” meaning of any term in the record
cannot be known in isolation from the rest of the terms in the structure.
Accordingly, the concept “family history of coronary disease” is represented as an ENTRY whose root
is named (for example) “subject family history”, and which includes further structure, which may be
in greater of lesser detail; the coded term “coronary disease” would appear somewhere in this struc-
ture. The actual structure is completely defined by appropriate archetypes. Contrary to some percep-
tions, there is no general way to represent concepts such as “family history of coronary disease”,
since it will vary depending on how much detail is recorded. Where some GPs routinely record just
the simplest form, others may record the details of which family members had heart problems and
exactly what they were.
The same approach is used for context-dependent terms. Archetypes defining contexts such as
“planned procedures” or “differential diagnosis” will use these terms as their root nodes; as a result,
the meaning of any term appearing below the root can only be understood by including the root. Once
again, the exact structures are completely dependent upon archetyping, and may be simple or quite
sophisticated.
Negations are more complex than might first be apparent and are best handled by good archetype
design. Terminologies might provide a term such as “No known allergies” which is helpful. But if
someone has an allergy of some sort, the medicolegal requirement might be to record that the person
has no known allergies to penicillin or another class of medication that is being prescribed. The often-
proposed approach of using a generic negation ‘modifier’ to deal with such issues results in further
problems. Consider the use of negation with liver - “no liver”, “no palpable liver”, “no liver disease”,
“no history of liver disease”, “no liver function”, “no liver function tests”. The meaning of negated
terms may be non-sensical and difficult to interpret.
A basic principle of dealing with negatives is to realise that most naïve suggested use cases are quite
ambiguous as stated. Does “no allergies” mean “no reported episode of allergy”, “no allergic reac-
tions ever”, “no known allergies to medication” or something else? Does it mean that these statements
are taken as given by the patient, or determined by tests? Like all medical phenomena, allergies must
be described in some detail for the EHR to be of any real use. Almost inevitably, this precludes the
use of negated terms. Since the actual information structure will be determined in advance by arche-
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 25 of 88 Date of Issue: 20 Nov 2008
type designers, clinicians will almost never be in the situation of having to negate a term. However, if
the need does arise, it should be dealt with by a negative or quantitative answer, i.e. a value rather
than a name. For example, in any ENTRY describing current problems, the clinician may record the
name/value pair “allergies: NONE”. Here, “allergies” will be a DV_CODED_TEXT, and “NONE” will
be either a DV_CODED_TEXT or a DV_TEXT; the two will be associated by a containing object, such as
an instance of the ELEMENT class from the EHR RM. There is no explicit model of negation in
openEHR.
5.1.5 Mappings
In a number of circumstances, both plain text and coded text items are mapped to terms from other
terminologies. In theory, this should never occur, since it means that relationships between terms
which should only be knowable in the knowledge base (in the form of the terminology service, or
something else) are being created and transmitted as part of EHR information, potentially invalidating
or overriding the knowledge base. Where mappings are required, the proper approach is to create the-
sauri within the knowledge environment, and map through them. Unfortunately, in some cases, activ-
ities in the real world do not respect the information/knowledge boundary, hence the model described
here includes an explicit mapping concept, which itself includes a “purpose” and a “match” indicator.
Matching corresponds to the categories described below.
5.1.5.1 Classification (Broader Terms)
Any text item, whether coded or not, may be classified with a coded term, for research, reporting and
decision support purposes. For example, a GP working in tropical Australia may wish to write “Ross
River infection”, and be working with ICD9, which does not contain this term (although ICD9-CM
does). He or she will use a plain text item, but will still be able to map it to an ICD9 classifier, such as
the code for “arbovirus infection NOS”. The same approach can be used for adding a classifying term
to a coded text item. The utility of classifier terms is various: they allow decision support to make
more powerful inferences; in situations where the available terminologies do not provide the classifi-
cation inbuilt, and where it is known that not all users of EHR data will have terminologies available.
In data terms, classification mapping can be visualised as illustrated in FIGURE 6.
visible text (“what the clinician said”)
DV_TEXT DV_CODED_TEXT
blah blah Ross River infection blah blah blah bronchial pneumonia blah blah
mappings defining_code
TERM_ match = ’>’ terminology_id = snomed-ct
MAPPING purpose = “interoperability” code_string = 0000011
target
mappings
CODE_ terminology_id = icd9
PHRASE code_string = 066.9 match = ‘>’ TERM_
purpose = “epidemiology” MAPPING
(rubric = arbovirus infection NOS)
target
terminology_id = icd9 CODE_
code_string = 480 PHRASE
(rubric = viral pneumonia)
Date of Issue: 20 Nov 2008 Page 26 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
Classifying mappings are represented by adding a term to the mappings list of the original term. Each
mapping is explicitly represented with an instance of TERM_MAPPING, which indicates both the term
being associated with the original text item, and a value of ‘>’ for the match attribute, which indicates
that the mapping is “broader”. The possible values of the match attribute are ‘>’ (broader), ‘<‘ (nar-
rower), and ‘=’ (equivalent); they are taken from the ISO standards 2788 (“Guide to Establishment
and development of monolingual thesauri”) and 5964 (“Guide to Establishment and development of
multilingual thesauri”).
5.1.5.2 Equivalent / Synonymous Terms
Data from pathology laboratories has often been coded using a terminology local to the laboratory,
due to lack of or economic unfeasibility of using existing widespread terminologies for the job. How-
ever, some laboratories also supply a nearest equivalent code from a well-known terminology such as
LOINC, to enable the receiver of the data to process it in a more standard fashion. Here, “equiva-
lence” is taken to mean a term of the same meaning but from a different vocabulary.
Another instance where equivalent terms might be supplied is to effect the translation of terms across
specialist vocabularies such as nursing vocabularies when sharing EHRs across jurisdictions.
In theory, the cleanest way for senders and receivers of data coded with both a local and a more stand-
ard equivalent to deal with the mapping problem is for the originator of the local terminology to pro-
vide a complete thesaurus of translations into one or more recognised terminologies. However, in
practice, laboratories using the HL7 v2.x messaging standard usually encode a primary term and
equivalents with the HL7 CE data type, meaning that equivalents are included only with the term they
are used with. A similar pragmatic approach to mapping equivalent terms in the EHR is likely to be
used with the data types described here, and can be effected with the same mapping approach as for
classification.
A further situation in which text values - this time plain text - is mapped to equivalent terms is when
natural language processing is used to generate coded terms for existing free-text prose. The aim of
such processing is to detect word phrases and associate them with a coded term of the same meaning,
without obliterating the original text. In terms of the model described here, a CODE_PHRASE is associ-
ated with a DV_TEXT instance via the mappings attribute.
In all cases with equivalents, the value of the match attribute is ‘=’, indicating that the mapping is a
synonym.
5.1.5.3 More Specific Mappings (Narrower Terms)
Occasionally, there is a need to create a mapping to a term of narrower meaning than the original text
item. Circumstances in which this occurs include when a clinician wants to record a syndrome such as
“croup” or “influenza”, but the terminology does not contain these general terms, although it does
contain more specific terms, e.g. “viral laryngo-tracheitis” or “influenza type A”. Clearly the clinician
should be allowed to record what he/she wants (as plain text if necessary), but it should also be possi-
ble to add a mapping to the more precise term. For mappings to narrower terms, the value of the
match attribute is ‘<’.
5.1.5.4 The Unified Medical Language System (UMLS)
It has been argued in GEHR [14] that UMLS reference terms should also be supplied with occur-
rences of coded terms, in the form of the UMLS concept unique identifier, or “CUI”. UMLS is a way
of encoding terms developed at the National Library of Medicine in the United States, and consists of
a meta-thesaurus, in which terms from any extant term set (such as ICD, SNOMED, READ) can be
cross-referenced. UMLS CUIs could turn out to be extremely useful for decision support and report-
ing.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 27 of 88 Date of Issue: 20 Nov 2008
The proper use of UMLS is that terms from particular terminologies are passed to a UMLS interface
and a CUI + rubric received in response. However, the mapping approach described above could also
be used to map UMLS CUIs to existing text or terms in an EHR; in this case, a DV_CODED_TEXT is
constructed for each UMLS “term”, where the code is the CUI and the rubric is the text rendering of
the CUI (guaranteed unique in UMLS). The same approach can be used for any other thesaurus which
becomes available in the future.
5.1.5.5 Legacy Mapping Scenarios
In cases where legacy data has to be converted to openEHR-compliant data, and only codes are avail-
able, e.g. ICD or ICPC codes, the following approach is recommended:
• create a new DV_TEXT whose value is “(not available)”
• add a mapping to the DV_TEXT, with:
- purpose = “legacy conversion”
- match = “=”
- target = CODE_PHRASE object whose code_string and terminology_id are set to
correspond to the available code in the legacy data.
This expresses the reality that no text was ever recorded in the legacy system; rather a code was
recorded directly in the data field. In the converted data, this code is more correctly considered a map-
ping.
CLASS DV_TEXT
A text item, which may contain any amount of legal characters arranged as e.g.
words, sentences etc (i.e. one DV_TEXT may be more than one word). Visual for-
Purpose matting and hyperlinks may be included.
A DV_TEXT can be “coded” by adding mappings to it.
Fragments of text, whether coded or not are used on their own as values, or to
Use make up larger tracts of text which may be marked up in some way, eventually
going to make up paragraphs.
The Text data value class can contain either plain text or a term taken from a ter-
Synapses
minology system (coding scheme).
Roughly equivalent to CWE (coded with extensions) - i.e. a text value which may
HL7
optionally be coded.
Date of Issue: 20 Nov 2008 Page 28 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS DV_TEXT
Inherit DATA_VALUE
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 29 of 88 Date of Issue: 20 Nov 2008
CLASS TERM_MAPPING
Represents a coded term mapped to a DV_TEXT, and the relative match of the tar-
get term with respect to the mapped item. Plain or coded text items may appear in
Purpose the EHR for which one or mappings in alternative terminologies are required.
Mappings are only used to enable computer processing, so they can only be
instances of DV_CODED_TEXT.
Used for adding classification terms (e.g. adding ICD classifiers to SNOMED
Use descriptive terms), or mapping into equivalents in other terminologies (e.g.
across nursing vocabularies).
Date of Issue: 20 Nov 2008 Page 30 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS TERM_MAPPING
CLASS CODE_PHRASE
A fully coordinated (i.e. all “coordination” has been performed) term from a ter-
Purpose
minology service (as distinct from a particular terminology).
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 31 of 88 Date of Issue: 20 Nov 2008
CLASS DV_CODED_TEXT
A text item whose value must be the rubric from a controlled terminology, the
key (i.e. the ‘code’) of which is the defining_code attribute. In other words: a
Purpose DV_CODED_TEXT is a combination of a CODE_PHRASE (effectively a code) and
the rubric of that term, from a terminology service, in the language in which the
data was authored.
Since DV_CODED_TEXT is a subtype of DV_TEXT, it can be used in place of it,
Use effectively allowing the type DV_TEXT to mean “a text item, which may option-
ally be coded”.
If the intention is to represent a term code attached in some way to a fragment of
Misuse plain text, DV_CODED_TEXT should not be used; instead use a DV_TEXT and a
TERM_MAPPING to a CODE_PHRASE.
CEN Text
Synapses Text
GEHR G1_TERM_TEXT
Inherit DV_TEXT
CLASS DV_PARAGRAPH
A logical composite text value consisting of a series of DV_TEXTs, i.e. plain text
Purpose (optionally coded) potentially with simple formatting, to form a larger tract of
prose, which may be interpreted for display purposes as a paragraph.
DV_PARAGRAPH is the standard way for constructing longer text items in summa-
Use
ries, reports and so on.
Date of Issue: 20 Nov 2008 Page 32 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS DV_PARAGRAPH
GEHR G1_PARAGRAPH
Inherit DATA_VALUE
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 33 of 88 Date of Issue: 20 Nov 2008
6 Quantity Package
6.1 Overview
The data_types.quantity package is illustrated in FIGURE 8. Dates and Times are found in the
next section.
quantity
lower
coded by openEHR DV_ORDERED 0..1
DV_INTERVAL<T:DV_ORDERED>
codeset “normal normal_status[0..1]: CODE_PHRASE
statuses” is_strictly_comparable_to(...): Boolean upper 0..1 1 range
infix ‘<’ (other: like Current): Boolean normal_
is_simple: Boolean range REFERENCE_RANGE
is_normal: Boolean 0..* <T:DV_ORDERED>
coded by other_
reference_ meaning[1]: DV_TEXT
archetype
ranges is_in_range(v:T): Boolean
DV_ORDINAL DV_QUANTIFIED
value[1]: Integer magnitude_status[0..1]: String
symbol[1]: DV_CODED_TEXT accuracy[0..1]: Any
limits: REFERENCE_RANGE<..> accuracy_unknown: Boolean
magnitude[1]: Ordered_Numeric
valid_magnitude_status(...): Boolean
PROPORTION_KIND
const pk_ratio: Integer = 0 DV_AMOUNT DV_ABSOLUTE_QUANTITY
const pk_unitary: Integer = 1 accuracy[0..1]: Real accuracy[0..1]: like diff
const pk_percent: Integer = 2 accuracy_is_percent[0..1]: Boolean accuracy_unknown: Boolean
const pk_fraction: Integer = 3 const unknown_accuracy_value: Real = -1.0 add (other: like diff): like Current
const pk_integer_fraction: accuracy_unknown: Boolean subtract (other: like diff): like Current
Integer = 4 prefix “-” (like Current): like Current diff (other: like Current): DV_AMOUNT
valid_proportion_kind(n): infix “+” (like Current): like Current
Boolean infix “-” (like Current): like Current
DATE_TIME
DV_PROPORTION DV_QUANTITY DV_COUNT DV_DURATION DV_TEMPORAL
numerator[1]: Real magnitude[1]: Double magnitude[1]: Integer
denominator[1]: Real precision[0..1]: Integer
type[1]: Integer units[1]: String
precision[0..1]: Integer is_integral: Boolean DV_DATE_TIME DV_DATE
magnitude: Real
is_integral: Boolean DV_TIME
Date of Issue: 20 Nov 2008 Page 34 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
6.1.1 Requirements
Ordinal Values
Medicine is one domain in which symbols representing relative magnitudes are commonly used,
without exact values being known. The main purpose is usually to classify patients into groups for
which different decisions might be made. Thus, while approximate ranges (technically speaking -
“fuzzy intervals”) might be stated (such as for a urinalysis), concrete values are not of interest, only
categories are. Take for example the characterisation of pain as being “mild”, “medium”, “severe”, or
the reflex response to tendon percussion as “-”, “+/-”, “+”, “++”, ”+++”, “++++”. There may be no
way to scientifically precisely quantify such values because they reflect a subjective experience of the
patient or informal judgement by clinician. However, they are understood as being ordered, e.g. “++”
is ‘greater than’ “+”.
Similarly, even though the symbolic values for haemolysed blood in a urinalysis have approximate
ranges stated for them, as shown below, these ‘values’ are not usable in the same way as true quanti-
ties.
• “neg”, “trace” (10 cells/µl)
• “small” (<25 cells/µl)
• “moderate” (<80 cells/µl)
• “large” (>200 cells/µl)
A second requirement for ordinal values is that in many cases there is a need to associate integer val-
ues with the symbols, in order to facilitate ordered comparison, and also to enable longitudinal com-
parison across results of the same kind (e.g. pain, protein). Integer values may be negative, 0 and
positive, typically to allow the 0 value to correspond to a neutral value in a range.
[Note: an argument sometimes put forward for recording all ordinals in a more precise way is that
comparisons might want to be made between the values quoted by two laboratories for the same sym-
bol (e.g. “moderate”). There are a number of counter-arguments. Firstly, such comparisons are a poor
attempt at normalisation, an activity which is the business of pathologists, not EHR users. Secondly,
the symbolic values are often arrived at by the tester making a judgement of colour on a strip, which
while an adequate (and cost-effective) approach for classifying, is not a valid means of quantifying a
value. Lastly, in most cases, if a quantified point value or range is desired, or available, then it will be
used - meaning that the appropriate quantitative data type can be used, rather than an the ordinal
type.]
Countable Things
An common kind of data value in medicine is the dimensionless countable quantity, e.g. “number of
doses: 2”, “number of previous pregnancies: 1”, “number of tablets: 3”. Values of this type are always
integral. Countable values need to be convertible to real numbers for statistical purposes, for example
for a study of average number of pregnancies per couple.
Some countable entities such as tablets are divisible into major fractions, typically halves and occa-
sionally quarters.
Dimensioned Quantities
The most common kind of quantity is a measured, dimensioned quantity. Anything which is measura-
ble (rather than countable) involves a number of data aspects, namely:
• a magnitude whose value is a real number;
• the physical property being measured, with the appropriate units;
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 35 of 88 Date of Issue: 20 Nov 2008
• a concept of precision, i.e. to what number of decimal places the value is recorded;
• a concept of accuracy, i.e. the known or assumed error in the measurement due to instru-
mentation or human judgement.
Examples of dimensioned quantities include:
• systolic BP: 110 mmHg
• height: 178 cm
• rate of asthma attacks: 7 /week
• weight loss: 2.5 kg
Ratios and Proportions
A common quantitative type in science and medicine is the proportion, or ratio, which is used in situ-
ations like the following:
• 1:128 (a titer);
• Na:K concentration ratio (unitary denominator);
• albumin:creatinine ratio;
• % e.g. red cell distribution width (RDW) which is the width of a distribution of RBC widths.
In general ratios have real number values, even if many examples appear to be integer ratios. Propor-
tions with unitary denominator and % (denominator = 100) are common.
Formulations
A concept superficially similar to proportions and ratios is formulations of materials, such as a solid
in a liquid e.g.:
• 250 mg / 500 ml (solute/solvent)
Although a single solute/single solvent formulation appears to have the same form as a ratio, the gen-
eral form is for any number of substances to be mixed together, usually according to a particular pro-
cedure. Formulations are therefore not candidates for direct modelling as fine-grained quantities, but
instead are constructed by archetyping a higher-level structure, each leaf element of which contains
the required kind of Quantity.
Quantity Ranges
Quantity ranges are ubiquitous in science and medicine, and may be defined for any kind of measured
phenomenon. Examples include:
• healthy weight range, e.g. 48kg - 60kg
• normal range for urinalysis in pregnancy - protein, e.g. “nil” - “trace”
Reference Ranges
A reference range is a quantity range attached to a measured value, and is common for laboratory
result values. The typical form of a reference range found in a pathology result indicates what is con-
sidered the ‘normal’ range for a measured value. Examples of reference ranges:
• normal range for serum Na is 135 - 145 mmol/L.
• desirable total cholesterol: < 5.5 mmol/L (strictly this probably should be 2.0 - 5.5 mmol/L,
but is not usually quoted this way as low cholesterol is not considered a problem.)
Ranges can also be quoted for drug administrations, in which case they are usually thought of as the
‘therapeutic’ range. For example, the anticonvulsant drug Carbamazepine has a therapeutic range of
Date of Issue: 20 Nov 2008 Page 36 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
20 - 40 µMol/L. In some cases, there are multiple ranges associated with a drug, for example, Sali-
cylate has a therapeutic range of 1.0 - 2.5 mmol/L and a toxic range > 3.6 mmol/L
Various examples occur in which multiple ranges may be stated, including the following.
• The administration recomendations for drugs which depend on the particular patient state.
For example, the therapeutic range of Cyclosporin (an immunosuppresant) is a function of
time post-transplant for the affected organ, e.g. kidney: < 6 months: 250 - 350 µg/L, > 6
months: 100 - 200 µg/L.
• Normal ranges for blood IgG, IgA, IgM which vary significantly with the age in months
from birth.
• Progesterone and pituitary hormones have ranges which are different for different phases of
the menstrual cycle and for menopause. This may result in 4 or 5 ranges given for one result.
Only one will apply to any particular patient - but the exact phase of the cycle may be
unknown - so the ranges may need to be associated with the value with no 'normal' range.
Where there are multiple ranges, the important question is: which range information is relevant to the
actual data being recorded for the patient? In theory, only the range corresponding to the particular
patient situation should be used, i.e. the range which applies after taking into account sex, age, smok-
ing status, “professional athlete”, organ transplanted, etc. In most cases, this is a single “normal”
range, or a pair of ranges, typically “therapeutic” and “critical”. However, practical factors compli-
cate things. Firstly, data is sometimes supplied from pathology labs along with some or all of the
applicable reference ranges, even though only some could possibly apply. This is particularly the case
if the laboratory has no other data on the patient, and cannot evaluate which range applies. The
requirement for faithfulness of recording might be extended to reference data supplied by laborato-
ries, regardless of how irrelevant or arbitrarily chosen the reference data is, meaning that such data
has to be stored in the record anyway. Secondly, there may be circumstances in which physicians
want a number of reference ranges, even while knowing that only one range is applicable to the
datum. Ranges above and below the relevant one might be useful to a physician wishing to determine
how far out of range the datum is.
Normal Range and Status in Laboratory data
It is quite common for laboratories to include a normal range with each measured value, and/or a nor-
mal ‘status’, which indicates where the value lies with respect to the normal range. The latter will
commonly take the form of markers like “HHH” (critically high), HH (abnormally high), H (border-
line high), L, LL, LLL in HL7v2 messaging, although other schemes are undoubtedly used.
6.1.2 Design
Basic Semantics
In order to make sense of the requirements in a systematic way, a proper typology for quantities is
needed. The most basic characteristic of all values typically called ‘quantities’ is that they are
ordered, meaning that the operator “<” (less-than) is defined between any two values in the domain.
An ancestor class for all quantities called DV_ORDERED is accordingly defined. This type is subtyped
into ordinals and true quantities, represented by the classes DV_ORDINAL and DV_QUANTIFIED
respectively. DV_ORDINAL represents data values whose exact numeric values are not known, and
which use symbolic renderings instead, such as “+”, “++”, “+++”, or “mild”, “medium”, “severe”.
Each symbol can be assigned any integer value, providing a basis for computable comparison. In con-
trast, instances of DV_QUANTIFIED and all its subtypes have precise numeric magnitudes.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 37 of 88 Date of Issue: 20 Nov 2008
DV_QUANTIFIED itself introduces the concepts of magnitude and magnitude_status. The magnitude
attribute is guaranteed to be available on any DV_QUANTIFIED, carrying the effective value, regard-
less of the particular subtype. The optional magnitude_status attribute can be used to provide a non-
quantified indication of accuracy, and takes the following values:
• “=” : magnitude is a point value
• “<“ : value is < magnitude
• “>” : value is > magnitude
• “<=” : value is <= magnitude
• “>=” : value is >= magnitude
• “~” : value is approximately magnitude
If not present, meaning is “=”.
Logically, an accuracy attribute should also be included in DV_QUANTIFIED, but as its modelling is
different in the subtypes in a way that does not easily lend itself to a common ancestor, it is only
included in the subtypes.
The DV_QUANTIFIED class has two subtypes: DV_AMOUNT and DV_ABSOLUTE_QUANTITY. The
former corresponds to relative ‘amounts’ of something, either a physical property(such as mass) or
items (e.g. cigarettes). Mathematically, the ‘+’ and ‘-’ operators (as well as ‘*’ and ‘/’) are defined in
the same way as for the real numbers (or any other mathematical ‘field’), with the semantics that add-
ing two relative quantities measuring the same thing (i.e. with the same units) produces another rela-
tive quantity of the same kind; while the semantics of subtraction are that one relative quantity
subtracted from another generates a third.
The second subtype of DV_QUANTIFIED, DV_ABSOLUTE_QUANTITY, models quantities whose val-
ues are absolute along a line having a defined origin. The main example of absolute quantities are the
temporal concepts date, time and date/time. These are distinguished from relative quantities in that
the normal addition and subtraction operations don’t apply. Instead, the semantics of such operators
are based on the idea of the difference between absolute values being a relative amount. For example,
two dates can be subtracted, but the result is a duration, not another date. For this reason, the opera-
tions add, subtract and diff are defined rather than ‘+’ or ‘-’. Date/time types, as well as the relative
concept duration, are defined in the Date Time Package on page 54.
Subtypes of DV_AMOUNT are DV_PROPORTION, DV_QUANTITY, DV_COUNT, and DV_DURATION (see
date_time package). The type DV_COUNT has an integer magnitude and is used to record naturally
countable things such as number of previous pregnancies, number of steps taken by a recovering
stroke victim and so on. There are no units or precision in a DV_COUNT. Countable quantities can be
used to create instances of DV_QUANTITY, such as during a statistical study which average tobacco
consumption over a time period. Such a computation might cause the creation of DV_QUANTITY
objects representing values like {magnitude = 5.85, units = ‘/ week’}
DV_QUANTITY is used to represent amounts of measurable things, and has a real number magnitude,
precision, units and accuracy. The units attribute contains the scientific unit in a parsable form
defined by the Unified Code for Units of Measure (UCUM) [8]. A valid units string always implies a
measured property, such as “force” or “pressure”. The property of a Quantity can conveniently con-
strained in archetypes, e.g. to “pressure”, which would allow any pressure unit. Unit strings can be
compared to determine if they measure the same property (e.g. “bar” and “kPa” are both units corre-
sponding to the property “pressure”), which enables the is_strictly_comparable_to function defined
on DV_ORDERED to be properly specified on DV_QUANTITY.
Date of Issue: 20 Nov 2008 Page 38 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
It is important to note that while these semantics will allow comparison of e.g. two pressures
recorded in mbar and mmHg, or even two accelerations whose units are “m.s^-2” and “m/s^2”, they
provide no guarantee that this is a sensible thing to do in terms of domain semantics: comparing a
blood pressure to an atmospheric pressure for example may or may not make any sense. It is not
within the scope of the quantity package to express such semantics: this is up to application soft-
ware which uses Quantities found in specific places in the data.
Accuracy and Uncertainty
Theoretically it might be argued that ‘accuracy’ should not be included in a model for quantified val-
ues, because it is an artifact of a measuring process and/or device, not of a quantity itself. For exam-
ple, a weight of “82 kg +/-5%” can be represented in two parts. The “82 kg” is represented as a
DV_QUANTITY, while the “+/-5%” could be included in the protocol description of the weighing
instrument, since this is where the error comes from. For practical purposes however, (in)accuracy in
a measured quantity corresponds to a range of possible values. In realistic computing in health, it is
quite likely that the accuracy will be required in computations on quantities, especially for statistical
population queries in which measurement error must be disambiguated from true correlation.
Accuracy is therefore introduced as the abstract feature accuracy of the DV_QUANTIFIED class. It is
defined concretely in the two descendants, DV_AMOUNT, where it is of type Real, and
DV_ABSOLUTE_QUANTITY, where it is of a differential type defined by subtypes. A value of 0 in
either case indicates 100% accuracy, i.e. no error in measurement. Where accuracy is not recorded in
a quantity, it is represented by a special value. In DV_AMOUNT, a value of -1 for the accuracy attribute
is used for this purpose, and the constant unknown_accuracy_value = -1 is provided within the class
to give a symbolic name for the special value. In the DV_ABSOLUTE_QUANTITY class,
accuracy_unknown is represented by a Void (i.e. null) value for the accuracy attribute. An abstract
Boolean feature accuracy_unknown is defined in the parent class DV_QUANTIFIED to provide a logi-
cal test of accuracy being absent, and is implemented in the respective descendants by concrete func-
tions that check for the special values.
In addition, the class DV_AMOUNT, provides a feature accuracy_is_percent: Boolean to indicate if
accuracy value is to be understood as a percentage, or an absolute value.
When two compatible quantities are added or subtracted using the + or - operators (DV_AMOUNT
descendants) or add and substract (DV_ABSOLUTE_QUANTITY class), accuracy behaves in the follow-
ing way:
• if accuracies are present in both quantities, they are added in the result, for both addition and
subtraction operations;
• if either or both quantities has an unknown accuracy, the accuracy of the result is also
unknown;
• if two DV_AMOUNT descendants are added or subtracted, and only one has
accuracy_is_percent = True, accuracy is expressed in the result in the form used in the
larger of the two quantities.
The related notion of ‘uncertainty’ is understood as a subjective judgement made by the clinician,
indicating that he/she is not certain of a particular statement. It is not the same as accuracy: uncer-
tainty may apply to non-quantified values, such as subjective statements, and it is not an aspect of
objective measurement processes, but of human confidence. Where the uncertainty is due to subjec-
tive memory e.g. “I think my grandfather was 56 when he died”, the uncertainty is simply recorded as
another value, along with the main data item being recorded. Uncertainty is therefore not directly
modelled in the openEHR data types, but appears instead in particular archetypes.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 39 of 88 Date of Issue: 20 Nov 2008
Quantity Ranges
Ranges are modelled by the generic type DV_INTERVAL<T:DV_ORDERED> which enables a range of
any of the other quantity types (except ratio) to be constructed. This allows any subtype of
DV_ORDERED to occur as a range as well.
Proportions
The DV_PROPORTION type is provided for representing true ratios, i.e. relative values, and consists
of numerator and denominator Real values, and a magnitude function which is computed as the result
of the numerator/denominator division. The type attribute is used to indicate the logical type of the
proportion. Supported types include:
• percent: denominator is 100; usual presentation is “numerator %”
• unitary: denominator is 1; usual presentation is “numerator”
• fraction: numerator and denominator are both integer values; usual presentation is n/d, e.g.
such as ½ or ¾, 1/2, 3/4 etc;
• integer_fraction: numerator and denominator are both integer values; usual presentation is
n/d; if numerator > denominator, display as “a b/c”, i.e. the integer part followed by the
remaining fraction part, e.g. 1½; this is the most likely form for expressing a number of tab-
lets;
• ratio: numerator and denominator can take any value; usual presentation is “numera-
tor:denominator”
Lastly, the is_integral function indicates that the numerator and denominator are both integer values;
this is used for fractions (the fraction and integer_fraction types above) and other commonly occur-
ring ratios where both parts are always integer values.
Normal and Reference Ranges
Normal range for any of the quantity types (i.e. any instance of a subtype of DV_ORDERED) can be
included via the attribute DV_ORDERED.normal_range, of type REFERENCE_RANGE. Other reference
ranges (e.g. sub-critical, critical etc) can be included via the attribute
DV_ORDERED.other_reference_ranges. The separation of normal and other reference range attributes
is used because the former constitute the vast majority of ranges quoted for quantitative data.
Normal status can be included via the attribute DV_ORDERED.normal_status, which takes the form of
a DV_ORDINAL, whose symbol attribute is coded according to the openEHR terminology group “nor-
mal status”, and takes values “HHH” (critically high), “HH” (abnormally high), “H” (borderline
high)”, “N” (normal), “L” ... “LLL”.
Recording Time
Time can be recorded in two ways. Absolute times in the social time domain, such as dates and time
of day are recorded using the types in the date_time package. Fine-grained ‘time’, which is a dura-
tion rather than a time, is recorded using a DV_QUANTITY with units = ‘s’ or another temporal unit
(‘h’, ‘ms’, ‘ns’ etc).
Date of Issue: 20 Nov 2008 Page 40 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
Abstract class defining the concept of ordered values, which includes ordinals as
well as true quantities. It defines the functions ‘<’ and is_strictly_comparable_to,
Purpose
the latter of which must evaluate to True for instances being compared with the
‘<’ function, or used as limits in the DV_INTERVAL<T> class.
Data value types which are to be used as limits in the DV_INTERVAL<T> class
must inherit from this class, and implement the function
Use is_strictly_comparable_to to ensure that instances compare meaningfully. For
example, instances of DV_QUANTITY can only be compared if they measure the
same kind of physical quantity.
infix ‘<’ (other: like Current): Tests if this item is less than other, which
Boolean must be of the same concrete type.
require
is_strictly_comparable_to(other)
is_strictly_comparable_to (other: like Test if two instances are strictly compa-
Current): Boolean rable.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 41 of 88 Date of Issue: 20 Nov 2008
Time Interval; also includes a measurement range data type but not the ability to
CEN
specify if minimum or maximum values are inclusive.
Date of Issue: 20 Nov 2008 Page 42 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
GEHR G1_QUANTITY_RANGE
HL7 IVL<T:QTY>
CLASS REFERENCE_RANGE<T:DV_ORDERED>
Defines a named range to be associated with any ORDERED datum. Each such
Purpose range is particular to the patient and context, e.g. sex, age, and any other factor
which affects ranges.
Use May be used to represent normal, therapeutic, dangerous, critical etc ranges.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 43 of 88 Date of Issue: 20 Nov 2008
CLASS DV_ORDINAL
Models rankings and scores, e.g. pain, Apgar values, etc, where there is a)
implied ordering, b) no implication that the distance between each value is con-
stant, and c) the total number of values is finite. Note that although the term
‘ordinal’ in mathematics means natural numbers only, here any integer is
Purpose allowed, since negative and zero values are often used by medical professionals
for values around a neutral point. Examples of sets of ordinal values:
-3, -2, -1, 0, 1, 2, 3 -- reflex response values
0, 1, 2 -- Apgar values
Used for recording any clinical datum which is customarily recorded using sym-
bolic values. Example: the results on a urinalysis strip, e.g. {neg, trace, +,
Use ++, +++} are used for leucocytes, protein, nitrites etc; for non-haemolysed
blood {neg, trace, moderate}; for haemolysed blood {neg, trace,
small, moderate, large}.
Inherit DV_ORDERED
Date of Issue: 20 Nov 2008 Page 44 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS DV_ORDINAL
Abstract class defining the concept of true quantified values, i.e. values which are
Purpose
not only ordered, but which have a precise magnitude.
Synapses Attributes in the Quantity class for unit and accuracy (double plus units)
Inherit DV_ORDERED
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 45 of 88 Date of Issue: 20 Nov 2008
Abstract class defining the concept of relative quantified ‘amounts’. For relative
Purpose quantities, the ‘+’ and ‘-’ operators are defined (unlike descendants of
DV_ABSOLUTE_QUANTITY, such as the date/time types).
Inherit DV_QUANTIFIED
Date of Issue: 20 Nov 2008 Page 46 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
infix ‘+’ (other: like Cur- Sum of this quantity and another quantity of
rent): like Current the same concrete type.
The value of accuracy in the result is either:
• the sum of the accuracies of the oper-
ands, if both present, or;
• unknown_accuracy_value, if either or
both operand accuracies are
unknown_accuracy_value.
If the accuracy value is a percentage in one
operand and not in the other, the form in the
result is that of the larger operand.
infix ‘-’ (other: like Current): Difference of this quantity and another quan-
like Current tity of the same concrete type.
The value of accuracy in the result is either:
• the sum of the accuracies of the oper-
ands, if both present, or;
• unknown, if either or both operand accu-
racies are unknown.
If the accuracy value is a percentage in one
operand and not in the other, the form in the
result is that of the larger operand.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 47 of 88 Date of Issue: 20 Nov 2008
CLASS DV_QUANTITY
Synapses Quantity
GEHR G1_QUANTITY
Inherit DV_AMOUNT
Date of Issue: 20 Nov 2008 Page 48 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS DV_QUANTITY
Lexical Specification
PREFIX ::= ‘Y’ |‘Z’ | ‘E’ | ‘P’ | ‘T’ | ‘G’ | ‘M’ | ‘k’ | ‘h’ | ‘da’
| ‘d’ | ‘c’ | ‘m’ | ‘µ’ | ‘n’ | ‘p’ | ‘f’ | ‘a’ | ‘z’ | ‘y’
UNIT_NAME ::= [a-zA-Z_%]+ ; from unit tables
ANNOTATION ::= [a-zA-Z’.]+ ; from unit tables
SUFFIX ::= [a-zA-Z0-9’_]+ ; from unit tables
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 49 of 88 Date of Issue: 20 Nov 2008
annotations (e.g. “kg {total}”) are recognised. With this syntax, units can be simply expressed in
strings such as:
“kg/m^2”, “m.s^-1”, “km/h”, “mm[Hg]”
and so on.
CLASS DV_COUNT
Used for countable types such as pregnancies and steps (taken by a physiotherapy
Use
patient), number of cigarettes smoked in a day.
Misuse Not used for amounts of physical entities (which all have units)
HL7 INT
Inherit DV_AMOUNT
Invariants
CLASS DV_PROPORTION
Models a ratio of values, i.e. where the numerator and denominator are both pure
Purpose numbers. The valid_proportion_kind property of the PROPORTION_KIND class is
used to control the type attribute to be one of a defined set.
Used for recording titers (e.g. 1:128), concentration ratios, e.g. Na:K (unitary
Use denominator), albumin:creatinine ratio, and percentages, e.g. red cell distirbution
width (RDW).
Should not be used to represent things like blood pressure which are often written
using a ‘/’ character, giving the misleading impression that the item is a ratio,
when in fact it is a structured value.
MisUse Similarly, visual acuity, often written as (e.g.) “6/24” in clinical notes is not a
ratio but an ordinal (which includes non-numeric symbols like CF = count fingers
etc).
Should not be used for formulations.
Date of Issue: 20 Nov 2008 Page 50 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS DV_PROPORTION
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 51 of 88 Date of Issue: 20 Nov 2008
CLASS PROPORTION_KIND
Invariants
Inherit DV_QUANTIFIED
Date of Issue: 20 Nov 2008 Page 52 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
Invariants
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 53 of 88 Date of Issue: 20 Nov 2008
7.1 Overview
The data_types.quantity.date_time package includes three absolute date/time concepts:
DV_DATE, DV_TIME, DV_DATE_TIME, and a relative concept: DV_DURATION. The representations of
all of these are ISO8601:2004-compatible date/time strings. They also include the ISO8601 semantics
for partial dates and times. The date_time package is illustrated in FIGURE 9.
DV_ABSOLUTE_QUANTITY DV_AMOUNT
(rm.data_types.quantity) (rm.data_types.quantity)
date_time
DV_TEMPORAL DV_DURATION
value[1]: String
diff (...): DV_DURATION magnitude: Double
7.1.1 Requirements
Standard Date/Times
The basic requirement is for types which represent the following concepts:
• Date: a type which records year, month and day in month. Examples include date of birth,
date of onset of a problem
• Time: a type which records hour, minute, second, and timezone. Examples include time of
meal, time of day when a problem recurs. Timezone is required in a shared EHR repository
so that times of clinical events which occurred in different timezones are comparable; this
includes specialised pathology tests which might be done in another country.
• Date_time: a type which records year, month, day, hour, minute, second, and timezone.
Examples include date & time of death, timestamp of any observation. Timezone required
for the same reason as in Time.
• Duration: a type which records duration of an event or (in)activity, as days, hours, minutes,
and seconds.
Partial Date/Times
Partial or uncertain date/times have to be supported in clinical medicine. It is common for patients to
be unsure about dates and durations. Requirements for partial date/times include the following.
• For dates, one of the following rules applies to any instance:
Date of Issue: 20 Nov 2008 Page 54 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
7.1.2 Design
General Approach
Date/time values are somewhat special in the realm of data types in that they are expressed in their
“customary” form, in which the standard structure of {value, unit} and metric relationships between
orders of magnitude do not hold. The customary form is what we are used to using in the social time
domain, such as births, deaths, ages, and times and durations of events which we remember. In all
these cases it is expressed using the familiar year/month/date/hour/minute/second system, in which
the relationships between each successive unit of time is non-metric. The customary form can be con-
verted to a magnitude since an origin point, and many date/time libraries do this in order to implement
various operations, particularly comparison.
The date/time types fall into two categories: absolute and relative. The absolute category comprises
the Date, Date_time and Time concepts, each of which measure time from a known origin. Date and
Date_time measure calendrical time from the date 0001-01-01, while Time measures clock time from
midnight. Both Date_time and Time can include timezone information, ensuring that their instances
are correctly situated on the same timeline. All absolute time types inherit from the DV_TEMPORAL
type, which provides the appropriate signature for the diff() function.
The relative category contains only the Duration concept, which expresses elapsed time between two
time points. The DV_DURATION class is used for expressing durations of clinical phenomena and dif-
ferences between absolute times.
All four concepts are defined in the ISO 8601:2004 standard, which is accordingly used as the defini-
tional basis of the openEHR date/time types.
Partial Date/Times
The types defined in this specification support the notion of partially specified dates and times. The
modelling approach used here takes into account the known needs for representing partial date/time
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 55 of 88 Date of Issue: 20 Nov 2008
data, while balancing that with the need to avoid incomprehensibly complex types whose generality
would only apply to a tiny percent of difficult cases. Thus, the basis for modelling incomplete
date/times is as follows.
• The modelling problem relates only to date/time quantities that need to be computable. For
extremely imprecise date/times, if the clinician feels the need, she can record it as narrative
text.
• For imprecise durations, an interval should be used, i.e. DV_INTERVAL<DV_DURATION>. In
this way durations like “2 - 3 hrs” can be represented, and still be computable.
Based on the above considerations, the requirements for partial types are satisfied by the semantics of
ISO8601:2004 for “reduced accuracy” date/times, in which parts of a date, time or date/time can be
missing from the right hand end of the string. This models the reasonable situation where e.g. day
may be unknown in a date, but a date cannot have month unknown and day known.
Calendars
A comment on calendars is in order. In this specification, all date/time types currently modelled are
Gregorian calendar based. This is the same assumption made by by ISO 8601, and most technical
computing systems today in many parts of the world. At first glance this may seem like a culturally
insensitive approach, but in fact it makes sense in computational terms, for both users of the Grego-
rian and other calendars, e.g. Julian, Islamic, Baha’i, etc. Arguments against trying to use the
date/time classes defined here to represent date/times from any calendar include the following:
• Almost all dates on computer systems, including in regions such as the Indian sub-continent,
Turkey and the middle east, where alternate calendars are in use, are in the Gregorian sys-
tem. This is likely to be the case for some time, and may always be the case, regardless of
the continued use of other calendars for religious or other purposes (outside of health);
• If a calendar indicator were used in date quantities, all software, to be correct, would have to
check the value to verify that it is in the expected calendar system, and to do something spe-
cial if it is not - an added cost which is a possible source of bugs and which would rarely be
used. The reality is that most software produced in the western world, India etc (possibly
excepting open source software) would automatically assume the Gregorian calendar, and
would be in error if ever it did receive EHR data containing dates from alternate calendars.
• If/when other calendars are used in EHR or related systems, the users of those calendars will
be aware of it, and include the appropriate conversion logic between Gregorian dates and
their own, limiting the extra software work and quality issues to those users who actually
need alternate calendars. If EHRs from such places are sent to a health care facility where
Gregorian is the default, nothing special is needed to ensure that those records will contain
dates comprehensible to the receiver.
• The detailed model of date/times in some other calendars is not the same as in the Gregorian
calendar, so they would require different classes anyway - the classes defined here would
not necessarily function correctly simply by adding a calendar field.
For users requiring non-Gregorian dates in EHR and other health systems there are two approaches.
One is to treat non-Gregorian dates as a localisation issue, to be handled inside the application and
GUI evnvironment. The other is to actually add further sibling packages to the openEHR date/time
package, for each new calendar or calendar group required. Conversion algorithms would most likely
be needed in and out of the Gregorian types to enable interoperability of information drawn from dif-
ferent applications or sources. This approach may require a substantial modelling effort.
Date of Issue: 20 Nov 2008 Page 56 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
Algorithms for conversion between the Egyptian, Armenian, Khwarizmian, Persian, Ethiopian, Cop-
tic, Republican, Macedonian, Syrian, Julian Roman, Gregorian, Islamic A, Islamic B, Baha’i and
Saka calendars are described by Richards [7] and are based on the work of D. A. Hatcher (1986).
Representation
All of the date/time classes described here are defined so as to have an attribute called value of type
String, in the form of an ISO 8601:2004 string. ISO 8601 is convenient for this purpose, as it is a sim-
ple syntax, and covers not only all four variants of fully-specified date/time described here, but also
the partial varieties. Using a single string attribute significantly simplifies persistence as well as map-
ping to XML-based formalisms, which use a mostly ISO 8601 compliant date/time representation.
The ISO 8601 semantics assumed by EHR are defined in classes found in the classes
ISO8601_DATE, ISO8601_TIME, ISO8601_DATE_TIME, ISO8601_DURATION, from the
rm.support.assumed_types package. These classes are inherited into the corresponding classes
defined below.
Inherit DV_ABSOLUTE_QUANTITY
Invariants
CLASS DV_DATE
DTValue attribute of DateTime class (this does not distinguish the representation
Synapses
of dates and of times)
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 57 of 88 Date of Issue: 20 Nov 2008
CLASS DV_DATE
GEHR G1_DATE
PointInTime (TS). Note that this type simply measures a number of seconds
HL7 since an epoch, with a timezone. These values are convertable to y/m/d form via
the calendar attribute of TS.
CLASS DV_TIME
Represents an absolute point in time from an origin usually interpreted as mean-
Purpose ing the start of the current day, specified to the second. Semantics defined by ISO
8601.
Used for recording real world times, rather than scientifically measured fine
Use amounts of time. The partial form is used for approximate times of events and
substance administrations.
ISO 18308 STR 3.7, 3.10
DTValue attribute of DateTime class (this does not distinguish the representation
Synapses
of dates and of times)
GEHR G1_TIME
PointInTime (TS). Note that this type simply measures a number of seconds since
HL7 an epoch. These values are convertable to ymd form via the calendar attribute of
TS.
Date of Issue: 20 Nov 2008 Page 58 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS DV_TIME
CLASS DV_DATE_TIME
DTValue attribute of DateTime class (this does not distinguish the representation
Synapses
of dates and of times)
GEHR G1_DATE_TIME
PointInTime (TS). Note that this type simply measures a number of seconds since
HL7 an epoch, with a timezone. These values are convertable to y/m/d form via the
calendar attribute of TS.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 59 of 88 Date of Issue: 20 Nov 2008
CLASS DV_DATE_TIME
CLASS DV_DURATION
Represents a period of time with respect to a notional point in time, which is not
specified. A sign may be used to indicate the duration is “backwards” in time
Purpose rather than forwards.
Note that a deviation from ISO8601 is supported, allowing the ‘W’ designator to
be mixed with other designators. See assumed types section in the Support IM.
Used for recording the duration of something in the real world, particularly when
there is a need a) to represent the duration in customary format, i.e. days, hours,
Use
minutes etc, and b) if it will be used in computational operations with date/time
quantities, i.e. additions, subtractions etc.
GEHR G1_DATE_TIME_DURATION
Interval of Point in Time, IVL<TS>. The width attribute provides the duration.
HL7
IVL<TS> thus models an anchored duration.
Date of Issue: 20 Nov 2008 Page 60 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS DV_DURATION
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 61 of 88 Date of Issue: 20 Nov 2008
8 Time_specification Package
8.1 Overview
Time specification is about potentiality rather than actuality, and needs its own types. The openEHR
data_types.time_specification package provides such types, based on the HL7 types of the
same names, and is illustrated in FIGURE 10.
DATA_VALUE
(rm.data_types.basic)
time_specification
DV_TIME_SPECIFICATION
value[1]: DV_PARSABLE
calendar_alignment: String
event_alignment: String
institution_specified: Boolean
DV_PERIODIC_TIME_ DV_GENERAL_TIME_
SPECIFICATION SPECIFICATION
8.1.1 Requirements
One of the difficulties with time is expressing future times, since potential occurrences, durations,
repetitions cannot be expressed in the same way as actual time. Complicating the problem is the fact
that humans tend to use very customary (i.e. calandar-anchored) ways of specifying time, such as
“every second Tuesday”, or “ the first Sunday of the month”. In clinical medicine, future time is most
commonly used to express when medications or other therapies are intended to take place. They are
often anchored to the calendar, and can easily include repetitions.
As with other time types, there are both simple and complex cases to consider. One of the most com-
mon examples of time in the future is the timing for drug administrations, e.g. “once every four
hours”. This could be represented as a simple periodic specification, consisting of a start point in
time, a period, and a number of repetitions. The specification for taking blood sugar levels during a
glucose test could be represented as a simple aperiodic series, e.g. “.5hr, 1hr, 2hr”. However, even
common specifications for prescriptions e.g. “three times a day for seven days” start to become quite
complex, for example, because “three times a day” might not mean literally 8 hours apart.
Some of the factors to consider in timing specifications are:
• period of repetition
• duration of activity being specified
Date of Issue: 20 Nov 2008 Page 62 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
8.1.2 Design
The HL7 version 3 data types for time specification appear to allow for all of the required possibili-
ties. The syntax is based on the ISO 8601 standard [9]. It provides types which express:
• Periodic intervals (HL7v3 - PIVL<T:TS>) - allows period, duration, and calendar linking to
be specified.
• Event-linked periodic intervals (HL7v3 - EIVL<T:TS>) - allows PIVLs to be linked to real-
world events like meals.
• General timing specification (HL7v3 - GTS) - allows any time specification to be expressed,
using a syntax which is equivalet to a series of IVL<TS> (i.e. intervals of DATE_TIME).
The HL7 syntax for time specification is encapsulated in equivalent openEHR types described here.
Inherit DATA_VALUE
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 63 of 88 Date of Issue: 20 Nov 2008
CLASS DV_PERIODIC_TIME_SPECIFICATION
The Duration data value class provides for the specification of time intervals, and
CEN
also for a simple string description of the periodicity.
Inherit DV_TIME_SPECIFICATION
Date of Issue: 20 Nov 2008 Page 64 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
pure_phase_linked_time_spec: phase |
phase “@” alignment
interval_spec: “;” |
“;” date_time |
date_time “;” date_time |
date_time “;”
CLASS DV_GENERAL_TIME_SPECIFICATION
Purpose Specifies points in time in a general syntax. Based on the HL7v3 GTS data type.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 65 of 88 Date of Issue: 20 Nov 2008
CLASS DV_GENERAL_TIME_SPECIFICATION
Use
The Duration data value class provides for the specification of time intervals, and
CEN
also for a simple string description of the periodicity.
HL7 GTS
Inherit DV_TIME_SPECIFICATION
factor:
interval |
phase_linked_time_spec |
event_linked_time_spec |
"(" general_time_spec ")"
Date of Issue: 20 Nov 2008 Page 66 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
9 Encapsulated Package
9.1 Overview
The data_types.encapsulated package contains classes representing data values whose internal
structure is defined outside the EHR model, such as multimedia and parsable data. It is illustrated in
FIGURE 11.
DATA_VALUE
(rm.data_types.basic)
encapsulated
DV_ENCAPSULATED
coded by openEHR
codeset “character sets” charset[0..1]: CODE_PHRASE
language[0..1]: CODE_PHRASE
coded by openEHR size: Integer
codeset “languages”
as_string: String
thumbnail 0..1
DV_MULTIMEDIA DV_PARSABLE
alternate_text[0..1]: String value[1]: String
coded by openEHR uri[0..1]: DV_URI formalism[1]: String
codeset “media types”
data[0..1]: Array<Octet> size: Integer
coded by openEHR media_type[1]: CODE_PHRASE
codeset “compression compression_algorithm[0..1]: CODE_PHRASE
algorithm” integrity_check[0..1]: Array<Octet>
integrity_check_algorithm[0..1]: CODE_PHRASE
coded by openEHR
codeset “integrity size[1]: Integer
check algorithm” is_external[1]: Boolean
is_inline[1]: Boolean
is_compressed[1]: Boolean
has_integrity_check[1]: Boolean
9.1.1 Requirements
There is a need to be able to include content in the EHR whose interior structure is not modelled in
the EHR reference model, but instead documented by sufficient meta-data attributes for specific tools
to process the data. Types of content in this category are as follows.
• Images, including images which are themselves a compressed version of one image from a
high-resolution image set stored elsewhere. Such images may be in any of the well-known
compressed or uncompressed formats, and may have their own thumbnail image attached, to
facilitate web-viewing.
• Bio-signal data series, such as a set of values representing a diagnostic part of an ECG trace.
This might be represented as DICOM content.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 67 of 88 Date of Issue: 20 Nov 2008
• Content which is textual (or nearly so) which is essentially a parsable language file of some
kind. This includes all XML instance, HTML, and any other EHR content which happens to
be represented in syntax form - such as the unit strings used in quantities. The name of the
formalism should be stored as meta-data.
• Binary content which is processed by a work processor or other dedicated tool.
• Digital signatures.
Sufficient meta-data must be included with all of these types to enable a way for the content to be
processed, typically by indicating either its type (e.g. “jpeg”, “word document”) or the name of a tool
which can be used to process it. Important meta-data include:
• size of the content;
• natural language, if any.
Any encapsulated data item may be a summary, “thumbnail” or otherwise reduced form of an original
content item found outside the EHR, in some other system or file-system.
Checksums must be expressible for those items for which a checksum is available, or for which the
system generates checksums to improve the quality of its internal data transmissions.
9.1.2 Design
The design approach used here is based on the following analysis.
1. Any encapsulated data item may be in some particular language, even if it is an image or
other graphic form such as a biosignal with axis markings in a particular language;
2. The general structure of encapsulated content data items includes a block of bytes or charac-
ters representing the content, and various meta-data as appropriate, including:
- size
- character encoding
- compression type/algorithm
- name of formalism for parsable content
3. For encapsulated items that have a counterpart in another system, the standard means of
portable address is the W3C URI;
4. For items may that have an associated integrity checksum, the checksum is itself a series of
bytes, and the type of checksum must also be specified, e.g. “md5”.
These observations lead naturally to an abstract DV_ENCAPSULATED class, with two subtypes,
DV_PARSABLE, for all content which is syntactic in nature, and DV_MULTIMEDIA for everything else.
Note that it is possible to imagine parsable content items which are large, stored in compressed form,
and are themselves a summary of another item elsewhere on the web; such items can for practical
purposes be represented as instances of DV_MULTIMEDIA, rather than DV_PARSABLE. The vast
majority of parsable encapsulated data are expected to be short and stored in native textual form, e.g.
fragments of XML or HTML.
The formal model of the classes DV_ENCAPSULATED and DV_MULTIMEDIA are closely based on the
ED type from the HL7v3 data types specification.
Date of Issue: 20 Nov 2008 Page 68 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
Purpose Abstract class defining the common meta-data of all types of encapsulated data.
CEN TBD
Inherit DATA_VALUE
CLASS DV_MULTIMEDIA
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 69 of 88 Date of Issue: 20 Nov 2008
CLASS DV_MULTIMEDIA
Use
The Bulky Data class provides for the representation and storage of all binary data
Synapses
classified by its MIME type.
GEHR G1_MULTIMEDIA_DATA
Inherit DV_ENCAPSULATED
media_type: CODE_PHRASE Data media type coded from openEHR code set
1..1 “media types” (interface for the IANA MIME
types code set).
compression_algorithm: Compression type, a coded value from the
0..1 CODE_PHRASE openEHR “Integrity check” code set. Void means
no compression.
integrity_check: Binary cryptographic integrity checksum
0..1
Array <Octet>
0..1 data: Array <Octet> The actual data found at uri, if supplied inline
(cond)
is_external: Boolean Computed from the value of the uri attribute: True
ensure if the data is stored externally to the record, as
uri /= Void implies Result indicated by `uri'. A copy may also be stored inter-
nally, in which case `is_expanded' is also true.
Date of Issue: 20 Nov 2008 Page 70 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS DV_MULTIMEDIA
CLASS DV_PARSABLE
Inherit DV_ENCAPSULATED
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 71 of 88 Date of Issue: 20 Nov 2008
CLASS DV_PARSABLE
Date of Issue: 20 Nov 2008 Page 72 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
10 Uri Package
10.1 Overview
The data_types.uri package includes two types used for referring to information resources. The
DV_URI type allows data values which are references to objects on the world wide web to be created.
Its specialisation, DV_EHR_URI, enables any element in an openEHR record to be identified in the
same way as other objects on the web. The DV_EHR_URI type is convenient, because it is a string,
like any other URI, and is therefore easily transportable and processable. Because it has its own
scheme space, “ehr”, instances can be globally unique, as long as EHR identification is globally
unique. DV_EHR_URIs are used to express all runtime paths in the EHR. The uri Package is illus-
trated in FIGURE 12.
DATA_VALUE
(rm.data_types.basic)
uri
DV_URI
value[1]: String
scheme: String
path: String
fragment_id: String
query: String
DV_EHR_URI
10.1.1 Requirements
This package meets the requirement for a DATA_VALUE subtype which represents a W3C Uniform
Resource Identifier (URI). A common example of where this might be used is to represent a reference
to a clinical guideline or other justifying document associated with an intervention or treatment plan
recorded in the EHR.
URIs are a superset of Uniform Resource Locators (URLs) (although the two are often confused,
even within the W3C), and can be used to specify the location of any information item, regardless of
its type, location or storage method, as long as a URI “scheme” exists for that type of information.
There is an additional requirement for a kind of URI that can point at an EHR data item, either inside
the same EHR containing the link, or in another EHR. This is the basis of implementing the LINK
type.
10.1.2 Design
A simple design approach is used whereby a URI is represented as a String, and appropriate functions
are defined to extract the various parts according to the syntax of URIs defined by Tim Berners-Lee at
http://www.ietf.org/rfc/rfc2396.txt. An EHR specific subtype is defined, whose scheme is
“ehr”, and which contains further attributes enabling the instances of the type to record what kind of
object they are referring to.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 73 of 88 Date of Issue: 20 Nov 2008
10.2 Definitions
The following symbolic definitions are used in the classes below.
• Ehr_scheme: String is “ehr”
CLASS DV_URI
MisUse
CEN TBD
HL7 TBD
Inherit DATA_VALUE
Date of Issue: 20 Nov 2008 Page 74 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
CLASS DV_URI
CLASS DV_EHR_URI
A DV_EHR_URI is a DV_URI which has the scheme name “ehr”, and which can
Purpose
only reference elements in EHRs. The syntax is described below.
Use Used to reference elements in an EHR, which may be the current one, or another.
Inherit DV_URI
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 75 of 88 Date of Issue: 20 Nov 2008
CLASS DV_EHR_URI
Date of Issue: 20 Nov 2008 Page 76 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
11 Implementation Strategies
11.1 Overview
This section notes a few of the general challenges for mapping the openEHR data types to implemen-
tation technologies such as programming languages and XML. For specific guidelines, Implementa-
tion Technology Specification (ITS) document for each target formalism should be consulted.
11.3 Unicode
Unicode is supported in various ways in different languages. In Java, since JDK 1.1, unicode support
is implicit in the base classes. From the documentation:
the classes java.io.InputStreamReader, java.io.OutputStreamWriter, and
java.lang.String can convert between Unicode and a number of other character
encodings. More information is available at:
http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html.
In the C# language, conversion can be done between Unicode and other codepages using the Sys-
tem.Text.UnicodeEncoding (for UTF-16) and System.Text.UTF8Encoding (for UTF-8)
classes.
In XML unicode is handled by specifying the encoding of the document in the XML declaration, e.g.
<?xml version="1.0" encoding="UTF-16"?>.
In the Eiffel language, unicode is available in the Gobo public domain library (see
http://www.gobosoft.com), in the UC_STRING class, which inherits from the String class.
The support in other languages varies, and may require a special type like the UC_STRING used in
Eiffel.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 77 of 88 Date of Issue: 20 Nov 2008
Date of Issue: 20 Nov 2008 Page 78 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
12.1 Scope
Some HL7v3 types are not modelled in openEHR. HL7v3 V3DT types which are assumed by
openEHR to exist in the underlying type system of any implementation technology include:
• Integer (INT)
• Real (REAL)
• Set (SET)
• List (LIST)
• Bag (BAG)
HL7v3 types which are not modelled here because they are almost always too volatile for concrete
modelling, and can be created with archetyped generic information structures are as follows (even in
HL7 they are really data structures rather than data types):
• Postal address (AD)
• Entity name (EN)
• Person name (PN)
• Organisation name (ON)
• Trivial name (TN)
These types are all modelled by archetyped spatial data structures in openEHR (equivalent to sub-
types of Structure in the CDA specification).
HL7v3 types which may need to be modelled in the future include:
• Uncertain value probabilistic (UVP)
• Non-parametric probability distribution (NPPD)
• Parametric probability distribution (PPD)
Types which are provided by openEHR but not supported directly by HL7 include:
• state variable (DV_STATE);
• ordinal values (DV_ORDINAL);
• explicit partial date and time types (DV_DATE, DV_TIME);
• explicit time duration (DV_DURATION).
Types in the latter two categories may be implementable with the TS (timestamp) type.
12.2.1 Naming
All types in the HL7 specification have two names, one short and one long. For example the type rep-
resenting physical quantities is known both as “PhysicalQuantity” and “PQ”. While short names may
be reasonable for often-used types, someshort names are not obvious, e.g. “EN”, “ON”, “TN”,
“NPPD” etc. Short names certainly have benefits for drawing tools such as Rational Rose or other
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 79 of 88 Date of Issue: 20 Nov 2008
UML tools, however, it is questionable whether a formal model should include concept names chosen
on the basis of visual appearance in such tools (one might argue that such tools should provide aliases
for visual purposes, without changing the actual model). Another problem is that UML does not
include the concept of class name aliases, nor do most programming languages.
The openEHR model uses one name only for each class.
12.2.2 Identification
The HL7 V3DT includes the types II, UID, OID and UUID. The II type is claimed to be for identify-
ing all kinds of entities, which we here classify as real-world entities (“RWEs”) (such as people, vehi-
cle registrations, invoices) and informational entities (“IEs”) - which in general are snapshots of data
representing an RWE in a computer system. One problem with RWE identification schemes is that
some are known (e.g. social security number) to produce fallible identifiers or situations where multi-
ple RWEs have the same identifier, or no identifier at all. Conversely, with well-controlled and inter-
nationally agreed ways of issuing/generating information system identifiers (e.g. GUID, ISO OID) it
is thought that such identifiers can be made reliable, and indeed correspond 1:1 with their intended
IEs. However, a problem with IEs is that there are often duplicates and also multiple versions in time,
each intended to represent the same RWE (such as a particular person, observation or composition).
As far as can be ascertained currently, there is no standard analysis taking into account the existence
of IEs and RWEs, and recognising the fact that multiple versions and/or duplicates may refer to the
same RWE.
The approach taken in openEHR with respect to identifiers is currently as follows.
• RWE identifiers such as social security numbers, licence numbers, etc are modelled with the
type DV_IDENTIFIER, which has the attributes:
- issuer: String
- id: String
- type: String
The attributes listed above are nearly the same as for the HL7 II type, indicating that the two
types may be compatible.
• Identification of IEs is done using the type OBJECT_ID, which is not a data type, and is doc-
umented in the Support Information Model. The OBJECT_ID type takes into account the
fact that there may be multiple IEs referring to the same underlying RWE by adding a ver-
sion identifier (assumed to be a timestamp).
12.2.3 Archetyping
The openEHR data types are defined on the assumption of archetype-based systems. While they will
work perfectly well in systems which know nothing about archetyping, some types are not defined
because archetypable structures built from more basic entities are assumed instead, rather than con-
cretely modelled data types. These include “types” for address and person name which are found in
HL7v3 and CEN 13606.
Date of Issue: 20 Nov 2008 Page 80 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
in the definition, and do not rely on external semantics. Possible problems with this approach include
the following.
• The HL7 definitions diverge from the OMG IDL and ISO 11404 definitions of the basic data
types, which could cause unexpected problems in software development and data process-
ing which is done in typical development technologies (object-oriented and relational).
• The HL7 types INT and REAL are defined as subtypes of the QTY type, a relationship that
does not exist in any object-oriented formalism for these types (in particular, there is no sub-
stitutability of a type called Integer or Real for a type called Qty built in to any object lan-
guage). The definitions of INT and REAL are also different from those found in most object
formalisms. This might cause some difficulty in implementation.
• The binary data type BIN is represented as a List<BL> (where each item can be True,
False, null), whereas it would normally be expected to be something like Array<Octet>
(i.e. an array of bytes) in most software environments. There does not appear to be any util-
ity in defining it as List<BL>, since binary data is almost without exception represented
and processed as contiguous arrays of machine bytes.
• The string type ST inherits from the encapsulated data type ED, which in turn inherits from
the binary data type BIN. The result of this is that an instance of ST contains numerous data
attributes relating to multi-media data, and the content is presumably represented as a
List<BL>. This is a major departure from the standard understanding of a string in compu-
ter sciences, which is usually simply an array of characters.
• The HL7 boolean type BL is a three-valued logic type due to the null marker approach (see
below), not the usual two-valued type found in the Boolean concept in programming lan-
guages. The same is true of INT and REAL: due to the null marker design, “null” is a possi-
ble return value of an integer or real as well as true integer and real values.
In general, where differences exist between same-named types in HL7 and an underlying formalism
such as a programming language, there is likely to be some confusion in implementation. Further,
there is likely to be confusion in how to process instances of basic types which contain numerous (and
sometimes recursive) fields which are not used in the standard specifications of basic types.
The openEHR approach with respect to inbuilt types is to assume only those types found in the main-
stream object-oriented programming languages, and in particular, definitive formalisms like OMG
IDL and XML. While this means there there is in theory less control over these types than in the HL7
approach, the number of types involved is quite small, and the problem of bindings to the basic types
of object formalisms is well understood. Additionally, since it is recognised that some data types
defined by openEHR could clash with types found in some languages and libraries, all data type class
names are prefaced with “DV_” to avoid naming confusion, and to allow implementations of
openEHR types to co-exist with existing types in implementation formalisms.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 81 of 88 Date of Issue: 20 Nov 2008
whether any part of a datum is null. Thus, in the class Interval<T> shown below, all attributes have
the possibility of containing a Null marker.
type Interval<T> alias IVL<T> extends Set<T>
{
T low;
BL lowClosed;
T high;
BL highClosed;
T.diff width;
T center;
IVL<T> hull(IVL<T> x);
literal ST;
promotion IVL<T> (T x);
demotion T;
};
For example, this allows an interval with missing ends and width to exist as a structured type. The
consequence of the approach is that the entire model is essentially a model of “partial” data types; any
attribute and any function call may return a Null value, as well as the true values of its type (in fact, in
the specification, Null values are defined to be valid values of all data types). This design decision
was taken in HL7 so that any datum, no matter how unknown, would be structurally representable in
the same way as completely known data, enabling it to be processed in the same way as all other
instances of the same type.
However, an important object-oriented design principle has been ignored in this approach. In the
proper design of classes, properties and class invariants are stated. Invariants are statements which
describe the correctness conditions of instances of the class; the general rule is that the post-condition
of a creation routine (constructor) of a class must be that the invariants are satisfied. For example, an
invariant of the HL7 IVL<T> class could be:
(exists(low) and exists(high)) or else
(exists(low) and exists(width)) or else
(exists(width) and exists(high))
When an instance of this class is created, this condition should be satisfied, and remain satisfied for
the life of the instance. To do otherwise is to create instances of data which other software can make
no assumptions about, and is forced to check every single field, and then determine what to do in an
ad hoc way. (See [6] p366, [4] p43, [5] p29 for detailed explanations of the invariant concept).
Possible consequences of the built-in Null marker design approach include:
• since even HL7’s basic types ST, INT, REAL, LIST<>, SET<> include null markers, process-
ing of null values will be pervasive at the lowest level;
• software will be more complex, both implementations of the data types, and of software
which handle them. This is because the software always has to deal with the possibility of
calls to routines and attributes returning Null values. Most clinical information systems to
date have taken the approach that a datum is either represented as an instance of a formal
type if fully known, or else as narrative text if only partial;
• data may not be always be safely processable, since some software may not properly handle
the null values associated with attributes of partially known data items. Essentially, all soft-
ware which processes the data has to be “null-value aware”, and make no assumptions at all
about whether a particular data instance is valid or not.
The HL7 data type model is in contrast with simpler approaches such as used in CEN, GEHR, and
openEHR, where data types are formal models of types such as Coded_term, Quantity and so on.
Date of Issue: 20 Nov 2008 Page 82 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
Rather than build the possibility of null markers into every attribute and class in the data types, a sin-
gle null marker is defined in relevant containing classes. This decision is based on the principle that
data types should be defined independently of their context of use. Hence, where data types are used
as data values, such as in the value attribute of the class ELEMENT from the openEHR EHR reference
model, the parallel features is_null and null_flavour are also defined. However, where data types
appear as attributes elsewhere in the model and there is no possibility of them being null, no null
markers are used. FIGURE 13 shows visually the difference between the two approaches.
Data Data Data
Value #1 Value #2 Value #3
null + flavour val val
val val null + flavour
HL7
approach null + flavour val val
null + flavour val val
val val val
Typical val
approach val
val
val
val
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 83 of 88 Date of Issue: 20 Nov 2008
• for particular data types which are often partial, special features are defined. The main types
affected are DV_DATE, DV_TIME, and DV_DATE_TIME; the properties month_unknown,
day_unknown, minute_unknown, and second_unknown (based on ISO 8601 semantics) are
used to define explicitly the semantics of dates with a missing day, times with missing sec-
onds and so on;
• Intervals of date/time types include types generated when the parameter type is one of the
partial classes, thus, types DV_INTERVAL<DV_DATE> (where one or both ends has an
unknown part) are possible. This covers the need for intervals in which some date is missing
from the end date/times, while not allowing intervals with completely missing items to be
created;
• for expressing uncertainy more precisely, probability distribution data types (based on the
types defined in HL7) can be used.
A consequence of the HL7 model is that data instances represented in XML or another structured text
format will be structurally the same regardless of whether there are Null values or not. A structured
form for partially known data (which would normally break the invariants of its class) may well be
useful for representing the data as part of a text field, making it easier to use for whatever processing
is possible later on.
Date of Issue: 20 Nov 2008 Page 84 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
peutic prescriptions have the form "do X every Y time", where the X describes what to do,
and how long to do it for (e.g. 40 mins massage, administer a drug slowly over 10 mins). In
fact, what we are really interested in with a timing specification is the specification of the
starting points in time of some activity, not a time-based graph of on/off points, whch is
effectively what the PIVL type is now.
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 85 of 88 Date of Issue: 20 Nov 2008
A References
A.1 General
1 Berners-Lee T. "Universal Resource Identifiers in WWW". Available at ht-
tp://www.ietf.org/rfc/rfc2396.txt. This is a World-Wide Web RFC for global
identification of resources. In current use on the web, e.g. by Mosaic, Netscape and similar
tools. See http://www.w3.org/Addressing for a starting point on URIs.
2 Beale T. Archetypes: Constraint-based Domain Models for Future-proof Information Systems.
See http://www.deepthought.com.au/it/archetypes.html.
3 Beale T et al. Design Principles for the EHR. See http://www.deepthought.com.au/openEHR.
4 Booch G. Object-Oriented Analysis and Design with applications. 2nd ed. Benjamin/Cum-
mings 1994.
5 Kilov H. Information Modelling - an object-oriented approach. Prentice Hall 1994.
6 Meyer B. Object-oriented Software Construction, 2nd Ed. Prentice Hall 1997.
7 Richards E G. Mapping Time - The Calendar and its History. Oxford University Press 1998.
8 Schadow G, McDonald C J. The Unified Code for Units of Measure, Version 1.4, April 27,
2000. Regenstrief Institute for Health Care, Indianapolis. See http://aurora.rg.iu-
pui.edu/UCUM
9 ISO 8601 standard describing formats for representing times, dates, and durations. See e.g.
http://www.mcs.vuw.ac.nz/technical/software/SGML/doc/iso8601/ISO8601.html and ht-
tp://www.cl.cam.ac.uk/~mgk25/iso-time.html.
A.3 CEN
11 ENV 13606-1 - Electronic healthcare record communication - Part 1: Extended architecture.
CEN/ TC 251 Health Informatics Technical Committee.
12 ENV 13606-2 - Electronic healthcare record communication - Part 2: Domain term list. CEN/
TC 251 Health Informatics Technical Committee.
13 ENV 13606-3 - Electronic healthcare record communication - Part 3: Distribution rules. CEN/
TC 251 Health Informatics Technical Committee.
Date of Issue: 20 Nov 2008 Page 86 of 88 Editors:{T Beale, S Heard}, {D Kalra, D Lloyd}
A.5 HL7
15 Schadow G, Biron P. HL7 version 3 deliverable: Version 3 Data Types. (2nd ballot 2002 ver-
sion).
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 87 of 88 Date of Issue: 20 Nov 2008
END OF DOCUMENT
Editors:{T Beale, S Heard}, {D Kalra, D Lloyd} Page 88 of 88 Date of Issue: 20 Nov 2008