Text in openEHR is handled as one of three classes (UML):
- DV_TEXT which has a textural display and any codes from terminologies that classify or categorise this text
- DV_CODED_TEXT, a specialisation that adds a 'defining code phrase' which returns the text displayed from a terminology service
- DV_PARAGRAPH which aggregates the other textural classes into compound expressions if required
Requirements
- The text widget must ensure that it only expresses a DV_CODED_TEXT if the text displayed is exactly that returned by the terminology service with the corresponding code phrase. Otherwise the code phrase must be entered as a 'mapping'.
- The text widget must be able to refer to a terminology service and choose a term which is entered as the value of the DV_TEXT. The code will be entered as a defining code (DV_CODED_TEXT) or as a mapping
- If the text is edited manually by the user after a round trip to the terminology server then the class returned by the Widget must be a DV_TEXT with the code as a mapping
- The user must be aware of the meaning of any mapped codes in the terminology service at the time of committing the data to ensure these codes are appropriate. The reason for and relative status (a broader or narrower concept) of a mapping may be entered as well.