The openEHR Archetype Model

The Template Object Model (TOM)

Editors: {T Beale, S Heard}a
Revision: 0.5 Pages: 19 Date of issue: 13 Mar 2007

a. Ocean Informatics

Keywords: EHR, ADL, health records, archetypes, templates

EHR Extract
EHR Demographic Integration Template OM
Composition openEHR Archetype Profile
Security Common Archetype OM ADL
Data Structures
Data Types
Support
© 2005-2007 The openEHR Foundation

The openEHR Foundation is an independent, non-profit community, facilitating the sharing of health records by consumers and clinicians via open-source, standards-based implementations.

Founding David Ingram, Professor of Health Informatics,
Chairman CHIME, University College London
Founding Dr P Schloeffel, Dr S Heard, Dr D Kalra, D Lloyd, T Beale
Members
email: info@openEHR.org web: http://www.openEHR.org

The Template Object Model (TOM)

Rev 0.5

Copyright Notice

© Copyright openEHR Foundation 2001 - 2007 All Rights Reserved

  1. This document is protected by copyright and/or database right throughout the world and is owned by the openEHR Foundation.
  2. You may read and print the document for private, non-commercial use.
  3. You may use this document (in whole or in part) for the purposes of making presentations and education, so long as such purposes are non-commercial and are designed to comment on, further the goals of, or inform third parties about, openEHR.
  4. You must not alter, modify, add to or delete anything from the document you use (except as is permitted in paragraphs 2 and 3 above).
  5. You shall, in any use of this document, include an acknowledgement in the form: "© Copyright openEHR Foundation 2001-2007. All rights reserved. www.openEHR.org"
  6. This document is being provided as a service to the academic community and on a non-commercial basis. Accordingly, to the fullest extent permitted under applicable law, the openEHR Foundation accepts no liability and offers no warranties in relation to the materials and documentation and their content.
  7. If you wish to commercialise, license, sell, distribute, use or otherwise copy the materials and documents on this site other than as provided for in paragraphs 1 to 6 above, you must comply with the terms and conditions of the openEHR Free Commercial Use Licence, or enter into a separate written agreement with openEHR Foundation covering such activities. The terms and conditions of the openEHR Free Commercial Use Licence can be found at http://www.openehr.org/free_commercial_use.htm

Date of Issue: 13 Mar 2007 Page 2 of 19 Editors:{T Beale, S Heard}

The Template Object Model (TOM)

Rev 0.5

Amendment Record

Issue Details Raiser Completed
R E L E A S E 1.0.1
0.5 Minor content modifications. T Beale 13 Mar 2007
R E L E A S E 1.0
0.5rc1 CR-000178. Add Template Object Model to AM. Initial Writing T Beale 10 Nov 2005
R E L E A S E 0.96

Editors:{T Beale, S Heard} Page 3 of 19 Date of Issue: 13 Mar 2007

Rev 0.5

Trademarks

Microsoft is a trademark of the Microsoft Corporation

Date of Issue: 13 Mar 2007 Page 4 of 19 Editors:{T Beale, S Heard}

The Template Object Model (TOM)

Rev 0.5

Editors:{T Beale, S Heard} Page 5 of 19 Date of Issue: 13 Mar 2007

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Template Object Model (TOM)

Rev 0.5

Date of Issue: 13 Mar 2007 Page 6 of 19 Editors:{T Beale, S Heard}

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Template Object Model (TOM) Introduction Rev 0.5

Introduction

1.1 Purpose

This document describes an object model for openEHR templates, based only upon the generally accepted semantics of object models (typified by the OMG UML meta-model). The model presented here can be used as a basis for building software that processes archetypes and templates, independent of their persistent representation. As a specification, it can be treated as an API for templates.

It is recommended that the openEHR ADL and AOM documents be read in conjunction with this document, since they contain a detailed explanation of the semantics of archetypes.

1.2 Related Documents

Prerequisite documents for reading this document include:

The openEHR Architecture Overview Related documents include:

  • The openEHR Archetype Definition Language (ADL)
  • The openEHR Archetype Object Model (AOM)

1.3 Nomenclature

In this document, the term ‘attribute’ denotes any stored property of a type defined in an object model, including primitive attributes and any kind of relationship such as an association or aggregation. XML ‘attributes’ are always referred to explicitly as ‘XML attributes’.

1.4 Status

This document is under development, and is published as a proposal for input to standards processes and implementation works.

The latest version of this document can be found in PDF format at http://svn.openehr.org/spec ification/BRANCHES/Release-1.0.1-candidate/publishing/architecture/am/tom.pdf. New versions are announced on openehr-announce@openehr.org .

Blue text indicates sections under active development.

THIS DOCUMENT IS UNDER ACTIVE DEVELOPMENT AND IS NOT YET SUBJECT TO ARB CONTROL.

1.5 Background

1.5.1 What is a Template?

The openEHR template concept is related to openEHR archetypes. Where archetypes define widely re-usable components of information, templates are locally defined and encapsulate local usage of archetypes, and relevant preferences. In informal terms, templates include the following semantics:

archetype ‘chaining’: choice of archetypes to make up a larger structure, specified via indicating identifiers of archetypes to fill slots in higher-level archetypes;

Editors:{T Beale, S Heard} Page 7 of 19 Date of Issue: 13 Mar 2007

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

Introduction The Template Object Model (TOM) Rev 0.5

local optionality: narrowing of some or all 0..1 constraints to either 1..1 (mandatory) or 0..0 (removal) according to local needs;

tightened constraints: tightening of other constraints, including cardinality, value ranges, terminology value sets and so on;

default values: choice of default values for use in templated structure at runtime.

At runtime, templates are used with archetypes to create data and to control its modification. Template design is usually strongly linked to the design of corresponding screen forms.

1.6 Tools

Various tools exist for creating and processing templates. The openEHR tools are available in source and binary form from the website ( http://www.openEHR.org ).

Date of Issue: 13 Mar 2007 Page 8 of 19 Editors:{T Beale, S Heard}

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Template Object Model (TOM) The Template Object Model Rev 0.5

The Template Object Model

2.1 Design Background

An underpinning principle of openEHR is the use of archetypes and templates, which are formal models of domain concepts controlling data structure and content of data. The elements of this architecture are twofold.

  • The openEHR Reference Model (RM), defining the structure and semantics of information.
  • The openEHR Archetype Model (AM), defining the structure and semantics of archetypes and templates. The AM consists of the archetype language definition language (ADL), the Archetype Object Model (AOM), the openEHR Archetype profile (OAP), and the Template Object Model (TOM).

This document describes the Template Object Model, which is used with the Archetype Object Model as a basis for archetype-processing software.

2.2 Package Structure

The openEHR template package is illustrated in FIGURE 1.

am openehr_profilearchetype

template template_spec

operational_template

FIGURE 1 openehr.am.template Package in context

Two forms of templates are used in openEHR. The form created by template design tools is known as the ‘specification’ form, since it specifies the contents of a template using references to archetypes and other additions. The specification form is defined in the am.template.template_spec package. The second form is the ‘operational’ form, created by processing a template specification so as to partially pre-populate terminology value sets, expand out references to other templates and archetypes, and create runtime structures that representing other aspects of the specification. The operational form is specified in the operational_template package.

Editors:{T Beale, S Heard} Page 9 of 19 Date of Issue: 13 Mar 2007

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Template Object Model The Template Object Model (TOM) Rev 0.5

Date of Issue: 13 Mar 2007 Page 10 of 19 Editors:{T Beale, S Heard}

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Template Object Model (TOM) The Template_spec Package Rev 0.5

The Template_spec Package

3.1 Overview

To Be Continued:

Editors:{T Beale, S Heard} Page 11 of 19 Date of Issue: 13 Mar 2007

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

AUTHORED_RESOURCE

FIGURE 2 The openehr.am.template.template_spec Package

The Template Object Model (TOM) The Template_spec Package Rev 0.5

3.1.1 Example

(TEMPLATE_SPEC) <

definition = < archetype_id = <openEHR-EHR-COMPOSITION.report.v1>slot_specs = <

[“/content”] = < path = </content> fillers = <

[“findings”] = <archetype_id = <openEHR-EHR-SECTION.findings.v1>slot_specs = <

[“items”] = <path = <items>fillers = <

[“histology”] = <cardinality = <min = <1> max = <1>>archetype_id = <openEHR-EHR

OBSERVATION.histology.v1> > > >

> > [“summary”] = <

archetype_id = <openEHR-EHR-SECTION.summary.v1>slot_specs = <

[“items”] = <path = <items>fillers = <

[“clinical_synopsis”] = <archetype_id = <openEHR-EHR

EVALUATION.clinical_synopsis.v1> > [“problem-diagnosis-histological”] = <

archetype_id = <openEHR-EHREVALUATION.problem-diagnosishistological.v1>

path_specs = <path = </data[at0001]/items[at0031]>

[1] = <cardinality = <max = <0>> > > > > > > > > > >

> >

3.2 Class Definitions

Editors:{T Beale, S Heard} Page 13 of 19 Date of Issue: 13 Mar 2007

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Template_spec Package The Template Object Model (TOM) Rev 0.5

3.2.1 TEMPLATE_SPEC Class

CLASS TEMPLATE_SPEC
Purpose
Use
Abstract Signature Meaning
template_id: ARCHETYPE_ID
Invariant xxx

Date of Issue: 13 Mar 2007 Page 14 of 19 Editors:{T Beale, S Heard}

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Template Object Model (TOM) The Operational_template Package Rev 0.5

The Operational_template Package

4.1 Overview

To Be Continued:

FIGURE 3 The openehr.am.template.operational_template Package
4.2 Class Definitions
4.2.1 TEMPLATE Class
CLASS TEMPLATE
Purpose
Use
Abstract Signature Meaning
template_id: TEMPLATE_ID
Invariant xxx

Editors:{T Beale, S Heard} Page 15 of 19 Date of Issue: 13 Mar 2007

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Operational_template Package The Template Object Model (TOM) Rev 0.5

Date of Issue: 13 Mar 2007 Page 16 of 19 Editors:{T Beale, S Heard}

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Template Object Model (TOM)

Rev 0.5

A References

Publications

1 Beale T. Archetypes: Constraint-based Domain Models for Future-proof Information Systems. OOPSLA 2002 workshop on behavioural semantics. Available at http://www.deepthought.com.au/it/archetypes.html.

2 Beale T. Archetypes: Constraint-based Domain Models for Future-proof Information Systems. 2000. Available at http://www.deepthought.com.au/it/archetypes.html .

3 Beale T, Heard S. The Archetype Definition Language (ADL). See http://www.openehr.org/re positories/spec-dev/latest/publishing/architecture/archetypes/lan guage/ADL/REV_HIST.html.

4 Heard S, Beale T. Archetype Definitions and Principles. See http://www.openehr.org/reposi tories/spec-dev/latest/publishing/architecture/archetypes/princi ples/REV_HIST.html.

5 Heard S, Beale T. The openEHR Archetype System. See http://www.openehr.org/reposito- ries/spec-dev/latest/publishing/architecture/archetypes/system/REV_HIST.ht ml .

Resources

6 openEHR. EHR Reference Model. See http://www.openehr.org/repositories/spec dev/latest/publishing/architecture/top.html.

Editors:{T Beale, S Heard} Page 17 of 19 Date of Issue: 13 Mar 2007

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Template Object Model (TOM)

Rev 0.5

Date of Issue: 13 Mar 2007 Page 18 of 19 Editors:{T Beale, S Heard}

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org

The Template Object Model (TOM)

Rev 0.5

END OF DOCUMENT

Editors:{T Beale, S Heard} Page 19 of 19 Date of Issue: 13 Mar 2007

© 2005-2007 The openEHR Foundation email: info@openEHR.org web: http://www.openEHR.org