Structured Data Capture
4.0.0-ci-build - STU 4 CI-build International flag

Structured Data Capture, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 4.0.0-ci-build built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/sdc/ and changes regularly. See the Directory of published versions

General Guidance

Page standards status: Informative

This section covers overarching guidance around the use of Questionnaires and QuestionnaireResponses that does not cleanly fit into any of the other pages.

Handling QuestionnaireResponse items without answers

When an answer is not present for a question or a set of questions in a group, there are two legal ways to represent this in a completed QuestionnaireResponse:

  • Keep the item (with its item text), but do not include answers
  • Strip the item out of the QuestionnaireResponse entirely

(Note that when performing population, the recommendation is to not strip out disabled items until such time as the form is marked as completed.)

The first approach allows rendering the full response (including unanswered questions) without access to the Questionnaire. Stripping unanswered items means that rendering unanswered questions requires access to the Questionnaire, which might not always be possible for downstream systems. As well, there may be extensions on the item that convey useful information (e.g. whether the user saw the item, removed populated answers, etc.) even if no answer is present. Form fillers SHOULD NOT remove items without answers if there are extensions present unless it is known they are not relevant.

The second approach can save a considerable amount of storage space, especially for forms that are often sparsely populated.

Systems SHALL safely handle QuestionnaireResponses that use either approach and SHALL NOT ascribe distinct meaning to an item being omitted vs. being present with no answer.

Assessing QuestionnaireResponses

In some cases, knowing that a QuestionnaireResponse is 'valid' against a particular Questionnaire is not sufficient. Instead, there is a need to evaluate that answers provided against a set of criteria - to diagnose, evaluate risk, assess competence, or some similar purpose. There are a number of mechanisms that support such evaluation, as well as special considerations around questionnaire design when doing so.

Assessment mechanisms

The most common mechanism of evaluation is by 'scoring' particular answers. Different answers to a question are associated with differing weights. By performing a mathmatical operation on the weights of the answers (typically simple summation), an overall score can be determined and the desired evaluation can be performed based on the score value. This is done using two extensions:

A second mechanism is to use extraction mechanism to either complete a second QuestionnaireResponse with assessment results of the first form, or a population mechanism to define a second form that grabs information from the originally completed QuestionnaireResponse. Extraction can also be used (with either complex FHIRPath or CQL) to extract a score directly into an Observation.

The third mechanism is to leverage a second answerKey QuestionnaireResponse that identifies the 'correct' or 'preferred' responses. A human or computer software can then evaluate the completed QuestionnaireResponse against the answerKey, producing an evaluation. Evaluation comments can also be embedded in the completed QuestionnaireResponse using the sdc-questionnaire-item-answerAssessment.html extension. Examples are provided of both a key, as well as a QuestionnaireResponse evaluated against that key.

Concealing assessments

In some cases, it can be problematic if the individual completing the Questionnaire is aware of the score as it can change how they complete the form. (For example, if completing a test, it would not be helpful if the user knew how well they had done and had the ability to adjust their answers.)

If the concern is concealing the weights and calculations while the user is completing the form, but no concern that the user will have access to the underlying Questionnaire definition, there are a couple of options. Which of the two is appropriate depends on whether it is appropriate or necessary for the user to see the score at some point.

  • The data element that calculates the score can either be hidden. The score will be present in the exchanged QuestionnaireResponse, but never visible to end-users.
  • Alternatively, the element can be flagged as only visible during a usageMode of display, such that the answer is only visible once the QuestionnaireResponse is marked as complete. In this case, however, there would need to be a mechanism that prevents the user from going back into edit mode once the completed form is visible.

If there is a concern about users (or others) having access to the Questionnaire definition itself, then embedding the scores, calculations, or extraction rules in the Questionnaire completed by the end user is an issue. In this case, the mechanism for concealment needs to separate the 'assessment' metadata into a separate mechanism. The 'population' approach discussed above provides one mechanism, as the logic lives in the definition of the 'target' instrument rather than the source. Another option is to use derived Questionnaires. A secondary Questionnaire that mirrors the first in terms of hierarchy, linkIds, data types, permitted answers, etc. is created that inserts the additional calculation metadata. That could include weights, extraction logic, or additional items to hold calculated scores. The original Questionnaire is distributed to systems for completion, while the derived Questionnaire is closely held and is used with the resulting QuestionnaireResponses to support assessment.