# Error in C_DV_CODED_TEXT **Category:** [Implementers (archive)](https://discourse.openehr.org/c/implementers-archive/158) **Created:** 2006-10-22 02:39 UTC **Views:** 3 **Replies:** 1 **URL:** https://discourse.openehr.org/t/error-in-c-dv-coded-text/15890 --- ## Post #1 by @thomas.beale 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](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. 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 --- ## Post #2 by @Mattias_Forss1 > > 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 --- **Canonical:** https://discourse.openehr.org/t/error-in-c-dv-coded-text/15890 **Original content:** https://discourse.openehr.org/t/error-in-c-dv-coded-text/15890