# Which code in code_string symbol for DV_ORDINAL? **Category:** [Technical (archive)](https://discourse.openehr.org/c/technical-archive/156) **Created:** 2011-03-16 17:40 UTC **Views:** 1 **Replies:** 4 **URL:** https://discourse.openehr.org/t/which-code-in-code-string-symbol-for-dv-ordinal/12554 --- ## Post #1 by @Leonardo_Moretti I'm wondering how to set code\_string value for a DV\_ORDINAL\. Having a DV\_ORDINAL a structure like this: <items archetype\_node\_id="at0004\.1" xsi:type="ELEMENT"> <name> <value>Element name</value> </name> <value xsi:type="DV\_ORDINAL"> <value>5</value> <symbol> <value>Description 5</value> <defining\_code> <terminology\_id> <value>local</value> </terminology\_id> <code\_string>???</code\_string> </defining\_code> </symbol> </value> </items> which information should I use in code\_string of DV\_ORDINAL element? The integer value or the atxxxx code? For example, if I defined an ordinal element as ELEMENT\[at0004\.1\] occurrences matches \{0\.\.1\} matches \{ \-\- Igiene Personale      value matches \{          5|\[local::at0\.15\], \-\- Description 5          4|\[local::at0\.14\], \-\- Description 4          3|\[local::at0\.13\], \-\- Description 3          2|\[local::at0\.12\], \-\- Description 2          1|\[local::at0\.11\] \-\- Description 1      \} \} has code\_string to be set with at0\.1x codes or with integer values \(1, 2, 3, 4, 5\)? Thanks for your help\! Regards leo --- ## Post #2 by @thomas.beale Leonardo, In this case, since terminology_id = 'local', code_string will be some string like 'at0.13' (based on your extract below). If the terminology_id had been SNOMEDCT_2009_01_01 then code_string has to be a SNOMED CT code... and so on. - thomas [details="(attachments)"] ![OceanInformaticsl.JPG|183x82](upload://2lcnRHcC3QqDv6AeaDZuo8M9Qlv.jpeg) [/details] --- ## Post #3 by @Leonardo_Moretti Thank you Thomas, I have clear how to use terminology\_id and code for DV\_CODED\_TEXT, but here I'm wondering if I can use the ordinal \(integer\) value as coded value in a DV\_ORDINAL, like in this example \(note: <code\_string>5</code\_string>\): <items archetype\_node\_id="at0004\.1" xsi:type="ELEMENT">   <name>     <value>Element name</value>   </name>   <value xsi:type="DV\_ORDINAL">     <value>5</value>     <symbol>     <value>Description 5</value>     <defining\_code>       <terminology\_id>         <value>local</value>       </terminology\_id>       <code\_string>5</code\_string>     </defining\_code>     </symbol>   </value> </items> Ragards leo Thomas Beale\-3 wrote: --- ## Post #4 by @Peter_Gummer1 Leonardo Moretti wrote: > I have clear how to use terminology\_id and code for DV\_CODED\_TEXT, > but here > I'm wondering if I can use the ordinal \(integer\) value as coded > value in a > DV\_ORDINAL, like in this example \(note: <code\_string>5</code\_string>\): > \.\.\. >      <terminology\_id> >        <value>local</value> >      </terminology\_id> >      <code\_string>5</code\_string> No, Leonardo, you can't do that\. The ordinal's value and the code string are different things\. The code string must be a member of the terminology\. In your example, the terminology is "local", which means that it's an at\-code\. Imagine that the coded text used a different terminology\. Imagine that this terminology had codes like "1", "2", "3", "4", "5", etc\. If this was your terminology, then of course your code string could be "5"\. \- Peter --- ## Post #5 by @ian.mcnicoll Hi Leonardo, You can use a local terminology-id but do not use 'local' for the terminology name, which is reserved name meaning that internal atcodes are being used. So this would be valid, I think ... > > leonardoCT > > 5 Ian Dr Ian McNicoll office +44 (0)1536 414994 fax +44 (0)1536 516317 mobile +44 (0)775 209 7859 skype ianmcnicoll [ian.mcnicoll@oceaninformatics.com](mailto:ian.mcnicoll@oceaninformatics.com) Clinical analyst, Ocean Informatics, UK openEHR Clinical Knowledge Editor [www.openehr.org/knowledge](http://www.openehr.org/knowledge) Honorary Senior Research Associate, CHIME, UCL BCS Primary Health Care [www.phcsg.org](http://www.phcsg.org) --- **Canonical:** https://discourse.openehr.org/t/which-code-in-code-string-symbol-for-dv-ordinal/12554 **Original content:** https://discourse.openehr.org/t/which-code-in-code-string-symbol-for-dv-ordinal/12554