Error in C_DV_CODED_TEXT

Dear all,

I was staring at the ADL and openEHR archetype profile and realised there is an error in class naming. C_DV_CODED_TEXT should be named C_CODE_PHRASE. I think Mattias may have already pointed out something like this, but it took me until only a week ago to realise the error. It has occurred because we put custom syntax into ADL before defining any C_XXX types. But as you cna see if you review any of the archetypes, where the custom syntax occurs e.g. from http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_pressure.v1.html

ELEMENT[at0008] occurrences ∈ {0..1} ∈ {    -- Position
                        value ∈ {
                            CODED_TEXT ∈ {
<b>                                code ∈ {
                                    [local::
                                    at1000,     -- Standing
                                    at1001,     -- Sitting
                                    at1002,     -- Reclining
                                    at1003;     -- Lying
                                    at1001]    -- assumed value
                                }</b>
                            }
                        }
                    }

The AOM entity that the bolded section above corresponds to is a CODE_PHRASE, not a CODED_TEXT (which as you can see is one level up). If you want to see this error clearly, have a look at this archetype in the ADL Workbench, and look at the path analysis with “RM type” and “AOM type” columns turned on. You will see “CODE_PHRASE” and “C_CODED_TEXT”, which of course do not match.

This means that the openEHR archetype profile is in error, and the C_DV_CODED_TEXT class has to be renamed. This won’t actually affect any archetypes, but it will affect the archetype tools, and the ADL production rules, since the name c_coded_text appears in the .y specification. The change will also not affect any semantics either, so no-one has to make the change immediately.

I will make the appropriate changes and publish them, and also attempt to vastly improve the clarity of the ADL and profile documents with respect to these special types, which I know have been causing some confusion.

Apologies for the temporary blindness on my part - and thanks to Mattias mainly for bugging me so long on these issues - once again proving how essential implementer feedback is. I hope to have update ADL and profile docs on the web by the end of the week. They will also include the changes for generic types and the improved quoting rules.

  • thomas

Dear all,

I was staring at the ADL and openEHR archetype profile and realised there
is an error in class naming. C_DV_CODED_TEXT should be named C_CODE_PHRASE.
I think Mattias may have already pointed out something like this, but it
took me until only a week ago to realise the error. It has occurred because
we put custom syntax into ADL before defining any C_XXX types. But as you
cna see if you review any of the archetypes, where the custom syntax occurs
e.g. from

Yes, I remember discussing this with you long ago, I think I asked
something about why there wasn't a C_DV_CODED_TEXT correspondence in
ADL, but I never pressured the issue about the profile class which
seemed to be unused.

http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_pressure.v1.html

ELEMENT[at0008] occurrences ∈ {0..1} ∈ { -- Position
value ∈ {
CODED_TEXT ∈ {
code ∈ {
[local::
at1000, -- Standing
at1001, -- Sitting
at1002, -- Reclining
at1003; -- Lying
at1001] -- assumed value
}
}
}
}

The AOM entity that the bolded section above corresponds to is a
CODE_PHRASE, not a CODED_TEXT (which as you can see is one level up). If you
want to see this error clearly, have a look at this archetype in the ADL
Workbench, and look at the path analysis with "RM type" and "AOM type"
columns turned on. You will see "CODE_PHRASE" and "C_CODED_TEXT", which of
course do not match.

I tried this, and I see RM type "CODE_PHRASE" and AOM type "C_CODED_TERM"...

Mattias