Text widget
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 is dealt with seperately
Consideration of different UI requirements and the relation to an archetype are provided elsewhere.
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
- The entire value (string) must displayed (ie scrolling of the form is required rather than scrolling of the widget)
- 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.
Features
Value
(string)
The value is a string which should be displayed in full. This means that the widget should resize to show all of the text entered. The value should be the most prominent expression of the widget - it is the value of the widget as far as the user is concerned.
Mappings
(TERM_MAPPING)
A set of mappings to codes from terminologies for the value. These should be shown if the text is edited after choosing the term, with the textural meaning as returned by the terminology for comparison. A reason for the mapping may be given and a mandatory character that describes the match (>,<,=,?). Each mapping has a target (CODE_PHRASE).
Hyperlink
(DV_URI)
This has its own widget and should show an icon when present which allows the user to click and display the linked information.
Formating
(string)
A formating statement which describes how to format the value from W3C CSS2 properties lists "background" and "font".
Language
(CODE_PHRASE)
The optional coded language of the value.
Encoding
(CODE_PHRASE)
The optional encoding of the value.
Defining code (DV_CODED_TEXT only)
(CODE_PHRASE)
The code phrase that defines the value in the terminology of choice. The defining code might be considered a special case of mapping where the match is '=' and the reason is to provide unambiguous meaning.