I’m a bit confused by the example given here in the ADL 2 spec.
The definition section from the base archetype is:
-- openEHR-EHR-EVALUATION.problem.v1 --
EVALUATION[id1] ∈ { -- Problem
data ∈ {
ITEM_TREE[id2] ∈ {
items cardinality ∈ {0..*; ordered} ∈ {
ELEMENT[id3] occurrences ∈ {1} ∈ {
value ∈ {
DV_TEXT[id4] -- *** NODE A
}
}
ELEMENT[id5] occurrences ∈ {0..1} ∈ {...} -- Date of initial onset
ELEMENT[id6] occurrences ∈ {0..1} ∈ {...} -- Age at initial onset
ELEMENT[id7] occurrences ∈ {0..1} ∈ {...} -- Severity
ELEMENT[id8] occurrences ∈ {0..1} ∈ {...} -- Clinical description
ELEMENT[id10] occurrences ∈ {0..1} ∈ {...} -- Date clinically received
CLUSTER[id11] occurrences ∈ {0..1} ∈ {...} -- Location
CLUSTER[id14] occurrences ∈ {0..1} ∈ {...} -- Aetiology
-- etc
}
}
}
}
and the specialisation example is:
-- openEHR-EHR-EVALUATION.problem-diagnosis.v1 -- -- specialises openEHR-EHR-EVALUATION.problem.v1
EVALUATION[id1.1] ∈ { -- Recording of diagnosis
/data[id2.1]/items[id3]/value ∈ { -- redefine id2 to id2.1 (in terminology section)
DV_CODED_TEXT[id4] ∈ { -- << This node redefines 'NODE A' above
defining_code ∈ {[ac0.1]}
}
}
/data/items cardinality ∈ {0..*; ordered} ∈ {
before [id5]
ELEMENT[id0.32] occurrences ∈ {0..1} ∈ { -- Status ++ This node added
value ∈ {
DV_CODED_TEXT[id0.33] ∈ {
defining_code ∈ {
[local::at0.33, at0.34] -- provisional
}
}
}
}
after [id31]
CLUSTER[id0.35] occurrences ∈ {0..1} ∈ {...} -- Diag. criteria ++ This node added
CLUSTER[id0.37] occurrences ∈ {0..1} ∈ {...} -- Clin. staging ++ This node added
}
}
My questions follow:
- In the specialised archetype, the path to value is given as:
EVALUATION[id1.1] ∈ { -- Recording of diagnosis
/data[id2.1]/items[id3]/value ...
why is the items
path segment items[id3]
but not items[id3.1]
? The definition of the object referred to by items
attribute is modified (in two different ways) in the specialisation. Is an idNNN
code only supposed to be modified when its meaning is modified? (as is the case with id1.1
) Iow, is it the case that changes to id
codes imply only a change in meaning and not a change in constraints defined by the following object (constraint) nodes?
-
Why is the constraint that is at the path given above terminating with
DV_CODED_TEXT[id4]
and notDV_CODED_TEXT[id4.1]
? We just constrained the type to something that’s more strict than the parent archetype’s constraint at the same path? -
There’s a second modification (specialisation) taking place at the same level with 1) :
/data/items cardinality ∈ {0..*; ordered} ∈
why is this path not reflecting the changes made to id codes by the first one? i.e. ../data[id2.1]/...
. The instances of newly inserted constraints in the data will be at path ../data[id2.1]/...
as per the previous modification to id code.
- Look at this constraint:
defining_code ∈ {
[local::at0.33, at0.34] -- provisional
}
is [local::at0.33, at0.34]
still valid? My understanding of the spec after reading it again is that ADL2 replaces the semantic expressed in this syntax with defining an ac
code which should point at a set of local codes (at) and using it as ..{[acNN]}
(or something like this)
- There’s an overall ADL semantics mismatch here, at least acc. to my tired brain. When constraints are provided at the same level (i.e. they’re siblings) under a path and the path is that of a container type, then all the instances defined by constraints are valid members of the container. Great. Except, the two modifications under the
EVALUATION[id1.1]
have different paths, so they are sibling declarations of constraints, but they don’t constrain sibling elements/paths in the RM. This means that the structural semantics of the specialisation in ADL is different than that of non-specialised form. If true, I’m not sure of the implications, but this at least conflicts with what the spec says: there is no difference between parent and child archetype semantics except the child can ignore paths it is not modifying. Probably not significant, but I did notice it. Maybe I missed something.