Annotations Section
The annotations section of an archetype or template provides a place for ad hoc node-level meta-data to be added. This can be used during the design phase to track dependencies, design decisions, and specific resource references.
Annotations are divided into major named groups. Currently a documentation group is defined, intended for documentary (i.e. human-readable text) annotations. Other groups are likely to be defined in the future for various kinds of processing, where the annotations may be formal expressions or code fragments.
Each annotation is keyed by a path, and may have any number of tagged elements. The path key can either be:
-
the path of the archetype node being annotated, or
-
a pure RM path
The usual case is the first, since annotations mainly relate to nodes in an archetype. However, it may be the case that within the context of the archetype, there is a need to refer to a part of the Reference Model type on which the archetype is based (OBSERVATION, EVALUATION etc) that is not constrained within the archetype, in order to indicate how it is to be understood within that archetyped structure (remember that an archetype does not need to constrain all possible paths of an information model class, but that such structures may nevertheless be instantiated).
A typical annotations section looks as follows (archetype source). The /subject path is a non-constrained 'RM path'.
--
-- Extract from test archetype openEHR-EHR-EVALUATION.annotations_1st_child.v1.0.0
--
definition
EVALUATION[id1.1] matches { -- Exclusion statement - Adverse Reaction
/data[id2]/items matches {
...
ELEMENT[id0.8] occurrences matches {0..1} matches { -- No known allergic reaction to
value matches {
DV_TEXT[id0.6]
}
}
...
ELEMENT[id0.10] occurrences matches {0..1} matches { -- No known intolerance to
value matches {
DV_TEXT[id0.8] -- No known allergic reaction to
}
}
}
}
terminology
...
annotations
documentation = <
["en"] = <
["/subject"] = <
["design note"] = <"xxxxxx">
>
["/data[id2]/items[id0.8]"] = <
["design note"] = <"this is a design note on allergic reaction">
["requirements note"] = <"this is a requirements note on allergic reaction">
["medline ref"] = <"this is a medline ref on allergic reaction">
>
["/data[id2]/items[id0.10]"] = <
["design note"] = <"this is a design note on intelerance">
["requirements note"] = <"this is a requirements note on intolerance">
["national data dictionary"] = <"NDD ref for intolerance">
>
>
>
Because annotations are defined as a separate section, they can be easily removed in production versions of an archetype or template, and ignored in the generation of digital signatures.