# Why is value not optional for DvCodedText

**URL:** <https://discourse.openehr.org/t/why-is-value-not-optional-for-dvcodedtext/1945>\
**Category:** RM\
**Created:** [18 October 2021 12:48 UTC](https://discourse.openehr.org/t/why-is-value-not-optional-for-dvcodedtext/1945 "2021-10-18T12:48:27Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![thomas.beale](https://discourse.openehr.org/user_avatar/discourse.openehr.org/thomas.beale/32/35_2.png) [@thomas.beale](https://discourse.openehr.org/u/thomas.beale)\
**Post date:** [19 October 2021 12:54 UTC](https://discourse.openehr.org/t/why-is-value-not-optional-for-dvcodedtext/1945/13 "2021-10-19T12:54:50Z")

</div>

It could have gone the other way. When we modelled this in the past, the clinical people were pretty adamant that they wanted any text item to be seamlessly replaceable by a coded item. So we did it that way. More recent discussions (e.g. [this one](https://discourse.openehr.org/t/option-to-record-free-text-as-choice-against-dv-coded-text-do-we-need-dv-plain-text/623) with 72 replies 😉 came to the conclusion that if we had our time again, we would model it like this:

- DV\_TEXT (abstract)
  - DV\_PLAIN\_TEXT
  - DV\_CODED\_TEXT

So if you wanted to have a value in an archetype with a constraint meaning ‘text item, coded, or plain’ (aka coded with exceptions or CWE in HL7v3, v2), then you would just constrain the value to DV\_TEXT. Otherwise you constrain it to only coded or only plain text.

We might still do this…

---

_[View the full topic](https://discourse.openehr.org/t/why-is-value-not-optional-for-dvcodedtext/1945)._
