Skip to main content

Terminology Binding

Standardised terminology can be used in FHIR Questionnaires via codes and valueSets for interoperability purposes.

The elements/extensions that fall under this category are:

Other related extensions:

note

The three mechanisms (answerOption, answerValueSet and answerExpression) are mutually exclusive. Only one should appear on the same item.

Not all components support terminology binding. Only the following components support terminology binding:

Components
choice
open-choice
quantity (via unitOption)

AnswerOption

AnswerOption is used to specify a list of possible answers to a question. Each answer can be represented by a integer, date, time, string, Coding or Reference element.

AnswerOption provides a way to initially set answer(s) as selected for a question via answerOption.initialSelected. However, multiple initial selections can only be used in repeating items. There can only be one initial selected value for non-repeating items.

Basic usage

Checkbox usage

Radio button usage

AnswerValueSet

AnswerValueSet allows a set of codes in a code system within a valueSet to be used as a set of possible answers to a question. It also allows for the possibility of sharing a set of answers across multiple items within a single Questionnaire.

There are two ways to define an answerValueSet:

  1. Referencing a ValueSet URL
{
"resourceType": "Questionnaire",
// ...
"item": [
{
// ...
"answerValueSet": "http://hl7.org/fhir/ValueSet/example-valueSet"
}
]
}
  1. Referencing a ValueSet defined in a contained resource
{
"resourceType": "Questionnaire",
// ...
"contained": [
{
"resourceType": "ValueSet",
"id": "example-value-set",
"url": "http://hl7.org/fhir/ValueSet/example-valueSet",
// ...
"expansion": [
{
"contains": [
{
"system": "http://hl7.org/fhir/ValueSet/example-valueSet",
"code": "code-1",
"display": "display-1"
},
{
"system": "http://hl7.org/fhir/ValueSet/example-valueSet",
"code": "code-2",
"display": "display-2"
}
]
}
]
}
],
"item": [
{
// ...
"answerValueSet": "#example-value-set"
}
]
}

Basic usage

Auto-complete usage

Checkbox usage

Radio Button usage

AnswerExpression

Allows specifying a FHIR Query or FHIRPath that resolves to be used as a set of possible answers to a question.

warning

Support for this extension is not thoroughly tested yet.

Basic usage

UnitOption

UnitOption is used to specify a list of possible units to a Quantity question.

This can be used when the unit is not fixed, and allows the user to choose from a list of units.

Basic usage

PreferredTerminologyServer

PreferredTerminologyServer is used to specify the preferred terminology server to use for terminology requests associated with the whole questionnaire or a particular group or question within the questionnaire (depending on where the extension appears).

Basic usage