This
page
is
part
of
the
FHIR
Specification
(v4.0.1:
R4
-
Mixed
Normative
and
STU
v6.0.0-ballot4:
Release
6
Ballot
(1st
Full
Ballot)
(see
Ballot
Notes
)
in
it's
permanent
home
(it
will
always
be
available
at
this
URL).
).
The
current
version
which
supercedes
this
version
is
5.0.0
.
For
a
full
list
of
available
versions,
see
the
Directory
of
published
versions
for
published
versions
.
Page
versions:
R5
R4B
R4
R3
R2
Responsible
Owner:
FHIR
Infrastructure
Work
Group
|
|
Security Category : Patient | Compartments : Device , Encounter , Patient , Practitioner , RelatedPerson |
A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.
QuestionnaireResponse provides a complete or partial list of answers to a set of questions filled when responding to a questionnaire. The questions may be included directly or by reference to a Questionnaire resource that defines the questions as well as the constraints on the allowed answers. In some cases, both formal rules for editing the questionnaire (via link to Questionnaire ) as well as sufficient local information to allow rendering of the questionnaire may be provided.
Each time a questionnaire is completed for a different subject or at a different time, a distinct QuestionnaireResponse is generated, though it may be possible for a previously entered set of answers to be edited or updated.
Questionnaire responses cover the need to communicate data originating from forms used in medical history examinations, research questionnaires and sometimes full clinical specialty records. In many systems this data is collected using user-defined screens and forms. Questionnaire responses record specifics about data capture - exactly what questions were asked, in what order, what answers were given, etc. Each of these questions is part of the Questionnaire, and as such the Questionnaire is a separately identifiable Resource, whereas the individual questions are not.
Examples of Questionnaires include:
QuestionnaireResponse resources can be validated against their corresponding Questionnaire to verify that required groups and questions are answered and that answers fit constraints in terms of cardinality, data type, etc.
The QuestionnaireResponse resource captures the responses to a questionnaire, while Questionnaire represents the definition of the questionnaire form, including what questions are asked, how they're organized and the constraints on the allowed answers.
While
Observation
,
with
its
nested
structure,
can
create
complex
hierarchies
of
questions
and
answers,
the
focus
is
different.
First,
Observation
is
used
primarily
for
capturing
data
elements
that
are
"true"
observations
-
lab
measurements,
vital
signs,
social
assessments,
etc.,
while
QuestionnaireResponse
can
be
used
to
capture
any
types
of
data,
including
data
that
would
typically
map
to
other
resources
(
Procedure
,
Patient
,
MedicationStatement
,
etc.).
Second,
the
focus
of
QuestionnaireResponse
includes
the
specific
phrasing
and
organization
of
the
questions.
All
data
must
be
explicitly
captured
as
a
question.
With
Observation
,
the
focus
is
only
on
the
meaning
of
the
answer,
not
what
question
was
asked
(assuming
a
question
was
even
asked
at
all).
Additional
information
such
as
normal
ranges,
interpretation,
date,
etc.,
may
also
be
captured.
relatedObservation
component
Structure
| Name | Flags | Card. | Type |
Description
&
Constraints
Filter:
|
|---|---|---|---|---|
|
|
DomainResource |
A
structured
set
of
questions
and
their
answers
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension |
|
|
Σ | 0..* | Identifier |
Business
identifier
for
this
set
of
answers
|
|
Σ | 0..* | Reference ( CarePlan | ServiceRequest ) |
Request
fulfilled
by
this
QuestionnaireResponse
|
|
Σ | 0..* | Reference ( Observation | Procedure ) |
Part
of
|
|
Σ | 1..1 | canonical ( Questionnaire ) |
Canonical
URL
of
Questionnaire
being
answered
|
|
?! Σ | 1..1 | code |
in-progress
|
completed
|
amended
|
entered-in-error
|
stopped
|
|
Σ | 0..1 | Reference ( Any ) |
The
subject
of
the
questions
|
|
Σ | 0..1 | Reference ( Encounter ) |
Encounter
|
|
Σ | 0..1 | dateTime |
Date
the
answers
were
gathered
|
|
Σ | 0..1 | Reference ( Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization | Group ) |
The
individual
or
device
that
received
and
recorded
the
answers
|
|
Σ | 0..1 | Reference ( Device | Organization | Patient | Practitioner | PractitionerRole | RelatedPerson ) |
The
|
|
|
0..* | BackboneElement |
Groups
and
questions
+ Rule: + Rule: Repeated answers are combined in the answers array of a single item |
|
C | 1..1 | string |
Pointer
to
specific
item
from
Questionnaire
+ Rule: LinkId cannot have leading or trailing spaces or intevening whitespace other than single space characters |
|
0..* | uri |
ElementDefinition
-
details
for
the
item
|
|
|
0..1 | string |
Name
for
group
or
question
text
|
|
|
C | 0..* | BackboneElement |
The
response(s)
to
the
question
|
|
C | 1..1 |
Single-valued
answer
to
the
question
Binding: Questionnaire Answer Codes ( Example ) |
|
|
boolean | |||
|
decimal | |||
|
integer | |||
|
date | |||
|
dateTime | |||
|
time | |||
|
string | |||
|
uri | |||
|
Attachment | |||
|
Coding | |||
|
|
|||
|
Reference ( Any ) | |||
|
0..* | see item |
Child
items
of
question
|
|
|
0..* | see item |
Child
items
of
group
item
|
|
Documentation
for
this
format
|
||||
See the Extensions for this resource
UML Diagram ( Legend )
XML Template
<QuestionnaireResponse xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension -->
<</identifier> <</basedOn> <</partOf> <</questionnaire> <<identifier><!-- 0..* Identifier Business identifier for this set of answers --></identifier> <basedOn><!-- 0..* Reference(CarePlan|ServiceRequest) Request fulfilled by this QuestionnaireResponse --></basedOn> <partOf><!-- 0..* Reference(Observation|Procedure) Part of referenced event --></partOf> <questionnaire><!-- 1..1 canonical(Questionnaire) Canonical URL of Questionnaire being answered --></questionnaire> <status value="[code]"/><!-- 1..1 in-progress | completed | amended | entered-in-error | stopped --> <subject><!-- 0..1 Reference(Any) The subject of the questions --></subject><</encounter> < <| </author> <</source><encounter><!-- 0..1 Reference(Encounter) Encounter the questionnaire response is part of --></encounter> <authored value="[dateTime]"/><!-- 0..1 Date the answers were gathered --> <author><!-- 0..1 Reference(Device|Group|Organization|Patient|Practitioner| PractitionerRole|RelatedPerson) The individual or device that received and recorded the answers --></author> <source><!-- 0..1 Reference(Device|Organization|Patient|Practitioner| PractitionerRole|RelatedPerson) The individual or device that answered the questions --></source> <item> <!-- 0..* Groups and questions -->< <<linkId value="[string]"/><!-- I 1..1 Pointer to specific item from Questionnaire --> <definition value="[uri]"/><!-- 0..* ElementDefinition - details for the item --> <text value="[string]"/><!-- 0..1 Name for group or question text -->< <| </value[x]> <</item><answer> <!-- I 0..* The response(s) to the question --> <value[x]><!-- I 1..1 boolean|decimal|integer|date|dateTime|time|string|uri| Attachment|Coding|Quantity(SimpleQuantity)|Reference(Any) Single-valued answer to the question --></value[x]> <item><!-- 0..* Content as for QuestionnaireResponse.item Child items of question --></item> </answer><</item><item><!-- 0..* Content as for QuestionnaireResponse.item Child items of group item --></item> </item> </QuestionnaireResponse>
JSON Template
{
"resourceType" : "QuestionnaireResponse",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"
"
"
"
"
"identifier" : [{ Identifier }], // Business identifier for this set of answers
"basedOn" : [{ Reference(CarePlan|ServiceRequest) }], // Request fulfilled by this QuestionnaireResponse
"partOf" : [{ Reference(Observation|Procedure) }], // Part of referenced event
"questionnaire" : "<canonical(Questionnaire)>", // R! Canonical URL of Questionnaire being answered
"status" : "<code>", // R! in-progress | completed | amended | entered-in-error | stopped
"subject" : { Reference(Any) }, // The subject of the questions
"
"
"|
"
"encounter" : { Reference(Encounter) }, // Encounter the questionnaire response is part of
"authored" : "<dateTime>", // Date the answers were gathered
"author" : { Reference(Device|Group|Organization|Patient|Practitioner|
PractitionerRole|RelatedPerson) }, // The individual or device that received and recorded the answers
"source" : { Reference(Device|Organization|Patient|Practitioner|
PractitionerRole|RelatedPerson) }, // The individual or device that answered the questions
"item" : [{ // Groups and questions
"
"
"linkId" : "<string>", // I R! Pointer to specific item from Questionnaire
"definition" : ["<uri>"], // ElementDefinition - details for the item
"text" : "<string>", // Name for group or question text
"
"answer" : [{ // I The response(s) to the question
// value[x]: Single-valued answer to the question. One of these 12:
"valueBoolean" : <boolean>,
"valueDecimal" : <decimal>,
"valueInteger" : <integer>,
"valueDate" : "<date>",
"valueDateTime" : "<dateTime>",
"valueTime" : "<time>",
"valueString" : "<string>",
"valueUri" : "<uri>",
"valueAttachment" : { Attachment },
"valueCoding" : { Coding },
" },
"valueQuantity" : { Quantity(SimpleQuantity) },
"valueReference" : { Reference(Any) },
"
"item" : [{ Content as for QuestionnaireResponse.item }] // Child items of question
}],
"
"item" : [{ Content as for QuestionnaireResponse.item }] // Child items of group item
}]
}
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .[ a fhir:QuestionnaireResponse; fhir:nodeRole fhir:treeRoot; # if this is the parser root
# from # from fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: # . One of these 12 fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir:) ] fhir: ], ...; fhir: ], ...;# from Resource: fhir:id, fhir:meta, fhir:implicitRules, and fhir:language # from DomainResource: fhir:text, fhir:contained, fhir:extension, and fhir:modifierExtension fhir:identifier ( [ Identifier ] ... ) ; # 0..* Business identifier for this set of answers fhir:basedOn ( [ Reference(CarePlan|ServiceRequest) ] ... ) ; # 0..* Request fulfilled by this QuestionnaireResponse fhir:partOf ( [ Reference(Observation|Procedure) ] ... ) ; # 0..* Part of referenced event fhir:questionnaire [ canonical(Questionnaire) ] ; # 1..1 Canonical URL of Questionnaire being answered fhir:status [ code ] ; # 1..1 in-progress | completed | amended | entered-in-error | stopped fhir:subject [ Reference(Any) ] ; # 0..1 The subject of the questions fhir:encounter [ Reference(Encounter) ] ; # 0..1 Encounter the questionnaire response is part of fhir:authored [ dateTime ] ; # 0..1 Date the answers were gathered fhir:author [ Reference(Device|Group|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 The individual or device that received and recorded the answers fhir:source [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 The individual or device that answered the questions fhir:item ( [ # 0..* Groups and questions fhir:linkId [ string ] ; # 1..1 I Pointer to specific item from Questionnaire fhir:definition ( [ uri ] ... ) ; # 0..* ElementDefinition - details for the item fhir:text [ string ] ; # 0..1 Name for group or question text fhir:answer ( [ # 0..* I The response(s) to the question # value[x] : 1..1 I Single-valued answer to the question. One of these 12 fhir:value [ a fhir:Boolean ; boolean ] fhir:value [ a fhir:Decimal ; decimal ] fhir:value [ a fhir:Integer ; integer ] fhir:value [ a fhir:Date ; date ] fhir:value [ a fhir:DateTime ; dateTime ] fhir:value [ a fhir:Time ; time ] fhir:value [ a fhir:String ; string ] fhir:value [ a fhir:Uri ; uri ] fhir:value [ a fhir:Attachment ; Attachment ] fhir:value [ a fhir:Coding ; Coding ] fhir:value [ a fhir:SimpleQuantity ; Quantity(SimpleQuantity) ] fhir:value [ a fhir:Reference ; Reference(Any) ] fhir:item ( [ See QuestionnaireResponse.item ] ... ) ; # 0..* Child items of question ] ... ) ; fhir:item ( [ See QuestionnaireResponse.item ] ... ) ; # 0..* Child items of group item ] ... ) ; ]
Changes
since
R3
from
R5
to
R6
| QuestionnaireResponse | |
|
|
|
|
|
|
Changes from R4 and R4B to R6
|
|
|
|
|
|
|
|
|
| QuestionnaireResponse.author |
|
| QuestionnaireResponse.source |
|
|
|
|
|
|
|
See the Full Difference for further information
This
analysis
is
available
for
R4
as
XML
or
JSON
.
See
R3
<-->
R4
Conversion
Maps
(status
=
5
tests
that
all
execute
ok.
1
fail
round-trip
testing
and
5
r3
resources
are
invalid
(0
errors).
)
for
R4B
as
XML
or
JSON
.
Structure
| Name | Flags | Card. | Type |
Description
&
Constraints
Filter:
|
|---|---|---|---|---|
|
|
DomainResource |
A
structured
set
of
questions
and
their
answers
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension |
|
|
Σ | 0..* | Identifier |
Business
identifier
for
this
set
of
answers
|
|
Σ | 0..* | Reference ( CarePlan | ServiceRequest ) |
Request
fulfilled
by
this
QuestionnaireResponse
|
|
Σ | 0..* | Reference ( Observation | Procedure ) |
Part
of
|
|
Σ | 1..1 | canonical ( Questionnaire ) |
Canonical
URL
of
Questionnaire
being
answered
|
|
?! Σ | 1..1 | code |
in-progress
|
completed
|
amended
|
entered-in-error
|
stopped
|
|
Σ | 0..1 | Reference ( Any ) |
The
subject
of
the
questions
|
|
Σ | 0..1 | Reference ( Encounter ) |
Encounter
|
|
Σ | 0..1 | dateTime |
Date
the
answers
were
gathered
|
|
Σ | 0..1 | Reference ( Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization | Group ) |
The
individual
or
device
that
received
and
recorded
the
answers
|
|
Σ | 0..1 | Reference ( Device | Organization | Patient | Practitioner | PractitionerRole | RelatedPerson ) |
The
|
|
|
0..* | BackboneElement |
Groups
and
questions
+ Rule: + Rule: Repeated answers are combined in the answers array of a single item |
|
C | 1..1 | string |
Pointer
to
specific
item
from
Questionnaire
+ Rule: LinkId cannot have leading or trailing spaces or intevening whitespace other than single space characters |
|
0..* | uri |
ElementDefinition
-
details
for
the
item
|
|
|
0..1 | string |
Name
for
group
or
question
text
|
|
|
C | 0..* | BackboneElement |
The
response(s)
to
the
question
|
|
C | 1..1 |
Single-valued
answer
to
the
question
Binding: Questionnaire Answer Codes ( Example ) |
|
|
boolean | |||
|
decimal | |||
|
integer | |||
|
date | |||
|
dateTime | |||
|
time | |||
|
string | |||
|
uri | |||
|
Attachment | |||
|
Coding | |||
|
|
|||
|
Reference ( Any ) | |||
|
0..* | see item |
Child
items
of
question
|
|
|
0..* | see item |
Child
items
of
group
item
|
|
Documentation
for
this
format
|
||||
See the Extensions for this resource
XML Template
<QuestionnaireResponse xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension -->
<</identifier> <</basedOn> <</partOf> <</questionnaire> <<identifier><!-- 0..* Identifier Business identifier for this set of answers --></identifier> <basedOn><!-- 0..* Reference(CarePlan|ServiceRequest) Request fulfilled by this QuestionnaireResponse --></basedOn> <partOf><!-- 0..* Reference(Observation|Procedure) Part of referenced event --></partOf> <questionnaire><!-- 1..1 canonical(Questionnaire) Canonical URL of Questionnaire being answered --></questionnaire> <status value="[code]"/><!-- 1..1 in-progress | completed | amended | entered-in-error | stopped --> <subject><!-- 0..1 Reference(Any) The subject of the questions --></subject><</encounter> < <| </author> <</source><encounter><!-- 0..1 Reference(Encounter) Encounter the questionnaire response is part of --></encounter> <authored value="[dateTime]"/><!-- 0..1 Date the answers were gathered --> <author><!-- 0..1 Reference(Device|Group|Organization|Patient|Practitioner| PractitionerRole|RelatedPerson) The individual or device that received and recorded the answers --></author> <source><!-- 0..1 Reference(Device|Organization|Patient|Practitioner| PractitionerRole|RelatedPerson) The individual or device that answered the questions --></source> <item> <!-- 0..* Groups and questions -->< <<linkId value="[string]"/><!-- I 1..1 Pointer to specific item from Questionnaire --> <definition value="[uri]"/><!-- 0..* ElementDefinition - details for the item --> <text value="[string]"/><!-- 0..1 Name for group or question text -->< <| </value[x]> <</item><answer> <!-- I 0..* The response(s) to the question --> <value[x]><!-- I 1..1 boolean|decimal|integer|date|dateTime|time|string|uri| Attachment|Coding|Quantity(SimpleQuantity)|Reference(Any) Single-valued answer to the question --></value[x]> <item><!-- 0..* Content as for QuestionnaireResponse.item Child items of question --></item> </answer><</item><item><!-- 0..* Content as for QuestionnaireResponse.item Child items of group item --></item> </item> </QuestionnaireResponse>
JSON Template
{
"resourceType" : "QuestionnaireResponse",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"
"
"
"
"
"identifier" : [{ Identifier }], // Business identifier for this set of answers
"basedOn" : [{ Reference(CarePlan|ServiceRequest) }], // Request fulfilled by this QuestionnaireResponse
"partOf" : [{ Reference(Observation|Procedure) }], // Part of referenced event
"questionnaire" : "<canonical(Questionnaire)>", // R! Canonical URL of Questionnaire being answered
"status" : "<code>", // R! in-progress | completed | amended | entered-in-error | stopped
"subject" : { Reference(Any) }, // The subject of the questions
"
"
"|
"
"encounter" : { Reference(Encounter) }, // Encounter the questionnaire response is part of
"authored" : "<dateTime>", // Date the answers were gathered
"author" : { Reference(Device|Group|Organization|Patient|Practitioner|
PractitionerRole|RelatedPerson) }, // The individual or device that received and recorded the answers
"source" : { Reference(Device|Organization|Patient|Practitioner|
PractitionerRole|RelatedPerson) }, // The individual or device that answered the questions
"item" : [{ // Groups and questions
"
"
"linkId" : "<string>", // I R! Pointer to specific item from Questionnaire
"definition" : ["<uri>"], // ElementDefinition - details for the item
"text" : "<string>", // Name for group or question text
"
"answer" : [{ // I The response(s) to the question
// value[x]: Single-valued answer to the question. One of these 12:
"valueBoolean" : <boolean>,
"valueDecimal" : <decimal>,
"valueInteger" : <integer>,
"valueDate" : "<date>",
"valueDateTime" : "<dateTime>",
"valueTime" : "<time>",
"valueString" : "<string>",
"valueUri" : "<uri>",
"valueAttachment" : { Attachment },
"valueCoding" : { Coding },
" },
"valueQuantity" : { Quantity(SimpleQuantity) },
"valueReference" : { Reference(Any) },
"
"item" : [{ Content as for QuestionnaireResponse.item }] // Child items of question
}],
"
"item" : [{ Content as for QuestionnaireResponse.item }] // Child items of group item
}]
}
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .[ a fhir:QuestionnaireResponse; fhir:nodeRole fhir:treeRoot; # if this is the parser root
# from # from fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: # . One of these 12 fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir:) ] fhir: ], ...; fhir: ], ...;# from Resource: fhir:id, fhir:meta, fhir:implicitRules, and fhir:language # from DomainResource: fhir:text, fhir:contained, fhir:extension, and fhir:modifierExtension fhir:identifier ( [ Identifier ] ... ) ; # 0..* Business identifier for this set of answers fhir:basedOn ( [ Reference(CarePlan|ServiceRequest) ] ... ) ; # 0..* Request fulfilled by this QuestionnaireResponse fhir:partOf ( [ Reference(Observation|Procedure) ] ... ) ; # 0..* Part of referenced event fhir:questionnaire [ canonical(Questionnaire) ] ; # 1..1 Canonical URL of Questionnaire being answered fhir:status [ code ] ; # 1..1 in-progress | completed | amended | entered-in-error | stopped fhir:subject [ Reference(Any) ] ; # 0..1 The subject of the questions fhir:encounter [ Reference(Encounter) ] ; # 0..1 Encounter the questionnaire response is part of fhir:authored [ dateTime ] ; # 0..1 Date the answers were gathered fhir:author [ Reference(Device|Group|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 The individual or device that received and recorded the answers fhir:source [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 The individual or device that answered the questions fhir:item ( [ # 0..* Groups and questions fhir:linkId [ string ] ; # 1..1 I Pointer to specific item from Questionnaire fhir:definition ( [ uri ] ... ) ; # 0..* ElementDefinition - details for the item fhir:text [ string ] ; # 0..1 Name for group or question text fhir:answer ( [ # 0..* I The response(s) to the question # value[x] : 1..1 I Single-valued answer to the question. One of these 12 fhir:value [ a fhir:Boolean ; boolean ] fhir:value [ a fhir:Decimal ; decimal ] fhir:value [ a fhir:Integer ; integer ] fhir:value [ a fhir:Date ; date ] fhir:value [ a fhir:DateTime ; dateTime ] fhir:value [ a fhir:Time ; time ] fhir:value [ a fhir:String ; string ] fhir:value [ a fhir:Uri ; uri ] fhir:value [ a fhir:Attachment ; Attachment ] fhir:value [ a fhir:Coding ; Coding ] fhir:value [ a fhir:SimpleQuantity ; Quantity(SimpleQuantity) ] fhir:value [ a fhir:Reference ; Reference(Any) ] fhir:item ( [ See QuestionnaireResponse.item ] ... ) ; # 0..* Child items of question ] ... ) ; fhir:item ( [ See QuestionnaireResponse.item ] ... ) ; # 0..* Child items of group item ] ... ) ; ]
Changes
since
Release
3
from
R5
to
R6
| QuestionnaireResponse | |
|
|
|
|
|
|
Changes from R4 and R4B to R6
|
|
|
|
|
|
|
|
|
| QuestionnaireResponse.author |
|
| QuestionnaireResponse.source |
|
|
|
|
|
|
|
See the Full Difference for further information
This
analysis
is
available
for
R4
as
XML
or
JSON
.
See
R3
<-->
R4
Conversion
Maps
(status
=
5
tests
that
all
execute
ok.
1
fail
round-trip
testing
and
5
r3
resources
are
invalid
(0
errors).
)
for
R4B
as
XML
or
JSON
.
See
the
Profiles
&
Extensions
and
the
alternate
Additional
definitions:
Master
Definition
XML
+
JSON
,
XML
Schema
/
Schematron
+
JSON
Schema
,
ShEx
(for
Turtle
)
+
see
the
extensions
,
the
spreadsheet
version
&
the
dependency
analysis
| Path |
|
Type |
|
|---|---|---|---|
| QuestionnaireResponse.status |
|
Required |
Lifecycle status of the questionnaire response. |
| QuestionnaireResponse.item.answer.value[x] |
)
|
Example |
Example list of codes for answers to questions. (Not complete or necessarily appropriate.) |
|
|
Level | Location | Description | Expression |
qrs-1
|
Rule | QuestionnaireResponse.item |
|
(answer.exists() and item.exists()).not() |
qrs-2
| Rule | QuestionnaireResponse.item | Repeated answers are combined in the answers array of a single item | repeat(answer|item).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue() |
qrs-3
| Rule | QuestionnaireResponse.item.linkId | LinkId cannot have leading or trailing spaces or intevening whitespace other than single space characters | $this.matches('[^\\s]+( [^\\s]+)*') |
,
CDA
Documents
frequently
used
named
sections
with
Observations
to
model
questionnaires.
Such
use
cases
should
now
utilize
the
QuestionnaireResponse
resource
instead.
Refer to additional guidance provided in the Questionnaire resource dealing with the design of questionnaires.
A
QuestionnaireResponse
may
be
stand-alone
or
may
point
to
the
definition
of
the
questions
in
Questionnaire
.
If
the
QuestionnaireResponse
refers
to
a
Questionnaire:
linkId
element
display
.
The diagram above shows a Questionnaire with a hierarchy of group and question items, some marked as 'repeats'=true, and others false and with similar variation in 'required'=true and false. It also shows a hypothetical QuestionnaireResponse that is valid against that questionnaire with appropriate nesting of items and answers and linkIds showing the alignment between the Questionnaire and QuestionnaireResponse items.
Rules
imposed
by
a
Questionnaire
about
expectations
for
answers
are
not
expected
to
be
met
until
a
Questionnaire
is
deemed
to
be
'completed'
(or
'amended').
For
example,
items
that
are
marked
as
'required'
may
be
omitted,
minimum
numbers
of
answers
might
not
be
met,
length
requirement
for
answers,
co-occurrence
constraints,
etc.
might
all
be
violated
when
the
QuestionnaireResponse
is
still
in
the
process
of
being
completed.
QuestionnaireResponses
may
be
stored
in
this
'incomplete'
state.
Such
QuestionnaireResponses
might
also
include
data
for
disabled
questions,
entries
and
text
for
non-answered
questions,
etc.
However,
once
a
QuestionnaireResponse
is
marked
as
'completed'
(including
if
it
is
subsequently
changed
to
'amended'),
all
requirements
of
the
associated
Questionnaire
was
answered,
though
must
be
met,
all
non-answered
question
items
must
be
removed,
all
non-enabled
items
must
be
removed,
etc.
(Display
items
MAY
be
retained.
Certain
extensions
on
the
Questionnaire
item
may
mandate
that
a
display
item
needed
for
a
human
reviewer
to
interpret
the
QuestionnaireResponse
be
retained
in
a
completed
QuestionnaireResponse.)
QuestioinnaireResponse
has
two
different
mechanisms
to
support
nesting
of
course
these
items
-
item.item
and
item.answer.item
.
The
former
is
used
when
nesting
items
within
a
'group'
and
the
latter
is
always
used
when
nesting
items
within
a
question.
This
is
because
items
nested
within
a
question
always
nest
within
each
answer
to
the
question.
If
the
question
allows
multiple
answers,
each
will
not
have
answers
its
own
set
of
nested
items.
QuestionnaireResponse resources can have answers with values of type Attachment. These attachments will typically be selected by the user answering the questionnaire and this selection may be done in an uncontrolled environment. Systems should ensure that the attachment is of the desired type and should take precautions before rendering or executing any attached content.
For most resources, the type of information that can be conveyed in the resource is determined by the resource, and the key attributes that determine the sensitivity level of the information are also known; e.g., drug, observation type, clinical trial randomization status, etc. However, for QuestionnaireResponse, the sensitivity of an instance is dependent on what type of Questionnaire it is associated with. And the data elements that determine that sensitivity could be the answers to any of the questions. This makes automatically enforcing access control rules more challenging. Designers should take these challenges into account and may need to place stricter access controls around QuestionnaireResponse to ensure that access to information is not granted improperly.
Until recently, there were no 'standard' SearchParameters defined to allow searching QuestionnaireResponse based on the answers within the response. A set of parameters have now been added. However, implementers using them should pay close attention to the following guidance:
information
from
completed
QuestionnaireResponses
into
other
FHIR
resources
that
are
more
standardized
and
can
be
better
understood
and
searched
for
across
organizations.
It is possible to profile QuestionnaireResponse in the same way as any other resource. However, such profiling should not be used to constrain QuestionnaireResponse to only be able to capture the answers associated with a single type of form - that is what the Questionnaire resource is for. Profiling QuestionnaireResponse is appropriate when there's a need to enforce that certain metadata is always present, to indicate limitations on what types of answers can be handled, etc. - independent of what Questionnaire is being completed.
When working with QuestionnaireResponses, there may be FHIRPath expressions defined on the associated Questionnaire that will be evaluated in the context of the QuestionnaireResponse. The following additional guidance applies to using FHIRPath with QuestionnaireResponses:
%resource
variable
when
it
appears
in
expressions
on
elements
in
Questionnaire
will
be
evaluated
as
the
root
of
the
QuestionnaireResponse.
%context
variable
will
be
set
to
the
QuestionnaireResponse
if
the
expression
extension
is
defined
on
the
Questionnaire
root.
Otherwise,
it
will
be
interpreted
as
the
QuestionnaireResponse.item(s)
whose
linkId
matches
the
linkId
of
the
Questionnaire.item
the
expression
extension
was
defined
in.
I.e.
while
the
extensions
and
expressions
are
defined
in
the
Questionnaire,
they
are
evaluated
in
the
context
of
the
corresponding
item(s)
in
the
QuestionnaireResponse.
.
For
example,
a
variable
with
the
name
'score'
could
be
accessed
in
FHIRPath
or
CQL
using
%score.
In addition, a couple of additional variables are defined for use with extensions evaluated in the context of a QuestionnaireResponse:
%questionnaire
corresponds
to
the
Questionnaire
resource
resolved
to
by
the
QuestionnaireResponse.questionnaire
element.
It
is
in
scope
for
all
expressions
defined
in
the
Questionnaire.
%qitem
is
defined
as
a
shortcut
to
get
to
the
Questionnaire.item
that
corresponds
to
the
context
QuestionnaireResponse.item
(based
on
matching
linkId).
It
is
only
valid
for
FHIRPath
expressions
defined
within
a
Questionnaire
item.
Search parameters for this resource. See also the full list of search parameters for this resource , and check the Extensions registry for search parameters on extensions related to this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
| Name | Type | Description | Expression | In Common |
| answer-concept |
token
|
Question answers of type coding or boolean found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. | QuestionnaireResponse.repeat(item.combine(item.answer.item)).answer.value.ofType(boolean) | QuestionnaireResponse.repeat(item.combine(item.answer.item)).answer.value.ofType(Coding) | |
| answer-date | date | Question answers of type date or dateTime found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. | QuestionnaireResponse.repeat(item.combine(item.answer.item)).answer.value.ofType(date) | QuestionnaireResponse.repeat(item.combine(item.answer.item)).answer.value.ofType(dateTime) | |
| answer-number | number | Question answers of type integer or decimal found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. | QuestionnaireResponse.repeat(item.combine(item.answer.item)).answer.value.ofType(integer) | QuestionnaireResponse.repeat(item.combine(item.answer.item)).answer.value.ofType(decimal) | |
| answer-quantity | quantity | Question answers of type quantity found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. | QuestionnaireResponse.repeat(item.combine(item.answer.item)).answer.value.ofType(Quantity) | |
| answer-reference | reference | Question answers of type reference found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. |
QuestionnaireResponse.repeat(item.combine(item.answer.item)).answer.value.ofType(Reference)
(Any) | |
| answer-string | string | Question answers of type string found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. | QuestionnaireResponse.repeat(item.combine(item.answer.item)).answer.value.ofType(string) | |
| author | reference | The author of the questionnaire response |
QuestionnaireResponse.author
( Practitioner , Group , Organization , Device , Patient , PractitionerRole , RelatedPerson ) |
|
| authored | date | When the questionnaire response was last changed | QuestionnaireResponse.authored | |
| based-on | reference | Plan/proposal/order fulfilled by this questionnaire response |
QuestionnaireResponse.basedOn
( CarePlan , ServiceRequest ) |
|
| encounter | reference | Encounter associated with the questionnaire response |
QuestionnaireResponse.encounter
( Encounter ) |
26 Resources |
| identifier | token | The unique identifier for the questionnaire response | QuestionnaireResponse.identifier | 58 Resources |
| item-concept | composite | Question with items having the specified linkId and answers of type boolean or coding found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. |
On
QuestionnaireResponse:
linkid: item.linkId answer-concept: item.answer.value.ofType(boolean) | item.answer.value.ofType(Coding) |
|
| item-date |
composite
|
Question with items having the specified linkId and answers of type date or dateTime found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. |
On
QuestionnaireResponse:
linkid: item.linkId answer-date: item.answer.value.ofType(date) | item.answer.value.ofType(dateTime) | |
| item-number | composite | Question with items having the specified linkId and answers of type integer or decimal found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. |
On
QuestionnaireResponse:
linkid: item.linkId answer-number: item.answer.value.ofType(integer) | item.answer.value.ofType(decimal) |
|
| item-quantity | composite | Question with items having the specified linkId and answers of type quantity found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. |
On
QuestionnaireResponse:
linkid: item.linkId answer-quantity: item.answer.value.ofType(Quantity) | |
| item-reference | composite | Question with items having the specified linkId and answers of type reference found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. |
On
QuestionnaireResponse:
linkid: item.linkId answer-reference: item.answer.value.ofType(Reference) | |
| item-string | composite | Question with items having the specified linkId and answers of type string found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. |
On
QuestionnaireResponse:
linkid: item.linkId answer-string: item.answer.value.ofType(String) | |
| item-subject | reference | Allows searching for QuestionnaireResponses by item value where the item has isSubject=true | QuestionnaireResponse.repeat(item.combine(item.answer.item)).where(extension('http://hl7.org/fhir/StructureDefinition/questionnaireresponse-isSubject').exists()).answer.value.ofType(Reference) | |
| item-uri | composite | Question with items having the specified linkId and answers of type uri found within the response. (Primarily for use as part of other composite search parameters.) Refer to [questionnaireresponse.html#searching](searching guidance) on the resource page for considerations on the use of this parameter. |
On
QuestionnaireResponse:
linkid: item.linkId answer-uri: item.answer.value.ofType(Uri) | |
| linkid | token | Question linkIds found within the response | QuestionnaireResponse.repeat(item.combine(item.answer.item)).linkId | |
| part-of | reference | Procedure or observation this questionnaire response was performed as a part of |
QuestionnaireResponse.partOf
( Observation , Procedure ) |
|
| patient | reference | The patient that is the subject of the questionnaire response |
QuestionnaireResponse.subject.where(resolve()
is
Patient)
( Patient ) |
60 Resources |
| questionnaire | reference | The questionnaire the answers are provided for |
QuestionnaireResponse.questionnaire
( Questionnaire ) |
|
| source | reference |
The
individual
providing
the
information
reflected
in
the
questionnaire
|
QuestionnaireResponse.source
( Practitioner , Organization , Device , Patient , PractitionerRole , RelatedPerson ) |
|
| status | token | The status of the questionnaire response | QuestionnaireResponse.status | |
| subject | reference | The subject of the questionnaire response |
QuestionnaireResponse.subject
(Any) |