# ELEMENT with "name" and "value" attributes in ADL **Category:** [ADL](https://discourse.openehr.org/c/adl/40) **Created:** 2022-01-13 15:24 UTC **Views:** 506 **Replies:** 2 **URL:** https://discourse.openehr.org/t/element-with-name-and-value-attributes-in-adl/2263 --- ## Post #1 by @borut.jures Vital signs template includes "openEHR-EHR-OBSERVATION.pulse.v2.0.4.opt2" with ELEMENT definition that has two attributes: "name" and "value". [ELEMENT](https://specifications.openehr.org/releases/RM/latest/data_structures.html#_element_class) has three optional attributes: "null_flavour", "value", "null_reason". ``` ELEMENT[id1024] occurrences matches {0..*} matches { -- Clinical interpretation name matches { DV_CODED_TEXT[id9015] occurrences matches {0..1} matches { defining_code matches {[ac9004]} -- Clinical interpretation (synthesised) } } value matches { DV_TEXT[id9016] occurrences matches {0..1} } } ``` ac9004 can have two values: - at1059: Rhythm(en); Specific conclusion about the rhythm of the pulse or heartbeat, drawn from a combination of the heart rate, pattern and other characteristics observed on examination. - at1058: Clinical interpretation(en); Generic label to allow for any or all statements about the pulse or heart beat. Shouldn't the above ELEMENT be specified as: ``` ELEMENT[id1024] occurrences matches {0..*} matches { -- Clinical interpretation value matches { DV_CODED_TEXT[id9015] occurrences matches {0..1} matches { defining_code matches {[ac9004]} -- Clinical interpretation (synthesised) } DV_TEXT[id9016] occurrences matches {0..1} } } ``` Or am I missing something? --- In case the second example is the solution: ADL grammar/parser cannot catch ELEMENT with two attributes as error. Should the CKM catch it? Or the OPT validator? --- ## Post #2 by @sebastian.garde The "name" is inherited from LOCATABLE. The first part of the constraint above thus specifies a constraint on the name of the ELEMENT/LOCATABLE and one of the - in this case two - options is to be picked at runtime: ![grafik|690x185](upload://o7oOME3zR2tyzlx1VVrSx5zS9GW.png) --- ## Post #3 by @borut.jures Thank you Sebastian! I missed the LOCATABLE. I'm glad it is something I can fix in my code :blush: --- **Canonical:** https://discourse.openehr.org/t/element-with-name-and-value-attributes-in-adl/2263 **Original content:** https://discourse.openehr.org/t/element-with-name-and-value-attributes-in-adl/2263