Answer types & options

Every question has an answer type that decides what the user can enter and which control renders. For choice questions you also decide where the options come from. Both are configured in the item's Answer Type editor.

Choosing the answer type

The answer type maps directly to a FHIR item.type: text, integer, decimal, quantity, boolean, choice, open-choice, date, dateTime, time, URL, attachment or reference. See Questionnaire & items for the full list and how each maps to FHIR.

Choice questions can be shown as radio buttons, a drop-down, or check-boxes (a multi-select "checklist"); the underlying FHIR type stays choice either way. The Answer Type editor also offers three display options: Autocomplete (a searchable drop-down, so people can type to filter a long list), Lookup (live search against a server, for a drop-down that uses an external value set) and Answer table (shows the options as table columns, for radio and check-box questions).

Picking versus typing in an open choice

An open choice question lets people either pick from the list or type their own answer. What you see is what is saved: a value picked from the list is recorded as a coded answer (code, label and code system) and shows a ✓ next to the field; text you type is recorded as plain text, even if it happens to match a list entry. When typed text matches a list entry, a short hint suggests picking it from the list if you want the coded answer. Loading a saved response restores each answer as it was recorded.

Where choice options come from

A choice/open-choice question can get its options from one of four sources, selected at the top of the Answer Type editor:

  • Options list — a fixed list you build row by row, each row with a code and a label (e.g. M / Male), plus optional score, prefix and weight. Rows can also be marked as exclusive (picking it clears the other choices).
  • A bound value set — reference a ValueSet by canonical URL (answerValueSet). External value sets are expanded through the configured terminology server, and the editor has a Test expansion action so you can check the URL resolves. A value set contained inside the questionnaire is used directly when it lists its codes (with their system) one by one; contained value sets that are defined only by a code system, by other value sets or by filters are not expanded.
  • Expression — generate the options at run time with FHIRPath (answerExpression), instead of a fixed list. See FHIRPath in the builder.
  • Candidate — like an expression, but it produces suggested answers for the respondent to choose from (candidateExpression). It cannot be combined with an expression or a fixed options list on the same question.

Scoring options

Options can carry numeric scores — an ordinal value or an item weight — which are useful for questionnaires that sum answers into a total (risk scores, screening tools). Options can also show a short prefix before each label.

Layout of options

For inline choice lists you can control the presentation:

  • Column count — lay the options out across several columns.
  • Orientation — arrange them horizontally or vertically.

These are rendering recommendations applied to the inline radio / check-box layouts in the preview.

Numbers with units

Integer and decimal questions can declare a unit (e.g. kg, mmHg), and a quantity question can offer a unit drop-down bound to a units value set.


Next: Validation.