SDC and questionnaires


Introduction


In this module you will learn more about questionnaires and structured data capture (SDC).

The topics covered in this module are:

  • The Questionnaire and QuestionnaireResponse resources
  • Other resources that are relevant to questionnaires
  • Profiling of Questionnaires and QuestionnaireResponses
  • The structure data capture (SDC) initiative and implementation guide (IG)
  • Pre and auto population of QuestionnaireResponses

Reading material


1. Questionnaire resources

The Questionnaire resource is a structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection. Questionnaires are suitable for direct data capture (and presentation) of raw data for humans, when there is a need for tight control over data capture and there is no tuned user-interface. With a Questionnaire you can control how questions are phrased, the order (and conditionality) of questions and constraints on allowed responses (e.g. min/max values, list of allowed values). Keep in mind, however, that a Questionnaire often makes it necessary to convert responses to other resources if you want to (re)use the data for querying, analysis and combining data from different sources. The Questionnaire itself has no consistent representation.

An instance of the Questionnaire resource contains the definition of a questionnaire. The actual responses to the questionnaire are instances of the resource QuestionnaireResponse and contain a reference to the Questionnaire resource.

1.1 Questionnaire

Below is a graphical representation of the Questionnaire resource. It consists of metadata (e.g. name, title, date and publisher) and questionnaire items.

A Questionnaire consists of 3 types of items:

  1. Groups. These items organize the content of the questionnaire. They must have children and cannot have an answer.
  2. Questions. These are the actual questions of the questionnaire. They have (optional) answers.
  3. Display. This item can be used to provide additional text. A display item cannot have children or answers.

Group items and question items can have nested items. Below is an example of a question in a questionnaire containing two sub items: a nested display item and a nested question item.

For example, the xml of this item would be as following:

<item>
  <linkId value="5a" />
  <text value="What pizza toppings would you like?" />
  <type value="choice" />
  <required value="true" /> <!-- question is mandatory -->  
  <repeats value="true" /> <!-- multiple choice -->
  <option>
    <valueString value="Cheese" />
    <valueString value="Ham" />
    <valueString value="Mushrooms" />
    <valueString value="Other" />
  </option>
  <item>
    <linkId="5a-display">
    <text value="(choose at least 1)" />
    <type value="display" />
  </item>
  <item>
	<linkId="5a-subquestion">
    <text value="(please specify):" />
	<type value="String" />
	<enableWhen>
	  <question value="5a" />
	  <answerString value="Other" />
	</enableWhen>
  </item>
</item>

Instead of using the option element you could also use the options element (but not both). Note that in this case you would need to define a ValueSet with the options and refer to this ValueSet. For example:

<options>
  <reference value="https://hl7.org/fhir/ValueSet/PizzaToppings">
</options>

If you wan’t to define a default answer for a question, you can use the initial element. For example, you could initially set the answer of the above question to ‘Cheese’ if you know that this will apply to most people answering this question. When completing the questionnaire, they can either keep this answer or change it to another option.

Finally, the element ‘subjectType’ can be used to define the possible resource type(s) of the subject of a Questionnaire (e.g. a Patient).

1.2 QuestionnaireResponse

A QuestionnaireResponse provides a complete or partial list of answers to a set of questions filles when responding to a questionnaire. A QuestionnaireResponse can be used as a stand-alone to send structured data or refer to a Questionnaire that contains the definition of the questionnaire. The QuestionnaireResponse should have the exact same structure as the Questionnaire it is referring to. For example, the xml of a response to the item described above, would look like this:

<item>
  <linkId value="5a" />
  <text value="What pizza toppings would you like?" />
  <valueCoding value="Other" />
  <item>
    <linkId="5a-subquestion">
    <text value="(please specify):" />
    <valueString="Salami" />
  </item>
</item>

Note that the text elements are not required in the QuestionnaireResponse, but they provide additional context, especially if you use this resource without the Questionnaire. Other important (although not mandatory) elements are subject, author and source. The subject refers to the resource that the questions are about (e.g. an instance of the Patient resource). The author is the one who recorded the answers and the source is the one who answered the questions. These are not necessarily the same. For example, a physician could record answers to questions posed to a patient. In this case, the physician is the author and the patient is the source. Of course, there are cases in which the patient is the author as well.

1.3 Other resources

Other resources that you may need when defining questionnaires are ValueSet, CodeSystem and DataElement. ValueSet and CodeSystem can be used in the definition of answer options. DataElement can be used to define and share common data elements in a questionnaire. DataElement can also be used in the Questionnaire.item.definition element to populate an item with data that is stored elsewhere (e.g. the gender of a Patient). The Questionnaire.item.definition element can either refer to a DataElement or an ElementDefinition in a StructureDefinition.

In the first case, the reference would be for example:

http://hl7.org/fhir/DataElement/gender

In the second case, the reference should contain the name of the StructureDefinition, followed by #, followed by the Element.id of the ElementDefinition. An example is given below:

http://hl7.org/fhir/StructureDefinition/Observation#Observation.value[x]

1.4 Profiling questionnaire resources

It is not necessary to profile QuestionnaireResponse to control your data if you use Questionnaire. You can validate QuestionnaireResponses against the Questionnaire that they reference (although there’s no standard operation to do this yet). Because of the similarities between the Questionnaire and StructureDefinition resources there have even been discussions to merge the two. We believe, however, that it is better practice to use the Questionnaire resource for the definition of your questionnaire than to profile QuestionnaireResponse. But it also depends on what else you want to do with the Questionnaire resource. If you want to share your questionnaire you will definitely need it.

2. Structured data capture (SDC)

Structured Data Capture (SDC) have parallel efforts in IHE (custom schema) and FHIR to support standardization in Questionnaire usage and sharing of data elements, as well as enabling pre- and auto-population. The SDC Initiative develops standards on the design, query and return of forms, minimum data element attributes and submission of completed forms to external repositories. Structured data capture is used for example for clinical research and public health forms.

The SDC Initiative aims to provide:

  1. Support of more sophisticated questionnaires (e.g. for clinical research and auditing)
  2. Support of pre- and auto-population
  3. Standards for sharing common data elements between registries to enable broader and more consistent data element use

2.1 SDC Implementation Guide

The SDC implementation guide (http://hl7.org/fhir/us/sdc/index.html) provides an infrastructure to standardize the capture and expanded use of patient-level data collected within an EHR. The SDC implementation guide provides a couple of profiles that SDC implementations are expected to conform to:

  • SDC Data Element (DE) Profile
  • SDC Questionnaire Profile
  • SDC Questionnaire Response Profile
  • SDC Value Set Profile
  • SDC Code System Profile

2.2 Pre- and auto-population

Pre- and auto-population are used to (automatically) extract data that is already available elsewhere (e.g. gender of a patient). This saves time and errors caused by double registration of data. The difference between pre- and auto-population is as follows; In pre-population responses are pre-populated with EHR-provided patient data and completed by a third party. In auto-population the required data is already available in the data entry system and automatically extracted.

The FHIR standard includes a couple of operations that support pre- or auto-population of a questionnaire:

  • $populate – returns QuestionnaireResponse
  • $populatehtml – returns HTML with active submit button
  • $populatelink – returns URL to site displaying interactive and partially populated form

To enable questionnaire population you need:

  • Extension linking to data element with mapping
  • ConceptMap linking questionnaire questions to data elements with mappings
  • ConceptMap linking questionnaire questions to source data

Real-life examples


IVZ

Stichting Informatievoorziening in de Zorg (IVZ) is a Dutch foundation that creates reports for auditing and monitoring of healthcare data. They offer a couple of quality registries (e.g. the quality registry of neurosurgery) that hospitals can participate in. Hospitals have to send their completed questionnaires to IVZ to receive back a quality analysis report. Hospitals may use HL7 FHIR to extract their data and send it to IVZ.

IVZ has defined the following Questionnaire instance. This instance can be shared with hospitals to share the definition of the questionnaire.

<Questionnaire>
    <id value="sivz-qrns-questionnaire-hypofyse" />
    <identifier>
        <value value="sivz-qrns-questionnaire-hypofyse" />
    </identifier>
    <version value="1" />
    <status value="draft" />
    <date value="2018-01-30" />
    <publisher value="SIVZ" />
    <subjectType value="Patient" />
    <item>
        <linkId value="1" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_diagnose" />
        </options>
    </item>
    <item>
        <linkId value="2" />
        <text value="Behandeldatum" />
        <type value="date" />
    </item>
    <item>
        <linkId value="4153" />
        <text value="ASA Classificatie" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_asa" />
        </options>
    </item>
    <item>
        <linkId value="4159" />
        <text value="Bekend met oogheelkundige pathologie" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
        </options>
    </item>
    <item>
        <linkId value="4162" />
        <text value="Type oogpathologie" />
        <type value="choice" />
        <enableWhen>
            <question value="4159" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <repeats value="true" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4162" />
        </options>
    </item>
    <item>
        <linkId value="7229" />
        <text value="Indien anders: Beschrijf" />
        <type value="text" />
        <enableWhen>
            <question value="4162" />
            <answerCoding>
                <code value="6" />
            </answer>
        </enableWhen>
    </item>
    <item>
        <linkId value="4168" />
        <text value="Eerder behandeld voor hypofysetumor?" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
        </options>
    </item>
    <item>
        <linkId value="4171" />
        <text value="Medicamenteus? (definitie: voorbehandeling (bv metyrapon) telt niet mee als eerdere behandeling)" />
        <type value="choice" />
        <enableWhen>
            <question value="4168" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
        </options>
    </item>
    <item>
        <linkId value="4174" />
        <text value="Operatie?" />
        <type value="choice" />
        <enableWhen>
            <question value="4168" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
        </options>
    </item>
    <item>
        <linkId value="4177" />
        <text value="Bestraling?" />
        <type value="choice" />
        <enableWhen>
            <question value="4168" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
        </options>
    </item>
    <item>
        <linkId value="4179" />
        <text value="Jaartal van eerste behandeling" />
        <type value="integer" />
        <enableWhen>
            <question value="4168" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
    </item>
    <item>
        <linkId value="4181" />
        <text value="Diagnose" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4181" />
        </options>
    </item>
    <item>
        <linkId value="4186" />
        <text value="Indien anders: Beschrijf" />
        <type value="text" />
        <enableWhen>
            <question value="4181" />
            <answerCoding>
                <code value="6" />
            </answer>
        </enableWhen>
    </item>
    <item>
        <linkId value="4188" />
        <text value="Hormonaal actieve tumor" />
        <type value="choice" />
        <enableWhen>
            <question value="4181" />
            <answerCoding>
                <code value="310" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
        </options>
    </item>
    <item>
        <linkId value="4191" />
        <text value="Type hormonaal actieve tumor" />
        <type value="choice" />
        <enableWhen>
            <question value="4188" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4191" />
        </options>
    </item>
    <item>
        <linkId value="4198" />
        <text value="grootte adenoom" />
        <type value="choice" />
        <enableWhen>
            <question value="4181" />
            <answerCoding>
                <code value="310" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4198" />
        </options>
    </item>
    <item>
        <linkId value="4203" />
        <text value="sinus cavernosus invasie (definitie: Knosp 3B en 4)" />
        <type value="choice" />
        <enableWhen>
            <question value="4198" />
            <answerCoding>
                <code value="322" />
            </answer>
        </enableWhen>
        <enableWhen>
            <question value="4198" />
            <answerCoding>
                <code value="323" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
        </options>
    </item>
    <item>
        <linkId value="4206" />
        <text value="apoplexie (definitie: acute hoofdpijn, eventueel met ophtalmoplegie)" />
        <type value="choice" />
        <enableWhen>
            <question value="4181" />
            <answerCoding>
                <code value="310" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
        </options>
    </item>
    <item>
        <linkId value="4209" />
        <text value="Preoperatieve uitval van hypofysefunctie" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonzeker" />
        </options>
    </item>
    <item>
        <linkId value="4213" />
        <text value="Uitval van Gonadotrope as" />
        <type value="choice" />
        <enableWhen>
            <question value="4209" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <enableWhen>
            <question value="4209" />
            <answerCoding>
                <code value="12" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
        </options>
    </item>
    <item>
        <linkId value="4217" />
        <text value="Uitval van Corticotrope as" />
        <type value="choice" />
        <enableWhen>
            <question value="4209" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <enableWhen>
            <question value="4209" />
            <answerCoding>
                <code value="12" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
        </options>
    </item>
    <item>
        <linkId value="4221" />
        <text value="Stimulatietest gedaan?" />
        <type value="choice" />
        <enableWhen>
            <question value="4217" />
            <answerCoding>
                <code value="8" />
            </answer>
        </enableWhen>
        <enableWhen>
            <question value="4217" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
        </options>
    </item>
    <item>
        <linkId value="4225" />
        <text value="Uitval van Somatotrope as" />
        <type value="choice" />
        <enableWhen>
            <question value="4209" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <enableWhen>
            <question value="4209" />
            <answerCoding>
                <code value="12" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
        </options>
    </item>
    <item>
        <linkId value="4229" />
        <text value="Stimulatietest gedaan?" />
        <type value="choice" />
        <enableWhen>
            <question value="4225" />
            <answerCoding>
                <code value="8" />
            </answer>
        </enableWhen>
        <enableWhen>
            <question value="4225" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
        </options>
    </item>
    <item>
        <linkId value="4233" />
        <text value="Uitval van Hypofyse achterkwab" />
        <type value="choice" />
        <enableWhen>
            <question value="4209" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <enableWhen>
            <question value="4209" />
            <answerCoding>
                <code value="12" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
        </options>
    </item>
    <item>
        <linkId value="4237" />
        <text value="Uitval van Thyreotrope as" />
        <type value="choice" />
        <enableWhen>
            <question value="4209" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <enableWhen>
            <question value="4209" />
            <answerCoding>
                <code value="12" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
        </options>
    </item>
    <item>
        <linkId value="4241" />
        <text value="Gezichtsvelddefect(en) met GVO geobjectiveerde uitval en/of verminderde visus?" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
        </options>
    </item>
    <item>
        <linkId value="4244" />
        <text value="Mate van hemi anopsie?" />
        <type value="choice" />
        <enableWhen>
            <question value="4241" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4244" />
        </options>
    </item>
    <item>
        <linkId value="4249" />
        <text value="VOD" />
        <type value="choice" />
        <enableWhen>
            <question value="4241" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_oogdef" />
        </options>
    </item>
    <item>
        <linkId value="4262" />
        <text value="VOS" />
        <type value="choice" />
        <enableWhen>
            <question value="4241" />
            <answerCoding>
                <code value="1" />
            </answer>
        </enableWhen>
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_oogdef" />
        </options>
    </item>
    <item>
        <linkId value="4275" />
        <text value="Andere hersenzenuwuitval (het betreft hier uitval van de III, IV en/of VI)" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
        </options>
    </item>
    <item>
        <linkId value="4279" />
        <text value="Besproken in Multidisciplinair Overleg?" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
        </options>
    </item>
    <item>
        <linkId value="4283" />
        <text value="Belangrijkste indicatie voor operatie" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4283" />
        </options>
    </item>
    <item>
        <linkId value="4289" />
        <text value="Indien anders: Beschrijf" />
        <type value="text" />
        <enableWhen>
            <question value="4283" />
            <answerCoding>
                <code value="6" />
            </answer>
        </enableWhen>
    </item>
    <item>
        <linkId value="4290" />
        <text value="Datum operatie" />
        <type value="date" />
        <required value="true" />
    </item>
    <item>
        <linkId value="4292" />
        <text value="Ziekenhuis waar de operatie heeft plaatsgevonden" />
        <type value="choice" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_ziekenhuis" />
        </options>
    </item>
    <item>
        <linkId value="4311" />
        <text value="Operatietechniek?" />
        <type value="choice" />
        <required value="true" />
        <options>
            <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4311" />
        </options>
    </item>
    <item>
        <linkId value="3" />
        <text value="Follow-up" />
        <type value="group" />
        <item>
            <linkId value="4" />
            <text value="Follow-up datum" />
            <type value="date" />
        </item>
        <item>
            <linkId value="4317" />
            <text value="Opgetreden complicatie?" />
            <type value="choice" />
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
            </options>
        </item>
        <item>
            <linkId value="4321" />
            <text value="Gradering volgens Clavien-Dindo classificatie" />
            <type value="choice" />
            <enableWhen>
                <question value="4317" />
                <answerCoding>
                    <code value="1" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_clavien_hoofd" />
            </options>
        </item>
        <item>
            <linkId value="7246" />
            <text value="Gradering volgens Clavien-Dindo classificatie: Grade III Sub" />
            <type value="choice" />
            <enableWhen>
                <question value="4321" />
                <answerCoding>
                    <code value="353" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_clavien_sub_3" />
            </options>
        </item>
        <item>
            <linkId value="7247" />
            <text value="Gradering volgens Clavien-Dindo classificatie: Grade IV Sub" />
            <type value="choice" />
            <enableWhen>
                <question value="4321" />
                <answerCoding>
                    <code value="356" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_clavien_sub_4" />
            </options>
        </item>
        <item>
            <linkId value="4331" />
            <text value="Complicaties" />
            <type value="choice" />
            <enableWhen>
                <question value="4317" />
                <answerCoding>
                    <code value="1" />
                </answer>
            </enableWhen>
            <repeats value="true" />
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4331" />
            </options>
        </item>
        <item>
            <linkId value="4342" />
            <text value="Indien anders: Beschrijf" />
            <type value="text" />
            <enableWhen>
                <question value="4331" />
                <answerCoding>
                    <code value="6" />
                </answer>
            </enableWhen>
        </item>
        <item>
            <linkId value="4344" />
            <text value="Residu tumor op MRI? (Definitie: MRI 3-6 mnd na operatie)" />
            <type value="choice" />
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4344" />
            </options>
        </item>
        <item>
            <linkId value="4348" />
            <text value="Herstel hypersecretie na 6 maanden?" />
            <type value="choice" />
            <enableWhen>
                <question value="4188" />
                <answerCoding>
                    <code value="1" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4348" />
            </options>
        </item>
        <item>
            <linkId value="4353" />
            <text value="Bij Acromegalie, Postoperatief normalisatie IGF-I:" />
            <type value="choice" />
            <enableWhen>
                <question value="4191" />
                <answerCoding>
                    <code value="315" />
                </answer>
            </enableWhen>
            <enableWhen>
                <question value="4191" />
                <answerCoding>
                    <code value="318" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4353" />
            </options>
        </item>
        <item>
            <linkId value="4358" />
            <text value="Bij Acromegalie, Postoperatief normalisatie GTT:" />
            <type value="choice" />
            <enableWhen>
                <question value="4191" />
                <answerCoding>
                    <code value="315" />
                </answer>
            </enableWhen>
            <enableWhen>
                <question value="4191" />
                <answerCoding>
                    <code value="318" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4358" />
            </options>
        </item>
        <item>
            <linkId value="4362" />
            <text value="Bij Cushing, Postoperatief hydrocortison afhankelijk:" />
            <type value="choice" />
            <enableWhen>
                <question value="4191" />
                <answerCoding>
                    <code value="314" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonbonz" />
            </options>
        </item>
        <item>
            <linkId value="4367" />
            <text value="Bij Cushing, Postoperatief normalisatie dexamethasone suppressie test:" />
            <type value="choice" />
            <enableWhen>
                <question value="4191" />
                <answerCoding>
                    <code value="314" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonbonz" />
            </options>
        </item>
        <item>
            <linkId value="4372" />
            <text value="Bij Cushing, Postoperatief normalisatie 24 uursurine cortisol secretie:" />
            <type value="choice" />
            <enableWhen>
                <question value="4191" />
                <answerCoding>
                    <code value="314" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonbonz" />
            </options>
        </item>
        <item>
            <linkId value="4377" />
            <text value="Bij Prolactinoom, Postoperatief normalisatie prolactine:" />
            <type value="choice" />
            <enableWhen>
                <question value="4191" />
                <answerCoding>
                    <code value="316" />
                </answer>
            </enableWhen>
            <enableWhen>
                <question value="4191" />
                <answerCoding>
                    <code value="318" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonbonz" />
            </options>
        </item>
        <item>
            <linkId value="4382" />
            <text value="Herstel pre-operatief uitgevallen hypofysefunctie na 6 maanden?" />
            <type value="choice" />
            <enableWhen>
                <question value="4209" />
                <answerCoding>
                    <code value="1" />
                </answer>
            </enableWhen>
            <enableWhen>
                <question value="4209" />
                <answerCoding>
                    <code value="12" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4382" />
            </options>
        </item>
        <item>
            <linkId value="4387" />
            <text value="Herstel gezichtsvelddefect(en) na 3-6 maanden?" />
            <type value="choice" />
            <enableWhen>
                <question value="4241" />
                <answerCoding>
                    <code value="1" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_hypofyse_4387" />
            </options>
        </item>
        <item>
            <linkId value="4393" />
            <text value="Herstel visusdaling na 6 maanden?" />
            <type value="choice" />
            <enableWhen>
                <question value="4241" />
                <answerCoding>
                    <code value="1" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnnvt" />
            </options>
        </item>
        <item>
            <linkId value="4397" />
            <text value="Herstel hersenzenuw uitval na 6 maanden?" />
            <type value="choice" />
            <enableWhen>
                <question value="4275" />
                <answerCoding>
                    <code value="8" />
                </answer>
            </enableWhen>
            <enableWhen>
                <question value="4275" />
                <answerCoding>
                    <code value="1" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnnvt" />
            </options>
        </item>
        <item>
            <linkId value="4401" />
            <text value="Heeft patient postoperatieve adjuvante therapie gehad?" />
            <type value="choice" />
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
            </options>
        </item>
        <item>
            <linkId value="4404" />
            <text value="Medicamenteus?" />
            <type value="choice" />
            <enableWhen>
                <question value="4401" />
                <answerCoding>
                    <code value="1" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
            </options>
        </item>
        <item>
            <linkId value="4407" />
            <text value="Operatie? (definitie: operatie voor residu/recidief binnen 1 jaar na initiele operatie)" />
            <type value="choice" />
            <enableWhen>
                <question value="4401" />
                <answerCoding>
                    <code value="1" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
            </options>
        </item>
        <item>
            <linkId value="4410" />
            <text value="Bestraling?" />
            <type value="choice" />
            <enableWhen>
                <question value="4401" />
                <answerCoding>
                    <code value="1" />
                </answer>
            </enableWhen>
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jn" />
            </options>
        </item>
        <item>
            <linkId value="4413" />
            <text value="Is patiënt overleden (binnen 30 dagen na operatie)?" />
            <type value="choice" />
            <required value="true" />
            <options>
                <reference value="http://hl7.org/fhir/ValueSet/qrns_basis_jnonb" />
            </options>
        </item>
    </item>
</Questionnaire>

 

Below is an example of a (fictive) QuestionnaireResponse. The QuestionnaireResponse is validated against the Questionnaire.

<QuestionnaireResponse xmlns="http://hl7.org/fhir">
  <identifier>
    <value value="QRNS_ingevuld" />
  </identifier>
  <questionnaire>
    <reference value="Questionnaire/QRNS" />
  </questionnaire>
  <status value="completed" />
  <subject>
    <reference value="Patient/123" />
  </subject>
  <item>
    <linkId value="1" />
    <text value="Hypofyse" />
    <item>
      <linkId value="1.10" />
      <answer>
        <valueCoding>
          <code value="302" />
          <display value="II. Patiënt met een lichte aandoening, die geen invloed heeft op zijn dagelijks functioneren." />
        </valueCoding>
      </answer>
    </item>
    <item>
      <linkId value="1.20" />
      <answer>
        <ValueCoding>
          <code value="Y" />
          <system value="http://hl7.org/fhir/v2/0136" />
        </ValueCoding>
      </answer>
    </item>
    <item>
      <linkId value="1.30" />
      <answer>
        <valueCoding>
          <code value="306" />
          <display value="Amblyopie" />
        </valueCoding>
      </answer>
    </item>
  </item>
</QuestionnaireResponse>

Exercise


In this exercise you will create a Questionnaire instance and a QuestionnaireResponse profile. Start by reading the case description.

Here below are a couple of links that you may find useful during this exercise:

    Case description
    Hospital X wants to build a simple questionnaire that patients can upload and complete in their personal health environment. The questionnaire should contain the following questions:
  • What general score would you give the hospital on a scale from 1 to 10?
  • How likely is it that you recommend others to go to this hospital? (scale: not likely, maybe, not likely and not unlikely, likely, very likely)
  • In addition, they want to include some metadata from the Patient: birthdate and postal code.

Steps to follow

1. Create questionnaire

  1. Create a XML file to define your Questionnaire.
  2. Add (at least) the following elements: name, title, status, date and subjectType.
  3. Add each question using the item element. Include a unique linkId, text and type for each question.
  4. Add the answer options for the second question (either by using a ValueSet or listing all options).

2. Enable when

  1. Add a sub item ‘Please explain why you chose this score’ which allows free text and appears when the first question is answered.
  2. Add a sub item ‘What could we improve?’ which allows free text and appears when the answer to the second question is not ‘very likely’.
  3. Add a sub item ‘What should we keep doing?’ which allows free text and appears when the answer to the second question is not likely and not unlikely, likely or very likely.

3. Repeating and initial answers

Suppose you want to be able to repeat the whole set of questions for multiple hospital visits.

  1. Add an item ‘Date of hospital visit’.
  2. Make the other items nested items of this item.
  3. Enable repeating of this item.
  4. As the initial value of this item set the date of today.

4. Pre-population

  1. Add the metadata items to the questionnaire. Include at least a unique linkId and a type for each item.
  2. Use the definition element to reference to the correct data fields.

5. Profile QuestionnaireResponse

Although it is not best-practice, you want to create a profile to validate the responses to your questionnaire.

  1. Open Forge and create a new profile.
  2. Add a reference to your questionnaire as a fixed value.
  3. Only allow resources of type Patient to be subject of the questionnaire response.
  4. Restrict the data type of Author to Patient.
  5. Add all items according to the structure of your questionnaire. Add fixed values for linkId, definition and text where you need them.
  6. Constrain the data type of the answer.value[x] element of each item.
  7. What happens if you want to make changes to your questionnaire? Why do you want to avoid having to change your items in two places?

Feedback


We are always looking for ways to improve our products. The Profiling Academy was built using our own IG-editor in Simplifier. If you have any feedback on this module or on our Profiling Academy in general, please leave a comment in the Issue Tracker of the project.


Get in touch


Start profiling

Most modules end with an exercise. Use Forge to start profiling yourself. Just contact us at simplifier@fire.ly if you need any help.

Learn more

Follow one of our predefined or tailor-made courses. We will make sure you know FHIR inside-out.

Need help or advice?

Let us assist you with your FHIR use case. Visit our company website to know more about our services or get into contact with Rien Wertheim right away.