DvCodedText

public class DvCodedText extends EhrDatatype

This class represents a DV_CODED_TEXT item, according to the definition provided by the OpenEHR Data Type Information Model

Fields

terminology

String terminology

The terminology.

Constructors

DvCodedText

public DvCodedText(String path, JSONObject attributes)

Instantiates a new DV_CODED_TEXT item.

Parameters:
  • path – the path
  • attributes – the attributes

Methods

fromJSON

public void fromJSON(JSONObject data)

getOptions

public String[] getOptions()

Gets the options of this DV_CODED_TEXT

Returns:the options

getSelectedOption

public String getSelectedOption()

Gets the selected option.

Returns:the selected option

getSelectedOptionIndex

public int getSelectedOptionIndex()

Gets the selected option index.

Returns:the selected option index

setAttributes

protected void setAttributes(JSONObject attributes)

setSelectedOptionIndex

public void setSelectedOptionIndex(int index)

Sets the selected option index.

Parameters:
  • index – the new selected option index

toJSON

public JSONObject toJSON()