Interweave Implementation Guide
0.1.0 - ci-build
Interweave Implementation Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the STU3 profiles here.
Official URL: https://fhir.interweavedigital.nhs.uk/R4/StructureDefinition/Interweave-QuestionnaireResponse | Version: 0.0.1 | |||
Draft as of 2024-07-15 | Computable Name: InterweaveQuestionnaireResponse |
Interweave QuestionnaireResponse resource profile - DRAFT.
Status: DRAFT: For Review
This profile sets minimum expectations for the QuestionnaireResponse resource. We use the questionnaireResponse structure definition as a base to this profile.
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.
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.
The following mandatory fields are defined:
status - This is a mandatory field which describes the status of the Questionnaire Response. The information on Questionnaire resources may possibly be gathered during multiple sessions and altered after considered being finished.
Please note that following codes from the FHIR code system are deemed irrelevent for shared care record and are not supported.
in-progress - This QuestionnaireResponse has been partially filled out with answers but changes or additions are still expected to be made to it.
stopped - This QuestionnaireResponse has been partially filled out with answers but has been abandoned. It is unknown whether changes or additions are expected to be made to it.
Subject - The subject of the questionnaire response. Every Questionnaire Response must be linked to a patient.
Authored - The date and/or time that answers were gathered for this questionnaire response.
Author - The individual or device that received and interpreted the subject's answers to the questions in the questionnaire, and selected the appropriate options for answers.
QuestionnaireResponses can be authored by clinicians, patients, or patients' relatives . Clinicians may author questionnaire responses, where the answers are provided by others on behalf of the patient. Additionally, information gathered on behalf of a patient may be about the patient's relatives (e.g. in family anamnesis). Therefore, QuestionnaireResponse makes a distinction between the author, the subject and the source of information.
In addition the following fields are "Must Support" - ie they must be populated if relevant and known.
Context - The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated. This is likely to be very useful and should be provided if at all possible.
item - A group or question item from the original questionnaire for which answers are provided.
Nested Items QuestioinnaireResponse has two different mechanisms to support nesting of 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 have its own set of nested items.
Note - The Interweave portal only supports flat structure within questionnaireResponse.item element at this time, although there is an intention to support nested items structure in the future.
Other fields are optional and may be populated if known - on the understanding that not all data consumers will necessarily make use of them. Points of note include:
Based on - Supports traceability of responsibility for the action and allows linkage of an action to the recommendations acted upon. The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.
Questionnaire - A Questionnaire is an organized collection of questions intended to solicit information from patients, providers or other individuals involved in the healthcare domain. They may be simple flat lists of questions or can be hierarchically organized in groups and sub-groups, each containing questions. The Questionnaire defines the questions to be asked, how they are ordered and grouped, any intervening instructional text and what the constraints are on the allowed answers.
If a QuestionnaireResponse references a Questionnaire, then the QuestionnaireResponse structure must be consistent with the Questionnaire (i.e. questions must be organized into the same groups, nested questions must still be nested, etc.). The order of questions within groups, groups within groups and groups within questions is relevant and must be retained for display and capture. The hierarchy items within the Questionnaire SHALL mirror the hierarchy of the corresponding Questionnaire (if any).
Usage:
Description of Profiles, Differentials, Snapshots and how the different presentations work.
This structure is derived from QuestionnaireResponse
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
QuestionnaireResponse | QuestionnaireResponse | |||
id | S | 0..1 | id | Logical id of this artifact |
meta | ||||
id | 0..0 | |||
versionId | S | 0..1 | id | Version specific identifier |
lastUpdated | S | 0..1 | instant | MANDATORY except in Contained Resources. When the resource version last changed. |
profile | S | 0..* | canonical(StructureDefinition) | Profiles this resource claims to conform to. Should list (i) this profile (ii) base profile for this resource. |
security | 0..* | Coding | DISCOURAGED - may not be honoured by Data Consumers | |
Slices for tag | 0..* | Coding | Tags applied to this resource Slice: Unordered, Open by value:system | |
tag:Source | S | 0..1 | Coding | MANDATORY except in Contained Resources. The Data Provider Id (and display text) of the system supplying the data |
id | 0..0 | |||
system | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Source | |
version | 0..0 | |||
code | S | 1..1 | code | The Data Provider Id of the system supplying the data |
display | S | 1..1 | string | Name of the system supplying the data |
tag:Provenance | S | 0..1 | Coding | MANDATORY except in Contained Resources. The ODS Code (and display text) of the organisation responsible for the data |
id | 0..0 | |||
system | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Provenance | |
version | 0..0 | |||
code | S | 1..1 | code | The ODS Code of the organisation responsible for the data |
display | S | 1..1 | string | Name of the organisation supplying the data |
implicitRules | 0..1 | uri | DISCOURAGED - may not be honoured by Data Consumers | |
language | 0..1 | code | English is assumed (not currently a multi-lingual implementation) | |
text | 0..1 | Narrative | DISCOURAGED - the preferred approach is to offer structured data fields which a Data Consumer can then render and present in a manner most suited to its users | |
partOf | 0..* | Reference(Observation | Procedure) | DISCOURAGED. - A procedure or observation that this questionnaire was performed as part of the execution of. | |
status | S | 1..1 | code | completed | amended | entered-in-error Binding: InterweaveQuestionnaireResponseStatus (required) |
subject | S | 1..1 | Reference(InterweavePatient) | The subject of the questions |
id | 0..0 | |||
extension | 0..0 | |||
reference | 1..1 | string | Reference to a resource (could be Contained) | |
identifier | 0..1 | Identifier | If relevant could include an id | |
display | 1..1 | string | Description of the referenced resource | |
encounter | S | 0..1 | Reference(InterweaveEncounter) | Encounter created as part of |
id | 0..0 | |||
extension | 0..0 | |||
reference | 1..1 | string | Reference to a resource (could be Contained) | |
identifier | 0..1 | Identifier | If relevant could include an id | |
display | 0..1 | string | If relevant, description of the referenced resource | |
authored | S | 1..1 | dateTime | Date the answers were gathered |
author | S | 1..1 | Reference(Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization) | Person who received and recorded the answers |
item | S | 0..* | BackboneElement | Groups and questions |
text | S | 1..1 | string | Name for group or question text |
Documentation for this format |
Path | Conformance | ValueSet | URI |
QuestionnaireResponse.status | required | InterweaveQuestionnaireResponseStatushttps://fhir.interweavedigital.nhs.uk/R4/ValueSet/Interweave-QuestionnaireResponseStatus from this IG |
Name | Flags | Card. | Type | Description & Constraints | ||||
---|---|---|---|---|---|---|---|---|
QuestionnaireResponse | 0..* | QuestionnaireResponse | A structured set of questions and their answers | |||||
id | SΣ | 0..1 | id | Logical id of this artifact | ||||
meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
versionId | SΣ | 0..1 | id | Version specific identifier | ||||
lastUpdated | SΣ | 0..1 | instant | MANDATORY except in Contained Resources. When the resource version last changed. | ||||
profile | SΣ | 0..* | canonical(StructureDefinition) | Profiles this resource claims to conform to. Should list (i) this profile (ii) base profile for this resource. | ||||
security | Σ | 0..* | Coding | DISCOURAGED - may not be honoured by Data Consumers Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System. | ||||
Slices for tag | Σ | 0..* | Coding | Tags applied to this resource Slice: Unordered, Open by value:system Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
tag:Source | SΣ | 0..1 | Coding | MANDATORY except in Contained Resources. The Data Provider Id (and display text) of the system supplying the data Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
system | Σ | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Source | ||||
code | SΣ | 1..1 | code | The Data Provider Id of the system supplying the data | ||||
display | SΣ | 1..1 | string | Name of the system supplying the data | ||||
tag:Provenance | SΣ | 0..1 | Coding | MANDATORY except in Contained Resources. The ODS Code (and display text) of the organisation responsible for the data Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
system | Σ | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Provenance | ||||
code | SΣ | 1..1 | code | The ODS Code of the organisation responsible for the data | ||||
display | SΣ | 1..1 | string | Name of the organisation supplying the data | ||||
implicitRules | ?!Σ | 0..1 | uri | DISCOURAGED - may not be honoured by Data Consumers | ||||
language | 0..1 | code | English is assumed (not currently a multi-lingual implementation) Binding: CommonLanguages (preferred): A human language.
| |||||
text | 0..1 | Narrative | DISCOURAGED - the preferred approach is to offer structured data fields which a Data Consumer can then render and present in a manner most suited to its users | |||||
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored | ||||
partOf | Σ | 0..* | Reference(Observation | Procedure) | DISCOURAGED. - A procedure or observation that this questionnaire was performed as part of the execution of. | ||||
status | ?!SΣ | 1..1 | code | completed | amended | entered-in-error Binding: InterweaveQuestionnaireResponseStatus (required) | ||||
subject | SΣ | 1..1 | Reference(InterweavePatient) | The subject of the questions | ||||
extension | 0..0 | |||||||
reference | ΣC | 1..1 | string | Reference to a resource (could be Contained) | ||||
identifier | Σ | 0..1 | Identifier | If relevant could include an id | ||||
display | Σ | 1..1 | string | Description of the referenced resource | ||||
encounter | SΣ | 0..1 | Reference(InterweaveEncounter) | Encounter created as part of | ||||
extension | 0..0 | |||||||
reference | ΣC | 1..1 | string | Reference to a resource (could be Contained) | ||||
identifier | Σ | 0..1 | Identifier | If relevant could include an id | ||||
display | Σ | 0..1 | string | If relevant, description of the referenced resource | ||||
authored | SΣ | 1..1 | dateTime | Date the answers were gathered | ||||
author | SΣ | 1..1 | Reference(Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization) | Person who received and recorded the answers | ||||
item | SC | 0..* | BackboneElement | Groups and questions qrs-1: Nested item can't be beneath both item and answer | ||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
linkId | 1..1 | string | Pointer to specific item from Questionnaire | |||||
text | S | 1..1 | string | Name for group or question text | ||||
Documentation for this format |
Path | Conformance | ValueSet | URI | |||
QuestionnaireResponse.meta.security | extensible | All Security Labelshttp://hl7.org/fhir/ValueSet/security-labels from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag:Source | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag:Provenance | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.language | preferred | CommonLanguages
http://hl7.org/fhir/ValueSet/languages from the FHIR Standard | ||||
QuestionnaireResponse.status | required | InterweaveQuestionnaireResponseStatushttps://fhir.interweavedigital.nhs.uk/R4/ValueSet/Interweave-QuestionnaireResponseStatus from this IG |
Id | Grade | Path(s) | Details | Requirements |
dom-2 | error | QuestionnaireResponse | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() | |
dom-3 | error | QuestionnaireResponse | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() | |
dom-4 | error | QuestionnaireResponse | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() | |
dom-5 | error | QuestionnaireResponse | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() | |
dom-6 | best practice | QuestionnaireResponse | A resource should have narrative for robust management : text.`div`.exists() | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
qrs-1 | error | QuestionnaireResponse.item | Nested item can't be beneath both item and answer : (answer.exists() and item.exists()).not() |
Name | Flags | Card. | Type | Description & Constraints | ||||
---|---|---|---|---|---|---|---|---|
QuestionnaireResponse | 0..* | QuestionnaireResponse | A structured set of questions and their answers | |||||
id | SΣ | 0..1 | id | Logical id of this artifact | ||||
meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
versionId | SΣ | 0..1 | id | Version specific identifier | ||||
lastUpdated | SΣ | 0..1 | instant | MANDATORY except in Contained Resources. When the resource version last changed. | ||||
source | Σ | 0..1 | uri | Identifies where the resource comes from | ||||
profile | SΣ | 0..* | canonical(StructureDefinition) | Profiles this resource claims to conform to. Should list (i) this profile (ii) base profile for this resource. | ||||
security | Σ | 0..* | Coding | DISCOURAGED - may not be honoured by Data Consumers Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System. | ||||
Slices for tag | Σ | 0..* | Coding | Tags applied to this resource Slice: Unordered, Open by value:system Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
tag:Source | SΣ | 0..1 | Coding | MANDATORY except in Contained Resources. The Data Provider Id (and display text) of the system supplying the data Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Source | ||||
code | SΣ | 1..1 | code | The Data Provider Id of the system supplying the data | ||||
display | SΣ | 1..1 | string | Name of the system supplying the data | ||||
userSelected | Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
tag:Provenance | SΣ | 0..1 | Coding | MANDATORY except in Contained Resources. The ODS Code (and display text) of the organisation responsible for the data Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Provenance | ||||
code | SΣ | 1..1 | code | The ODS Code of the organisation responsible for the data | ||||
display | SΣ | 1..1 | string | Name of the organisation supplying the data | ||||
userSelected | Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
implicitRules | ?!Σ | 0..1 | uri | DISCOURAGED - may not be honoured by Data Consumers | ||||
language | 0..1 | code | English is assumed (not currently a multi-lingual implementation) Binding: CommonLanguages (preferred): A human language.
| |||||
text | 0..1 | Narrative | DISCOURAGED - the preferred approach is to offer structured data fields which a Data Consumer can then render and present in a manner most suited to its users | |||||
contained | 0..* | Resource | Contained, inline Resources | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored | ||||
identifier | Σ | 0..1 | Identifier | Unique id for this set of answers | ||||
basedOn | Σ | 0..* | Reference(CarePlan | ServiceRequest) | Request fulfilled by this QuestionnaireResponse | ||||
partOf | Σ | 0..* | Reference(Observation | Procedure) | DISCOURAGED. - A procedure or observation that this questionnaire was performed as part of the execution of. | ||||
questionnaire | Σ | 0..1 | canonical(Questionnaire) | Form being answered | ||||
status | ?!SΣ | 1..1 | code | completed | amended | entered-in-error Binding: InterweaveQuestionnaireResponseStatus (required) | ||||
subject | SΣ | 1..1 | Reference(InterweavePatient) | The subject of the questions | ||||
extension | 0..0 | |||||||
reference | ΣC | 1..1 | string | Reference to a resource (could be Contained) | ||||
type | Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model). | ||||
identifier | Σ | 0..1 | Identifier | If relevant could include an id | ||||
display | Σ | 1..1 | string | Description of the referenced resource | ||||
encounter | SΣ | 0..1 | Reference(InterweaveEncounter) | Encounter created as part of | ||||
extension | 0..0 | |||||||
reference | ΣC | 1..1 | string | Reference to a resource (could be Contained) | ||||
type | Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model). | ||||
identifier | Σ | 0..1 | Identifier | If relevant could include an id | ||||
display | Σ | 0..1 | string | If relevant, description of the referenced resource | ||||
authored | SΣ | 1..1 | dateTime | Date the answers were gathered | ||||
author | SΣ | 1..1 | Reference(Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization) | Person who received and recorded the answers | ||||
source | Σ | 0..1 | Reference(Patient | Practitioner | PractitionerRole | RelatedPerson) | The person who answered the questions | ||||
item | SC | 0..* | BackboneElement | Groups and questions qrs-1: Nested item can't be beneath both item and answer | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
linkId | 1..1 | string | Pointer to specific item from Questionnaire | |||||
definition | 0..1 | uri | ElementDefinition - details for the item | |||||
text | S | 1..1 | string | Name for group or question text | ||||
answer | 0..* | BackboneElement | The response(s) to the question | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
value[x] | 0..1 | Single-valued answer to the question Binding: QuestionnaireAnswerCodes (example): Code indicating the response provided for a question. | ||||||
valueBoolean | boolean | |||||||
valueDecimal | decimal | |||||||
valueInteger | integer | |||||||
valueDate | date | |||||||
valueDateTime | dateTime | |||||||
valueTime | time | |||||||
valueString | string | |||||||
valueUri | uri | |||||||
valueAttachment | Attachment | |||||||
valueCoding | Coding | |||||||
valueQuantity | Quantity | |||||||
valueReference | Reference(Resource) | |||||||
item | 0..* | See item (QuestionnaireResponse) | Nested groups and questions | |||||
item | 0..* | See item (QuestionnaireResponse) | Nested questionnaire response items | |||||
Documentation for this format |
Path | Conformance | ValueSet | URI | |||
QuestionnaireResponse.meta.security | extensible | All Security Labelshttp://hl7.org/fhir/ValueSet/security-labels from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag:Source | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag:Provenance | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.language | preferred | CommonLanguages
http://hl7.org/fhir/ValueSet/languages from the FHIR Standard | ||||
QuestionnaireResponse.status | required | InterweaveQuestionnaireResponseStatushttps://fhir.interweavedigital.nhs.uk/R4/ValueSet/Interweave-QuestionnaireResponseStatus from this IG | ||||
QuestionnaireResponse.subject.type | extensible | ResourceTypehttp://hl7.org/fhir/ValueSet/resource-types from the FHIR Standard | ||||
QuestionnaireResponse.encounter.type | extensible | ResourceTypehttp://hl7.org/fhir/ValueSet/resource-types from the FHIR Standard | ||||
QuestionnaireResponse.item.answer.value[x] | example | QuestionnaireAnswerCodes (a valid code from SNOMED CT)http://hl7.org/fhir/ValueSet/questionnaire-answers from the FHIR Standard |
Id | Grade | Path(s) | Details | Requirements |
dom-2 | error | QuestionnaireResponse | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() | |
dom-3 | error | QuestionnaireResponse | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() | |
dom-4 | error | QuestionnaireResponse | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() | |
dom-5 | error | QuestionnaireResponse | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() | |
dom-6 | best practice | QuestionnaireResponse | A resource should have narrative for robust management : text.`div`.exists() | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
qrs-1 | error | QuestionnaireResponse.item | Nested item can't be beneath both item and answer : (answer.exists() and item.exists()).not() |
This structure is derived from QuestionnaireResponse
Summary
Mandatory: 5 elements(8 nested mandatory elements)
Must-Support: 17 elements
Fixed: 2 elements
Prohibited: 9 elements
Structures
This structure refers to these other structures:
Slices
This structure defines the following Slices:
Differential View
This structure is derived from QuestionnaireResponse
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
QuestionnaireResponse | QuestionnaireResponse | |||
id | S | 0..1 | id | Logical id of this artifact |
meta | ||||
id | 0..0 | |||
versionId | S | 0..1 | id | Version specific identifier |
lastUpdated | S | 0..1 | instant | MANDATORY except in Contained Resources. When the resource version last changed. |
profile | S | 0..* | canonical(StructureDefinition) | Profiles this resource claims to conform to. Should list (i) this profile (ii) base profile for this resource. |
security | 0..* | Coding | DISCOURAGED - may not be honoured by Data Consumers | |
Slices for tag | 0..* | Coding | Tags applied to this resource Slice: Unordered, Open by value:system | |
tag:Source | S | 0..1 | Coding | MANDATORY except in Contained Resources. The Data Provider Id (and display text) of the system supplying the data |
id | 0..0 | |||
system | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Source | |
version | 0..0 | |||
code | S | 1..1 | code | The Data Provider Id of the system supplying the data |
display | S | 1..1 | string | Name of the system supplying the data |
tag:Provenance | S | 0..1 | Coding | MANDATORY except in Contained Resources. The ODS Code (and display text) of the organisation responsible for the data |
id | 0..0 | |||
system | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Provenance | |
version | 0..0 | |||
code | S | 1..1 | code | The ODS Code of the organisation responsible for the data |
display | S | 1..1 | string | Name of the organisation supplying the data |
implicitRules | 0..1 | uri | DISCOURAGED - may not be honoured by Data Consumers | |
language | 0..1 | code | English is assumed (not currently a multi-lingual implementation) | |
text | 0..1 | Narrative | DISCOURAGED - the preferred approach is to offer structured data fields which a Data Consumer can then render and present in a manner most suited to its users | |
partOf | 0..* | Reference(Observation | Procedure) | DISCOURAGED. - A procedure or observation that this questionnaire was performed as part of the execution of. | |
status | S | 1..1 | code | completed | amended | entered-in-error Binding: InterweaveQuestionnaireResponseStatus (required) |
subject | S | 1..1 | Reference(InterweavePatient) | The subject of the questions |
id | 0..0 | |||
extension | 0..0 | |||
reference | 1..1 | string | Reference to a resource (could be Contained) | |
identifier | 0..1 | Identifier | If relevant could include an id | |
display | 1..1 | string | Description of the referenced resource | |
encounter | S | 0..1 | Reference(InterweaveEncounter) | Encounter created as part of |
id | 0..0 | |||
extension | 0..0 | |||
reference | 1..1 | string | Reference to a resource (could be Contained) | |
identifier | 0..1 | Identifier | If relevant could include an id | |
display | 0..1 | string | If relevant, description of the referenced resource | |
authored | S | 1..1 | dateTime | Date the answers were gathered |
author | S | 1..1 | Reference(Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization) | Person who received and recorded the answers |
item | S | 0..* | BackboneElement | Groups and questions |
text | S | 1..1 | string | Name for group or question text |
Documentation for this format |
Path | Conformance | ValueSet | URI |
QuestionnaireResponse.status | required | InterweaveQuestionnaireResponseStatushttps://fhir.interweavedigital.nhs.uk/R4/ValueSet/Interweave-QuestionnaireResponseStatus from this IG |
Key Elements View
Name | Flags | Card. | Type | Description & Constraints | ||||
---|---|---|---|---|---|---|---|---|
QuestionnaireResponse | 0..* | QuestionnaireResponse | A structured set of questions and their answers | |||||
id | SΣ | 0..1 | id | Logical id of this artifact | ||||
meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
versionId | SΣ | 0..1 | id | Version specific identifier | ||||
lastUpdated | SΣ | 0..1 | instant | MANDATORY except in Contained Resources. When the resource version last changed. | ||||
profile | SΣ | 0..* | canonical(StructureDefinition) | Profiles this resource claims to conform to. Should list (i) this profile (ii) base profile for this resource. | ||||
security | Σ | 0..* | Coding | DISCOURAGED - may not be honoured by Data Consumers Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System. | ||||
Slices for tag | Σ | 0..* | Coding | Tags applied to this resource Slice: Unordered, Open by value:system Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
tag:Source | SΣ | 0..1 | Coding | MANDATORY except in Contained Resources. The Data Provider Id (and display text) of the system supplying the data Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
system | Σ | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Source | ||||
code | SΣ | 1..1 | code | The Data Provider Id of the system supplying the data | ||||
display | SΣ | 1..1 | string | Name of the system supplying the data | ||||
tag:Provenance | SΣ | 0..1 | Coding | MANDATORY except in Contained Resources. The ODS Code (and display text) of the organisation responsible for the data Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
system | Σ | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Provenance | ||||
code | SΣ | 1..1 | code | The ODS Code of the organisation responsible for the data | ||||
display | SΣ | 1..1 | string | Name of the organisation supplying the data | ||||
implicitRules | ?!Σ | 0..1 | uri | DISCOURAGED - may not be honoured by Data Consumers | ||||
language | 0..1 | code | English is assumed (not currently a multi-lingual implementation) Binding: CommonLanguages (preferred): A human language.
| |||||
text | 0..1 | Narrative | DISCOURAGED - the preferred approach is to offer structured data fields which a Data Consumer can then render and present in a manner most suited to its users | |||||
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored | ||||
partOf | Σ | 0..* | Reference(Observation | Procedure) | DISCOURAGED. - A procedure or observation that this questionnaire was performed as part of the execution of. | ||||
status | ?!SΣ | 1..1 | code | completed | amended | entered-in-error Binding: InterweaveQuestionnaireResponseStatus (required) | ||||
subject | SΣ | 1..1 | Reference(InterweavePatient) | The subject of the questions | ||||
extension | 0..0 | |||||||
reference | ΣC | 1..1 | string | Reference to a resource (could be Contained) | ||||
identifier | Σ | 0..1 | Identifier | If relevant could include an id | ||||
display | Σ | 1..1 | string | Description of the referenced resource | ||||
encounter | SΣ | 0..1 | Reference(InterweaveEncounter) | Encounter created as part of | ||||
extension | 0..0 | |||||||
reference | ΣC | 1..1 | string | Reference to a resource (could be Contained) | ||||
identifier | Σ | 0..1 | Identifier | If relevant could include an id | ||||
display | Σ | 0..1 | string | If relevant, description of the referenced resource | ||||
authored | SΣ | 1..1 | dateTime | Date the answers were gathered | ||||
author | SΣ | 1..1 | Reference(Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization) | Person who received and recorded the answers | ||||
item | SC | 0..* | BackboneElement | Groups and questions qrs-1: Nested item can't be beneath both item and answer | ||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
linkId | 1..1 | string | Pointer to specific item from Questionnaire | |||||
text | S | 1..1 | string | Name for group or question text | ||||
Documentation for this format |
Path | Conformance | ValueSet | URI | |||
QuestionnaireResponse.meta.security | extensible | All Security Labelshttp://hl7.org/fhir/ValueSet/security-labels from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag:Source | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag:Provenance | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.language | preferred | CommonLanguages
http://hl7.org/fhir/ValueSet/languages from the FHIR Standard | ||||
QuestionnaireResponse.status | required | InterweaveQuestionnaireResponseStatushttps://fhir.interweavedigital.nhs.uk/R4/ValueSet/Interweave-QuestionnaireResponseStatus from this IG |
Id | Grade | Path(s) | Details | Requirements |
dom-2 | error | QuestionnaireResponse | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() | |
dom-3 | error | QuestionnaireResponse | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() | |
dom-4 | error | QuestionnaireResponse | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() | |
dom-5 | error | QuestionnaireResponse | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() | |
dom-6 | best practice | QuestionnaireResponse | A resource should have narrative for robust management : text.`div`.exists() | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
qrs-1 | error | QuestionnaireResponse.item | Nested item can't be beneath both item and answer : (answer.exists() and item.exists()).not() |
Snapshot View
Name | Flags | Card. | Type | Description & Constraints | ||||
---|---|---|---|---|---|---|---|---|
QuestionnaireResponse | 0..* | QuestionnaireResponse | A structured set of questions and their answers | |||||
id | SΣ | 0..1 | id | Logical id of this artifact | ||||
meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
versionId | SΣ | 0..1 | id | Version specific identifier | ||||
lastUpdated | SΣ | 0..1 | instant | MANDATORY except in Contained Resources. When the resource version last changed. | ||||
source | Σ | 0..1 | uri | Identifies where the resource comes from | ||||
profile | SΣ | 0..* | canonical(StructureDefinition) | Profiles this resource claims to conform to. Should list (i) this profile (ii) base profile for this resource. | ||||
security | Σ | 0..* | Coding | DISCOURAGED - may not be honoured by Data Consumers Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System. | ||||
Slices for tag | Σ | 0..* | Coding | Tags applied to this resource Slice: Unordered, Open by value:system Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
tag:Source | SΣ | 0..1 | Coding | MANDATORY except in Contained Resources. The Data Provider Id (and display text) of the system supplying the data Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Source | ||||
code | SΣ | 1..1 | code | The Data Provider Id of the system supplying the data | ||||
display | SΣ | 1..1 | string | Name of the system supplying the data | ||||
userSelected | Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
tag:Provenance | SΣ | 0..1 | Coding | MANDATORY except in Contained Resources. The ODS Code (and display text) of the organisation responsible for the data Binding: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones". | ||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
system | Σ | 1..1 | uri | Identity of the terminology system Fixed Value: https://fhir.interweavedigital.nhs.uk/Provenance | ||||
code | SΣ | 1..1 | code | The ODS Code of the organisation responsible for the data | ||||
display | SΣ | 1..1 | string | Name of the organisation supplying the data | ||||
userSelected | Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
implicitRules | ?!Σ | 0..1 | uri | DISCOURAGED - may not be honoured by Data Consumers | ||||
language | 0..1 | code | English is assumed (not currently a multi-lingual implementation) Binding: CommonLanguages (preferred): A human language.
| |||||
text | 0..1 | Narrative | DISCOURAGED - the preferred approach is to offer structured data fields which a Data Consumer can then render and present in a manner most suited to its users | |||||
contained | 0..* | Resource | Contained, inline Resources | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored | ||||
identifier | Σ | 0..1 | Identifier | Unique id for this set of answers | ||||
basedOn | Σ | 0..* | Reference(CarePlan | ServiceRequest) | Request fulfilled by this QuestionnaireResponse | ||||
partOf | Σ | 0..* | Reference(Observation | Procedure) | DISCOURAGED. - A procedure or observation that this questionnaire was performed as part of the execution of. | ||||
questionnaire | Σ | 0..1 | canonical(Questionnaire) | Form being answered | ||||
status | ?!SΣ | 1..1 | code | completed | amended | entered-in-error Binding: InterweaveQuestionnaireResponseStatus (required) | ||||
subject | SΣ | 1..1 | Reference(InterweavePatient) | The subject of the questions | ||||
extension | 0..0 | |||||||
reference | ΣC | 1..1 | string | Reference to a resource (could be Contained) | ||||
type | Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model). | ||||
identifier | Σ | 0..1 | Identifier | If relevant could include an id | ||||
display | Σ | 1..1 | string | Description of the referenced resource | ||||
encounter | SΣ | 0..1 | Reference(InterweaveEncounter) | Encounter created as part of | ||||
extension | 0..0 | |||||||
reference | ΣC | 1..1 | string | Reference to a resource (could be Contained) | ||||
type | Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model). | ||||
identifier | Σ | 0..1 | Identifier | If relevant could include an id | ||||
display | Σ | 0..1 | string | If relevant, description of the referenced resource | ||||
authored | SΣ | 1..1 | dateTime | Date the answers were gathered | ||||
author | SΣ | 1..1 | Reference(Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization) | Person who received and recorded the answers | ||||
source | Σ | 0..1 | Reference(Patient | Practitioner | PractitionerRole | RelatedPerson) | The person who answered the questions | ||||
item | SC | 0..* | BackboneElement | Groups and questions qrs-1: Nested item can't be beneath both item and answer | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
linkId | 1..1 | string | Pointer to specific item from Questionnaire | |||||
definition | 0..1 | uri | ElementDefinition - details for the item | |||||
text | S | 1..1 | string | Name for group or question text | ||||
answer | 0..* | BackboneElement | The response(s) to the question | |||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
value[x] | 0..1 | Single-valued answer to the question Binding: QuestionnaireAnswerCodes (example): Code indicating the response provided for a question. | ||||||
valueBoolean | boolean | |||||||
valueDecimal | decimal | |||||||
valueInteger | integer | |||||||
valueDate | date | |||||||
valueDateTime | dateTime | |||||||
valueTime | time | |||||||
valueString | string | |||||||
valueUri | uri | |||||||
valueAttachment | Attachment | |||||||
valueCoding | Coding | |||||||
valueQuantity | Quantity | |||||||
valueReference | Reference(Resource) | |||||||
item | 0..* | See item (QuestionnaireResponse) | Nested groups and questions | |||||
item | 0..* | See item (QuestionnaireResponse) | Nested questionnaire response items | |||||
Documentation for this format |
Path | Conformance | ValueSet | URI | |||
QuestionnaireResponse.meta.security | extensible | All Security Labelshttp://hl7.org/fhir/ValueSet/security-labels from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag:Source | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.meta.tag:Provenance | example | CommonTagshttp://hl7.org/fhir/ValueSet/common-tags from the FHIR Standard | ||||
QuestionnaireResponse.language | preferred | CommonLanguages
http://hl7.org/fhir/ValueSet/languages from the FHIR Standard | ||||
QuestionnaireResponse.status | required | InterweaveQuestionnaireResponseStatushttps://fhir.interweavedigital.nhs.uk/R4/ValueSet/Interweave-QuestionnaireResponseStatus from this IG | ||||
QuestionnaireResponse.subject.type | extensible | ResourceTypehttp://hl7.org/fhir/ValueSet/resource-types from the FHIR Standard | ||||
QuestionnaireResponse.encounter.type | extensible | ResourceTypehttp://hl7.org/fhir/ValueSet/resource-types from the FHIR Standard | ||||
QuestionnaireResponse.item.answer.value[x] | example | QuestionnaireAnswerCodes (a valid code from SNOMED CT)http://hl7.org/fhir/ValueSet/questionnaire-answers from the FHIR Standard |
Id | Grade | Path(s) | Details | Requirements |
dom-2 | error | QuestionnaireResponse | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() | |
dom-3 | error | QuestionnaireResponse | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() | |
dom-4 | error | QuestionnaireResponse | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() | |
dom-5 | error | QuestionnaireResponse | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() | |
dom-6 | best practice | QuestionnaireResponse | A resource should have narrative for robust management : text.`div`.exists() | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
qrs-1 | error | QuestionnaireResponse.item | Nested item can't be beneath both item and answer : (answer.exists() and item.exists()).not() |
This structure is derived from QuestionnaireResponse
Summary
Mandatory: 5 elements(8 nested mandatory elements)
Must-Support: 17 elements
Fixed: 2 elements
Prohibited: 9 elements
Structures
This structure refers to these other structures:
Slices
This structure defines the following Slices:
Other representations of profile: CSV, Excel, Schematron
Element name | Change details |
---|---|
basedOn |
|
partOf |
|
questionnaire |
|
status |
|
encounter |
|
author |
|
source |
|
item.subject |
|