Da Vinci - Documentation Templates and Rules
1.0.0 - STU 1

Publication Build: This will be filled in by the publication tooling

## Resource Profile: DTR Questionnaire - R4

Defining URL: | http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4
Version: | 1.0.0
Name: | DTRQuestionnaire
Status: | Draft as of 2020-12-23T03:54:24+00:00
Publisher: | HL7 Clinical Decision Support Work Group
Source Resource: | XML / JSON / Turtle

The official URL for this profile is:

    http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4

### Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

- Text Summary
- Differential Table
- Snapshot Table
- Snapshot Table (Must Support)
- All

This structure is derived from CQF-Questionnaire

Summary

Mandatory: 5 elements
Prohibited: 1 element

Extensions

This structure refers to these extensions:

- http://hl7.org/fhir/StructureDefinition/cqf-library
- http://hl7.org/fhir/StructureDefinition/cqf-expression

This structure is derived from CQF-Questionnaire

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Questionnaire |  | 0..* | CQF-Questionnaire | A questionnaire with the ability to specify behavior associated with questions or groups of questions
cqf-library |  | 1..* | canonical(Library) | A library containing logic used by the artifact URL: http://hl7.org/fhir/StructureDefinition/cqf-library
status |  | 1..1 | code | draft | active | retired | unknown
experimental |  | 0..0 |  |
date |  | 1..1 | dateTime | Date last changed
contact |  | 1..* | ContactDetail | Contact details for the publisher
item | I | 1..* | BackboneElement | Questions and sections within the Questionnaire dtrq-1: Non-group items must have the cqf-expression extension
cqf-expression |  | 0..1 | Expression | An dynamic expression URL: http://hl7.org/fhir/StructureDefinition/cqf-expression
Documentation for this format

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Questionnaire | I | 0..* | CQF-Questionnaire | A questionnaire with the ability to specify behavior associated with questions or groups of questions
id | Σ | 0..1 | string | Logical id of this artifact
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 Binding: CommonLanguages (preferred) Max Binding: AllLanguages: A human language.
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation
contained |  | 0..* | Resource | Contained, inline Resources
cqf-library |  | 1..* | canonical(Library) | A library containing logic used by the artifact URL: http://hl7.org/fhir/StructureDefinition/cqf-library Slice: Unordered, Open by value:url
cqf-library |  | 0..* | canonical(Library) | A library containing logic referenced by the questionnaire URL: http://hl7.org/fhir/StructureDefinition/cqf-library
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
url | Σ | 0..1 | uri | Canonical identifier for this questionnaire, represented as a URI (globally unique)
identifier | Σ | 0..* | Identifier | Additional identifier for the questionnaire
version | Σ | 0..1 | string | Business version of the questionnaire
name | Σ I | 0..1 | string | Name for this questionnaire (computer friendly)
title | Σ | 0..1 | string | Name for this questionnaire (human friendly)
derivedFrom |  | 0..* | canonical(Questionnaire) | Instantiates protocol or definition
status | ?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact.
subjectType | Σ | 0..* | code | Resource that can be subject of QuestionnaireResponse Binding: ResourceType (required): One of the resource types defined as part of this version of FHIR.
date | Σ | 1..1 | dateTime | Date last changed
publisher | Σ | 0..1 | string | Name of the publisher (organization or individual)
contact | Σ | 1..* | ContactDetail | Contact details for the publisher
description |  | 0..1 | markdown | Natural language description of the questionnaire
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for questionnaire (if applicable) Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
purpose |  | 0..1 | markdown | Why this questionnaire is defined
copyright |  | 0..1 | markdown | Use and/or publishing restrictions
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
code | Σ | 0..* | Coding | Concept that represents the overall questionnaire Binding: QuestionnaireQuestionCodes (example): Codes for questionnaires, groups and individual questions.
item | I | 1..* | BackboneElement | Questions and sections within the Questionnaire dtrq-1: Non-group items must have the cqf-expression extension
id |  | 0..1 | string | Unique id for inter-element referencing
cqf-expression |  | 0..1 | Expression | An dynamic expression URL: http://hl7.org/fhir/StructureDefinition/cqf-expression
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
linkId |  | 1..1 | string | Unique id for item in questionnaire
definition |  | 0..1 | uri | ElementDefinition - details for the item
code | I | 0..* | Coding | Corresponding concept for this item in a terminology Binding: QuestionnaireQuestionCodes (example): Codes for questionnaires, groups and individual questions.
prefix |  | 0..1 | string | E.g. "1(a)", "2.5.3"
text |  | 0..1 | string | Primary text for the item
type |  | 1..1 | code | group | display | boolean | decimal | integer | date | dateTime + Binding: QuestionnaireItemType (required): Distinguishes groups from questions and display text and indicates data type for questions.
enableWhen | ?!I | 0..* | BackboneElement | Only allow data when que-7: If the operator is 'exists', the value must be a boolean
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
question |  | 1..1 | string | Question that determines whether item is enabled
operator |  | 1..1 | code | exists | = | != | > | < | >= | <= Binding: QuestionnaireItemOperator (required): The criteria by which a question is enabled.
answer[x] | I | 1..1 |  | Value for question comparison based on operator Binding: QuestionnaireAnswerCodes (example): Allowed values to answer questions.
answerBoolean |  |  | boolean |
answerDecimal |  |  | decimal |
answerInteger |  |  | integer |
answerDate |  |  | date |
answerDateTime |  |  | dateTime |
answerTime |  |  | time |
answerString |  |  | string |
answerCoding |  |  | Coding |
answerQuantity |  |  | Quantity |
answerReference |  |  | Reference(Resource) |
enableBehavior | I | 0..1 | code | all | any Binding: EnableWhenBehavior (required): Controls how multiple enableWhen values are interpreted - whether all or any must be true.
required | I | 0..1 | boolean | Whether the item must be included in data results
repeats | I | 0..1 | boolean | Whether the item may repeat
readOnly | I | 0..1 | boolean | Don't allow human editing
maxLength | I | 0..1 | integer | No more than this many characters
answerValueSet | I | 0..1 | canonical(ValueSet) | Valueset containing permitted answers
answerOption | I | 0..* | BackboneElement | Permitted 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
value[x] |  | 1..1 |  | Answer value Binding: QuestionnaireAnswerCodes (example): Allowed values to answer questions.
valueInteger |  |  | integer |
valueDate |  |  | date |
valueTime |  |  | time |
valueString |  |  | string |
valueCoding |  |  | Coding |
valueReference |  |  | Reference(Resource) |
initialSelected |  | 0..1 | boolean | Whether option is selected by default
initial | I | 0..* | BackboneElement | Initial value(s) when item is first rendered
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] |  | 1..1 |  | Actual value for initializing the question Binding: QuestionnaireAnswerCodes (example): Allowed values to answer questions.
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 | I | 0..* | See item (Questionnaire) | Nested questionnaire items
Documentation for this format

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Questionnaire | I | 0..* | CQF-Questionnaire | A questionnaire with the ability to specify behavior associated with questions or groups of questions
Documentation for this format

This structure is derived from CQF-Questionnaire

Summary

Mandatory: 5 elements
Prohibited: 1 element

Extensions

This structure refers to these extensions:

- http://hl7.org/fhir/StructureDefinition/cqf-library
- http://hl7.org/fhir/StructureDefinition/cqf-expression

Differential View

This structure is derived from CQF-Questionnaire

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Questionnaire |  | 0..* | CQF-Questionnaire | A questionnaire with the ability to specify behavior associated with questions or groups of questions
cqf-library |  | 1..* | canonical(Library) | A library containing logic used by the artifact URL: http://hl7.org/fhir/StructureDefinition/cqf-library
status |  | 1..1 | code | draft | active | retired | unknown
experimental |  | 0..0 |  |
date |  | 1..1 | dateTime | Date last changed
contact |  | 1..* | ContactDetail | Contact details for the publisher
item | I | 1..* | BackboneElement | Questions and sections within the Questionnaire dtrq-1: Non-group items must have the cqf-expression extension
cqf-expression |  | 0..1 | Expression | An dynamic expression URL: http://hl7.org/fhir/StructureDefinition/cqf-expression
Documentation for this format

Snapshot View

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Questionnaire | I | 0..* | CQF-Questionnaire | A questionnaire with the ability to specify behavior associated with questions or groups of questions
id | Σ | 0..1 | string | Logical id of this artifact
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 Binding: CommonLanguages (preferred) Max Binding: AllLanguages: A human language.
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation
contained |  | 0..* | Resource | Contained, inline Resources
cqf-library |  | 1..* | canonical(Library) | A library containing logic used by the artifact URL: http://hl7.org/fhir/StructureDefinition/cqf-library Slice: Unordered, Open by value:url
cqf-library |  | 0..* | canonical(Library) | A library containing logic referenced by the questionnaire URL: http://hl7.org/fhir/StructureDefinition/cqf-library
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
url | Σ | 0..1 | uri | Canonical identifier for this questionnaire, represented as a URI (globally unique)
identifier | Σ | 0..* | Identifier | Additional identifier for the questionnaire
version | Σ | 0..1 | string | Business version of the questionnaire
name | Σ I | 0..1 | string | Name for this questionnaire (computer friendly)
title | Σ | 0..1 | string | Name for this questionnaire (human friendly)
derivedFrom |  | 0..* | canonical(Questionnaire) | Instantiates protocol or definition
status | ?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact.
subjectType | Σ | 0..* | code | Resource that can be subject of QuestionnaireResponse Binding: ResourceType (required): One of the resource types defined as part of this version of FHIR.
date | Σ | 1..1 | dateTime | Date last changed
publisher | Σ | 0..1 | string | Name of the publisher (organization or individual)
contact | Σ | 1..* | ContactDetail | Contact details for the publisher
description |  | 0..1 | markdown | Natural language description of the questionnaire
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for questionnaire (if applicable) Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
purpose |  | 0..1 | markdown | Why this questionnaire is defined
copyright |  | 0..1 | markdown | Use and/or publishing restrictions
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
code | Σ | 0..* | Coding | Concept that represents the overall questionnaire Binding: QuestionnaireQuestionCodes (example): Codes for questionnaires, groups and individual questions.
item | I | 1..* | BackboneElement | Questions and sections within the Questionnaire dtrq-1: Non-group items must have the cqf-expression extension
id |  | 0..1 | string | Unique id for inter-element referencing
cqf-expression |  | 0..1 | Expression | An dynamic expression URL: http://hl7.org/fhir/StructureDefinition/cqf-expression
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
linkId |  | 1..1 | string | Unique id for item in questionnaire
definition |  | 0..1 | uri | ElementDefinition - details for the item
code | I | 0..* | Coding | Corresponding concept for this item in a terminology Binding: QuestionnaireQuestionCodes (example): Codes for questionnaires, groups and individual questions.
prefix |  | 0..1 | string | E.g. "1(a)", "2.5.3"
text |  | 0..1 | string | Primary text for the item
type |  | 1..1 | code | group | display | boolean | decimal | integer | date | dateTime + Binding: QuestionnaireItemType (required): Distinguishes groups from questions and display text and indicates data type for questions.
enableWhen | ?!I | 0..* | BackboneElement | Only allow data when que-7: If the operator is 'exists', the value must be a boolean
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
question |  | 1..1 | string | Question that determines whether item is enabled
operator |  | 1..1 | code | exists | = | != | > | < | >= | <= Binding: QuestionnaireItemOperator (required): The criteria by which a question is enabled.
answer[x] | I | 1..1 |  | Value for question comparison based on operator Binding: QuestionnaireAnswerCodes (example): Allowed values to answer questions.
answerBoolean |  |  | boolean |
answerDecimal |  |  | decimal |
answerInteger |  |  | integer |
answerDate |  |  | date |
answerDateTime |  |  | dateTime |
answerTime |  |  | time |
answerString |  |  | string |
answerCoding |  |  | Coding |
answerQuantity |  |  | Quantity |
answerReference |  |  | Reference(Resource) |
enableBehavior | I | 0..1 | code | all | any Binding: EnableWhenBehavior (required): Controls how multiple enableWhen values are interpreted - whether all or any must be true.
required | I | 0..1 | boolean | Whether the item must be included in data results
repeats | I | 0..1 | boolean | Whether the item may repeat
readOnly | I | 0..1 | boolean | Don't allow human editing
maxLength | I | 0..1 | integer | No more than this many characters
answerValueSet | I | 0..1 | canonical(ValueSet) | Valueset containing permitted answers
answerOption | I | 0..* | BackboneElement | Permitted 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
value[x] |  | 1..1 |  | Answer value Binding: QuestionnaireAnswerCodes (example): Allowed values to answer questions.
valueInteger |  |  | integer |
valueDate |  |  | date |
valueTime |  |  | time |
valueString |  |  | string |
valueCoding |  |  | Coding |
valueReference |  |  | Reference(Resource) |
initialSelected |  | 0..1 | boolean | Whether option is selected by default
initial | I | 0..* | BackboneElement | Initial value(s) when item is first rendered
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] |  | 1..1 |  | Actual value for initializing the question Binding: QuestionnaireAnswerCodes (example): Allowed values to answer questions.
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 | I | 0..* | See item (Questionnaire) | Nested questionnaire items
Documentation for this format

Other representations of profile: Schematron

#### Terminology Bindings

Path | Conformance | ValueSet
Questionnaire.language | preferred | CommonLanguages Max Binding: AllLanguages
Questionnaire.status | required | PublicationStatus
Questionnaire.subjectType | required | ResourceType
Questionnaire.jurisdiction | extensible | Jurisdiction ValueSet
Questionnaire.code | example | QuestionnaireQuestionCodes
Questionnaire.item.code | example | QuestionnaireQuestionCodes
Questionnaire.item.type | required | QuestionnaireItemType
Questionnaire.item.enableWhen.operator | required | QuestionnaireItemOperator
Questionnaire.item.enableWhen.answer[x] | example | QuestionnaireAnswerCodes
Questionnaire.item.enableBehavior | required | EnableWhenBehavior
Questionnaire.item.answerOption.value[x] | example | QuestionnaireAnswerCodes
Questionnaire.item.initial.value[x] | example | QuestionnaireAnswerCodes

#### Constraints

Id | Path | Details | Requirements
dtrq-1 | Questionnaire.item | Non-group items must have the cqf-expression extension : type = 'group' or extension.url = 'http://hl7.org/fhir/StructureDefinition/cqf-expression' |
que-7 | Questionnaire.item.enableWhen | If the operator is 'exists', the value must be a boolean : operator = 'exists' implies (answer is Boolean) |