Best type for encoded values including "other" (implying free text)

Peter Gummer peter.gummer at
Wed Oct 3 05:55:17 EDT 2012

Hi Athanasios,

The way to do this in the Archetype Editor is by adding a "Choice" element.

With the Choice element, you can add multiple constraint types to the same node. In this particular case, you would add two Text constraints, one free text and the other with the internal codes.

This is such a common scenario that there is a proposal to make it easier to do this. Here is the text of the change request (which maybe someone will get around to doing one day):

> Currently whenever modelling DV_coded text in an archetype, in 90+% of cases the true requirement is actually to model a choice of the DV_CodedText plus a DV_text (for the almost inevitable 'Other' options). Looks awkward and cumbersome. Additional step for nearly every one of these modelling situations. 
> However modelling this is cumbersome for so many text situations. After discussion with Sam, an option would be to allow the modeller to select DV_coded text and at the same time the application would automatically add the DV_text choice to the ADL underlying it by default. In the less common instance where the DV_text was not desired, then the modeller could deselct this as a checkbox from the AE Text attribute interface 
> So, request additional functionality: 
> 1. Modeller adds a text data type, names it. 
> 2. Selects a DV_CODEDTEXT ie Internal codes or Terminology -> Choice of DV_CODEDTEXT plus DV_TEXT is written to the ADL as default (likely 90+% likelihood that this combination is to be used) 
> 3. Modeller deselects checkbox to remove the DV_TEXT component in less common situation that it is not desired. 


More information about the openEHR-clinical mailing list