Search loading...

API Hub

Explore and Make use of Nationally Defined Messaging APIs

 

Questionnaire Implementation Guidance

Questionnaire resource implementation guidance

Questionnaire: Implementation Guidance

Usage

The Questionnaire resource is used to send one or more questions from the CDSS to the EMS. The EMS will present the question and the set of possible responses received from the CDSS to the user during an ongoing clinical evaluation process.

The responses to a Questionnaire sent by the CDSS are communicated back by the EMS using the QuestionnaireResponse resource.

A new Questionnaire resource is to be created each time any element of a Questionnaire is changed.

Detailed implementation guidance for a Questionnaire resource within the CDS API implementation guide is given below:

Name Cardinality Type FHIR Documentation CDS Implementation Guidance
id 0..1 id Logical id of this artifact Note that this will always be populated except when the resource is being created (initial creation call)
meta 0..1 Meta Metadata about the resource
implicitRules 0..1 uri A set of rules under which this content was created
language 0..1 code Language of the resource content.
Common Languages (Extensible but limited to All Languages)
text 0..1 Narrative Text summary of the resource, for human interpretation
contained 0..* Resource Contained, inline Resources This SHOULD NOT be populated
extension 0..* Extension Additional Content defined by implementations
modifierExtension 0..* Extension Extensions that cannot be ignored
url 0..1 uri Logical URI to reference this questionnaire (globally unique) This will be used to link a QuestionnaireResponse to the Questionnaire the response is for.
identifier 0..* Identifier Additional identifier for the questionnaire A business identifier that is used to identify the Questionnaire.
version 0..1 string Business version of the questionnaire
name 0..1 string Name for this questionnaire (computer friendly)
title 0..1 string Name for this questionnaire (human friendly)
status 1..1 code draft | active | retired | unknown PublicationStatus (Required). In live, this MUST carry the value 'active'.
experimental 0..1 boolean For testing purposes, not real usage This MUST carry the value 'false' in Live deployments.
date 0..1 dateTime Date this was last changed
publisher 0..1 string Name of the publisher (organization or individual)
description 0..1 markdown Natural language description of the questionnaire
purpose 0..1 markdown Why this questionnaire is defined
approvalDate 0..1 date When the questionnaire was approved by publisher
lastReviewDate 0..1 date When the questionnaire was last reviewed
effectivePeriod 0..1 Period When the questionnaire is expected to be used A null value for effectivePeriod.start means the start of time.
A null value for effectivePeriod.end means the end of time
useContext 0..* UsageContext Context the content is intended to support The contents of this element MUST match the useContext of the current ServiceDefinition. If the content of this element is NULL the Questionnaire can be used with ALL useContexts.
If the content of this element does not match the useContext of the current ServiceDefinition,the EMS MUST throw an error and MUST NOT proceed.
jurisdiction 0..* CodeableConcept Intended jurisdiction for service definition (if applicable) Jurisdiction ValueSet (Extensible) Extended valueset includes England, Scotland, Wales, Northern Ireland and Ireland.
The contents of this element MUST match the jurisdiction of the current ServiceDefinition.
If the content of this element is NULL the Questionnaire can be used in ALL jurisdictions.
If the content of this element does not match the jurisdiction of the current ServiceDefinition, the EMS MUST throw an error and MUST NOT proceed.
contact 0..* ContactDetail Contact details for the publisher
copyright 0..1 markdown Use and/or publishing restrictions
code 0..* Coding Concept that represents the overall questionnaire Questionnaire Question Codes (Example) This MUST NOT be populated.
subjectType 0..* code Resource that can be subject of QuestionnaireResponse ResourceType (Required) This MUST be populated with 'Patient'.
item 0..* BackboneElement Questions and sections within the questionnaire
extension (supportlink) 0..* uri A URL that resolves to additional supporting information or guidance related to the question. Information or documents to support the Questionnaire e.g. images for image map questions.
extension (rendering-markdown) 0..1 markdown This is an equivalent of the string on which the extension is sent, but includes additional markdown. Used for question formatting and links to other pages/sites.
linkId 1..1 string Unique id for item in questionnaire This MUST be populated with an identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.
definition 0..1 uri ElementDefinition - details for the item This MUST NOT be populated by the CDSS.
code 0..* Coding Corresponding concept for this item in a terminology Questionnaire Question Codes (Example) This MUST NOT be populated by the CDSS.
prefix 0..1 string E.g. "1(a)", "2.5.3" A short label for a particular group, question or set of display text which is part of the Questionnaire. This could be used as a reference by the individual completing it.
text 0..1 string Primary text for the item This could be the name of a section, the text of a question or text content for a display item.
type 1..1 code group | display | boolean | decimal | integer | date | dateTime + QuestionnaireItemType (Required) The type of questionnaire item this is. If this is set to 'group', the EMS User interface MUST present all sub-items together to the user, with the group item description as the header.
enableWhen 0..* BackboneElement Only allow data when
question 1..1 string Question that determines whether item is enabled This is populated with the item.linkid of the question which determines whether or not this item is enabled
hasAnswer 0..1 boolean Enable when answered or not
answer[x] 0..1 boolean | decimal |
integer | date |
dateTime | time |
string | uri |
Attachment |
Coding |
Quantity | Reference(Any)
Value question MUST have Questionnaire Answer Codes (Example)
required 0..1 boolean Whether the item must be included in data results If this element is true, then the EMS User interface MUST ensure the user provides an answer. If false, the User interface MUST allow the user to skip the question.
repeats 0..1 boolean Whether the item may repeat If this option is false, then the EMS User interface MUST only allow a single response to be selected. If the option is true, then multiple responses can be selected.
readOnly 0..1 boolean Don't allow human editing If this option is false, the EMS User interface will present the data as read only.
maxLength 0..1 integer No more than this many characters
options 0..1 Reference(ValueSet) Valueset containing permitted answers This MUST NOT be populated by the CDSS.
option 0..* BackboneElement Permitted answer Where the question has multiple options, only one of which SHOULD be selected, these options can be enumerated in this element.
value[x] 1..1 integer | date |
time | string |
Coding
Answer value
Value question MUST have Questionnaire Answer Codes (Example)
initial[x] 0..1 boolean | decimal |
integer | date |
dateTime | time |
string | uri |
Attachment |
Coding |
Quantity | Reference(Any)
Default value when item is first rendered
Questionnaire Answer Codes (Example)
This MUST NOT be populated by the CDSS.
item 0..* BackboneElement Nested questionnaire items

Example Scenario

Question with Yes, No, Don’t know answer options

The following answer options are based on the ‘yesnodontknow’ value set.

<Questionnaire xmlns="http://hl7.org/fhir">
    <id value="palpitations2.hasPalpitations"></id>
    <url value="Questionnaire/palpitations2.hasPalpitations"></url>
    <name value="palpitations2.hasPalpitations"></name>
    <status value="active"></status>
    <experimental value="false"></experimental>
    <jurisdiction>
        <coding>
            <system value="urn:iso:std:iso:3166"></system>
            <code value="GB"></code>
            <display value="United Kingdom of Great Britain and Northern Ireland (the)"></display>
        </coding>
        <text value="United Kingdom of Great Britain and Northern Ireland (the)"></text>
    </jurisdiction>
    <subjectType value="Patient"></subjectType>
    <item>
        <linkId value="q"></linkId>
        <text value="Are you experiencing palpitations now?"></text>
        <type value="choice"></type>
        <required value="true"></required>
        <repeats value="false"></repeats>
        <readOnly value="false"></readOnly>
        <option>
            <valueCoding>
                <system value="http://hl7.org/fhir/v2/0136"></system>
                <code value="Y"></code>
                <display value="Yes"></display>
            </valueCoding>
        </option>
        <option>
            <valueCoding>
                <system value="http://hl7.org/fhir/v2/0136"></system>
                <code value="N"></code>
                <display value="No"></display>
            </valueCoding>
        </option>
        <option>
            <valueCoding>
                <system value="http://hl7.org/fhir/data-absent-reason"></system>
                <code value="asked"></code>
                <display value="Don't know"></display>
            </valueCoding>
        </option>
    </item>
</Questionnaire>
Tags: rest fhir api

All content is available under the Open Government Licence v3.0, except where otherwise stated