Templates (OET format)
While an archetype describes a maximum data set of everything that may ever be documented about the clinical concept described in the archetypes, a template is usually designed for a particular use case/scenario. To be able to properly describe such a use case, a template uses three main mechanisms:
- A template references/aggregates a number of archetypes required for the particular use case.
- A template then applies further constraints/rules to these archetypes. For example, a template can
- Mandate some (originally optional) elements from archetypes
- Exclude some elements from archetypes because they are not applicable for the template’s use case.
- Rename element names of an archetype for the specific use case to clarify the element’s meaning within the context of the use case.
- A template adds meta data describing its use etc. as well as adding annotations to individual elements.
In addition, a template can embed other templates, as applicable.
The oet format has been designed to be able to formally describe a template using the described mechanisms – aggregation, constraints, dataset specific metadata and annotations. The archetypes in combination with the template hold all the information required, but on different levels. This is appropriate for clinical modelling that aims to reuse the essential building blocks (archetypes).
Operational Templates (OPTs)
In contrast, Operational Templates (OPTs) are the computational format for operational EHR systems using archetypes. In addition, they also serve as the starting point for transformations to other (downstream) formats – for example: documentation, template data schemas, APIs.
OPTs are generated from templates and their referenced archetypes. The generated OPT combines all the information from all archetypes used in the template (and potentially its embedded templates), applies all constraints and descriptions explicitly as specified by the template. Thus, an OPT is a single – and usually massive – file that describes the computational format used by openEHR systems. In contrast to archetypes and templates, the purpose of the OPT is for technical implementation rather than clinical modelling.
A template (OET) is one of the primary assets in CKM. From it and its archetypes, we can then generate the Operational Template on demand, as a secondary asset. The Operational Template is then used by CKM - for example to generate the Form-based Template view or the template review form in CKM.