questionnaire-sdc-test-enableWhen
type: Questionnaire
node role: treeRoot
id:
  v: questionnaire-sdc-test-enableWhen
meta:
  profile:
    v: http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-behave
    l: sdc-questionnaire-behave
language:
  v: en
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: Questionnaire questionnaire-sdc-test-enableWhen Profile: Advanced Behavior Questionnaire Structure LinkID Text Cardinality Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> EnableWhenTests A test form that has a variety of enable when scenarios for testing Questionnaire http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-enableWhen#4.0.0 #xD; 3239e619-e2b9-492c-bf05-88b314fbe3e4 Scenario 1 0..1 group #xD; 83d5c1a6-5dc3-44d0-9d9e-d687c72e143e Question 1 Check 0..1 boolean #xD; fe0106a5-0e25-43a4-9820-7acb7e74d9d7 Question 2 Check 0..1 boolean #xD; s1-radio Question 3 Radio ( 1 2 3 ) 0..1 choice Options: 3 options #xD; 5e1209b7-c9e0-4bf4-b228-fr096s903m25 Question 4 Radio ( 7 8 9 ) 0..1 choice Options: 3 options #xD; 5e1209b7-c9e0-4bf4-b228-c6591b540qmo Question 3 - enables the question 0..1 choice Options: 3 options #xD; e5da17a7-7546-45c5-9bcd-d0b09a74cc14 Question hidden until Q1 checked 0..1 string Enable When: 83d5c1a6-5dc3-44d0-9d9e-d687c72e143e = true #xD; e5da17a7-7546-45c5-9bcd-d0b09a74ty76 Question hidden until Q3 radio 2 Selected 0..1 string Enable When: s1-radio = 2 #xD; 65578509-21ae-4a48-94de-e46b1e87d3fb Group hidden until enabled Q1 checked 0..1 group Enable When: 83d5c1a6-5dc3-44d0-9d9e-d687c72e143e = true #xD; 65578509-21ae-4a48-94de-e46b1e54kjui Question 2 - disable the group 0..1 string #xD; 3ca80fdf-6598-4dd7-b9df-8a2f10895e4e Group present until Q2 checked 0..1 group Enable When: fe0106a5-0e25-43a4-9820-7acb7e74d9d7 = false #xD; 65578509-21ae-4a48-94de-e46b1e10ghqn Question 2 - disable the group when unchecked 0..1 string #xD; 65578509-21ae-4a48-94de-e46be454f8k1 Group hidden until radio 2 selected 0..1 group Enable When: s1-radio = 2 #xD; 65578509-21ae-4a48-94de-e46bd161lqzp Question 2 - disable the group 0..1 string #xD; 65578509-21ae-4a48-94de-h1l9v32opase Group hidden until dropdown selected 0..1 group Enable When: 5e1209b7-c9e0-4bf4-b228-c6591b540qmo = 4 #xD; 655…
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/artifact-versionAlgorithm
    l: artifact-versionAlgorithm
  value: Coding
    system:
      v: http://hl7.org/fhir/version-algorithm
      l: version-algorithm
    code:
      v: semver
url:
  v: http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-enableWhen
  l: questionnaire-sdc-test-enableWhen
identifier:
  system:
    v: urn:ietf:rfc:3986
    l: 3986
  value:
    v: urn:oid:2.16.840.1.113883.4.642.40.17.35.20
version:
  v: 4.0.0
name:
  v: EnableWhenTests
title:
  v: Enable When
status:
  v: active
experimental:
  v: true
date:
  v: 2026-03-24T16:16:08+11:00
publisher:
  v: HL7 International / FHIR Infrastructure
contact:
  name:
    v: HL7 International / FHIR Infrastructure
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/fiwg
contact:
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/fiwg
description:
  v: A test form that has a variety of enable when scenarios for testing
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
      l: m49.htm
    code:
      v: 001
    display:
      v: World
item:
  text:
    v: Scenario 1
  type:
    v: group
  item:
    text:
      v: Question 1 Check
    type:
      v: boolean
  item:
    text:
      v: Question 2 Check
    type:
      v: boolean
  item:
    link id:
      v: s1-radio
    text:
      v: Question 3 Radio ( 1 2 3 )
    type:
      v: choice
    repeats:
      v: false
    answer option:
      value: Coding
    answer option:
      value: Coding
    answer option:
      value: Coding
  item:
    link id:
      v: 5e1209b7-c9e0-4bf4-b228-fr096s903m25
    text:
      v: Question 4 Radio ( 7 8 9 )
    type:
      v: choice
    repeats:
      v: false
    answer option:
      value: Coding
    answer option:
      value: Coding
    answer option:
      value: Coding
  item:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl
        l: questionnaire-itemControl
      value: CodeableConcept
    link id:
      v: 5e1209b7-c9e0-4bf4-b228-c6591b540qmo
    text:
      v: Question 3 - enables the question
    type:
      v: choice
    repeats:
      v: false
    answer option:
      value: Coding
    answer option:
      value: Coding
    answer option:
      value: Coding
  item:
    text:
      v: Question hidden until Q1 checked
    type:
      v: string
    enable when:
      operator:
        v: =
      answer: Boolean
        v: true
    enable behavior:
      v: all
  item:
    link id:
      v: e5da17a7-7546-45c5-9bcd-d0b09a74ty76
    text:
      v: Question hidden until Q3 radio 2 Selected
    type:
      v: string
    enable when:
      question:
        v: s1-radio
      operator:
        v: =
      answer: String
        v: 2
    enable behavior:
      v: all
  item:
    text:
      v: Group hidden until enabled Q1 checked
    type:
      v: group
    enable when:
      operator:
        v: =
      answer: Boolean
        v: true
    enable behavior:
      v: any
    repeats:
      v: false
    item:
      link id:
        v: 65578509-21ae-4a48-94de-e46b1e54kjui
      text:
        v: Question 2 - disable the group
      type:
        v: string
  item:
    text:
      v: Group present until Q2 checked
    type:
      v: group
    enable when:
      operator:
        v: =
      answer: Boolean
        v: false
    enable behavior:
      v: any
    repeats:
      v: false
    item:
      link id:
        v: 65578509-21ae-4a48-94de-e46b1e10ghqn

v: 1

v: One

v: 2

v: Two

v: 3

v: Three

v: 7

v: Seven

v: 8

v: Eight

v: 9

v: Nine

system:
  v: http://hl7.org/fhir/questionnaire-item-control
  l: questionnaire-item-control
code:
  v: drop-down

v: 4

v: Four

v: 5

v: Five

v: 6

v: Six

v: Question 2 - disable the group when unchecked

v: string

link id:
  v: 65578509-21ae-4a48-94de-e46be454f8k1
text:
  v: Group hidden until radio 2 selected
type:
  v: group
enable when:
  question:
    v: s1-radio
  operator:
    v: =
  answer: String
    v: 2
enable behavior:
  v: any
repeats:
  v: false
item:
  link id:
    v: 65578509-21ae-4a48-94de-e46bd161lqzp
  text:
    v: Question 2 - disable the group
  type:
    v: string

link id:
  v: 65578509-21ae-4a48-94de-h1l9v32opase
text:
  v: Group hidden until dropdown selected
type:
  v: group
enable when:
  question:
    v: 5e1209b7-c9e0-4bf4-b228-c6591b540qmo
  operator:
    v: =
  answer: String
    v: 4
enable behavior:
  v: any
repeats:
  v: false
item:
  link id:
    v: 65578509-21ae-sdj4-98s2-emhaskjh12
  text:
    v: Question 2 - disable the group
  type:
    v: string

link id:
  v: 65578509-21ae-4a48-3f56-aswtysn1238
text:
  v: Group hidden until 7 is undeleted
type:
  v: group
enable when:
  question:
    v: 5e1209b7-c9e0-4bf4-b228-fr096s903m25
  operator:
    v: !=
  answer: String
    v: 7
enable behavior:
  v: any
repeats:
  v: false
item:
  link id:
    v: 65578509-21ae-234vy-slo4-eddfjqwwr2
  text:
    v: Question 2 - disable the group
  type:
    v: string

text:
  v: Group hidden until 8 and 4 selected
type:
  v: group
enable when:
  question:
    v: 5e1209b7-c9e0-4bf4-b228-fr096s903m25
  operator:
    v: =
  answer: String
    v: 8
enable when:
  question:
    v: 5e1209b7-c9e0-4bf4-b228-c6591b540qmo
  operator:
    v: =
  answer: String
    v: 4
enable behavior:
  v: all
repeats:
  v: false
item:
  text:
    v: Question 2 - disable the group
  type:
    v: string

text:
  v: Scenario 2
type:
  v: group
item:
  text:
    v: Yes/No/Dont know/NA
  type:
    v: choice
  answer value set:
    v: http://terminology.hl7.org/ValueSet/yes-no-unknown-not-applicable
    l: yes-no-unknown-not-applicable
item:
  text:
    v: Group visible when Yes selected
  type:
    v: group
  enable when:
    operator:
      v: =
    answer: Coding
      system:
        v: http://terminology.hl7.org/CodeSystem/v2-0532
        l: v2-0532
      code:
        v: Y
  enable behavior:
    v: any
  item:
    text:
      v: Yes Question
    type:
      v: string
item:
  text:
    v: Group visible when Yes/No
  type:
    v: group
  enable when:
    operator:
      v: !=
    answer: Coding
      system:
        v: http://terminology.hl7.org/CodeSystem/v2-0532
        l: v2-0532
      code:
        v: ASKU
  enable behavior:
    v: any
  item:
    text:
      v: Yes/No Question
    type:
      v: string

text:
  v: Scenario 3: Comparator enable when with answeroption data
type:
  v: group
item:
  link id:
    v: s3-radio
  text:
    v: Integer Values Radio Buttons
  type:
    v: choice
  repeats:
    v: false
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 1.1
      display:
        v: 1.1
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 2.2
      display:
        v: 2.2
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 3.3
      display:
        v: 3.3
item:
  link id:
    v: 945b97b5-6d74-4a55-9be1-19897512jj89
  text:
    v: Group visible when value < 2.2
  type:
    v: group
  enable when:
    question:
      v: s3-radio
    operator:
      v: <
    answer: Decimal
      v: 2.1
  enable behavior:
    v: any
  item:
    link id:
      v: 840c08ad-4b27-4c1d-9d6e-824202519kied
    text:
      v: Group 2 question
    type:
      v: string
item:
  text:
    v: Group visible when valuw >= 2.2
  type:
    v: group
  enable when:
    question:
      v: s3-radio
    operator:
      v: >=
    answer: Decimal
      v: 2.1
  enable behavior:
    v: any
  item:
    link id:
      v: e70a3a50-e646-4831-a00d-4d6fbdaajn84
    text:
      v: Group 3 question
    type:
      v: string

text:
  v: Scenario 4: choice selections with groups
type:
  v: group
item:
  link id:
    v: s4-radio
  text:
    v: Integer Values Radio Buttons
  type:
    v: choice
  repeats:
    v: false
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 1
      display:
        v: 1
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 2
      display:
        v: 2
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 3
      display:
        v: 3
item:
  link id:
    v: 945b97b5-6d74-4a55-9be1-1989751233ew
  text:
    v: Group hidden until integer 2 selected
  type:
    v: group
  enable when:
    question:
      v: s4-radio
    operator:
      v: =
    answer: Integer
      v: 2
  enable behavior:
    v: any
  item:
    link id:
      v: 840c08ad-4b27-4c1d-9d6e-82420251hg12
    text:
      v: Group 2 question
    type:
      v: string
item:
  link id:
    v: 04fabc33-534a-4047-9a13-c13b0b63gh76
  text:
    v: Group visible for 1 and 2
  type:
    v: group
  enable when:
    question:
      v: s4-radio
    operator:
      v: !=
    answer: Integer
      v: 3
  enable behavior:
    v: any
  item:
    text:
      v: Group 3 question
    type:
      v: string

text:
  v: Scenario 5: Test EnableWhen Date Trigger
type:
  v: group
item:
  link id:
    v: date_of_birth_question
  text:
    v: Date of Birth
  type:
    v: date
  repeats:
    v: false
item:
  link id:
    v: date_greater_2000-01-01
  text:
    v: Please specify if DOB > 2000-01-01
  type:
    v: string
  enable when:
    question:
      v: date_of_birth_question
    operator:
      v: >
    answer: Date
      v: 2000-01-01
  enable behavior:
    v: any
item:
  link id:
    v: date_less_2000-01-01
  text:
    v: Please specify if DOB is <= 2000-01-01
  type:
    v: string
  enable when:
    question:
      v: date_of_birth_question
    operator:
      v: <=
    answer: Date
      v: 2000-01-01
  enable behavior:
    v: any
item:
  link id:
    v: datetime_question
  text:
    v: Please specify time
  type:
    v: time
item:
  link id:
    v: datetime_question_greter_than
  text:
    v: If Time Greater Than 11:11:11
  type:
    v: string
  enable when:
    question:
      v: datetime_question
    operator:
      v: >
    answer: Time
      v: 11:11:11
  enable behavior:
    v: any
item:
  link id:
    v: datetime_question_less_than_equal
  text:
    v: If Time Less Than 11:11:11
  type:
    v: string
  enable when:
    question:
      v: datetime_question
    operator:
      v: <=
    answer: Time
      v: 11:11:11
  enable behavior:
    v: any

link id:
  v: 02a7536f-06b2-4dee-94e1-f5cfcb0hd732
text:
  v: Scenario 6: Multi-select option enablewhen
type:
  v: group
item:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl
      l: questionnaire-itemControl
    value: CodeableConcept
  link id:
    v: BC029
  text:
    v: Adverse outcomes
  type:
    v: choice
  repeats:
    v: true
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 1
      display:
        v: Bleeding
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 2
      display:
        v: Infection/sepsis
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 3
      display:
        v: Perforation
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 4
      display:
        v: Reaction to sedation
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 5
      display:
        v: Death
  answer option:
    value: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 9
      display:
        v: Other
item:
  link id:
    v: BOWOPTOTH
  text:
    v: Please specify:
  type:
    v: string
  enable when:
    question:
      v: BC029
    operator:
      v: =
    answer: Coding
      system:
        v: http://example.org
        l: example.org
      code:
        v: 9
  enable behavior:
    v: any
  max length:
    v: 100

v: drop-down