{
"description": "A test form that has a variety of enable when scenarios for testing",
"_filename": "example/Questionnaire-questionnaire-sdc-test-enableWhen.json",
"package_name": "hl7.fhir.uv.sdc",
"date": "2024-12-17T01:55:34+00:00",
"meta": {
"profile": [ "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-behave" ]
},
"publisher": "HL7 International / FHIR Infrastructure",
"jurisdiction": [ {
"coding": [ {
"code": "001",
"system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
"display": "World"
} ]
} ],
"name": "EnableWhenTests",
"item": [ {
"item": [ {
"text": "Question 1 Check",
"type": "boolean",
"linkId": "83d5c1a6-5dc3-44d0-9d9e-d687c72e143e"
}, {
"text": "Question 2 Check",
"type": "boolean",
"linkId": "fe0106a5-0e25-43a4-9820-7acb7e74d9d7"
}, {
"text": "Question 3 Radio ( 1 2 3 )",
"type": "choice",
"linkId": "s1-radio",
"repeats": false,
"answerOption": [ {
"valueCoding": {
"code": "1",
"system": "http://example.org",
"display": "One"
}
}, {
"valueCoding": {
"code": "2",
"system": "http://example.org",
"display": "Two"
}
}, {
"valueCoding": {
"code": "3",
"system": "http://example.org",
"display": "Three"
}
} ]
}, {
"text": "Question 4 Radio ( 7 8 9 )",
"type": "choice",
"linkId": "5e1209b7-c9e0-4bf4-b228-fr096s903m25",
"repeats": false,
"answerOption": [ {
"valueCoding": {
"code": "7",
"system": "http://example.org",
"display": "Seven"
}
}, {
"valueCoding": {
"code": "8",
"system": "http://example.org",
"display": "Eight"
}
}, {
"valueCoding": {
"code": "9",
"system": "http://example.org",
"display": "Nine"
}
} ]
}, {
"text": "Question 3 - enables the question",
"type": "choice",
"linkId": "5e1209b7-c9e0-4bf4-b228-c6591b540qmo",
"repeats": false,
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [ {
"code": "drop-down",
"system": "http://hl7.org/fhir/questionnaire-item-control"
} ]
}
} ],
"answerOption": [ {
"valueCoding": {
"code": "4",
"system": "http://example.org",
"display": "Four"
}
}, {
"valueCoding": {
"code": "5",
"system": "http://example.org",
"display": "Five"
}
}, {
"valueCoding": {
"code": "6",
"system": "http://example.org",
"display": "Six"
}
} ]
}, {
"text": "Question hidden until Q1 checked",
"type": "string",
"linkId": "e5da17a7-7546-45c5-9bcd-d0b09a74cc14",
"enableWhen": [ {
"operator": "=",
"question": "83d5c1a6-5dc3-44d0-9d9e-d687c72e143e",
"answerBoolean": true
} ],
"enableBehavior": "all"
}, {
"text": "Question hidden until Q3 radio 2 Selected",
"type": "string",
"linkId": "e5da17a7-7546-45c5-9bcd-d0b09a74ty76",
"enableWhen": [ {
"operator": "=",
"question": "s1-radio",
"answerString": "2"
} ],
"enableBehavior": "all"
}, {
"item": [ {
"text": "Question 2 - disable the group",
"type": "string",
"linkId": "65578509-21ae-4a48-94de-e46b1e54kjui"
} ],
"text": "Group hidden until enabled Q1 checked",
"type": "group",
"linkId": "65578509-21ae-4a48-94de-e46b1e87d3fb",
"repeats": false,
"enableWhen": [ {
"operator": "=",
"question": "83d5c1a6-5dc3-44d0-9d9e-d687c72e143e",
"answerBoolean": true
} ],
"enableBehavior": "any"
}, {
"item": [ {
"text": "Question 2 - disable the group when unchecked",
"type": "string",
"linkId": "65578509-21ae-4a48-94de-e46b1e10ghqn"
} ],
"text": "Group present until Q2 checked",
"type": "group",
"linkId": "3ca80fdf-6598-4dd7-b9df-8a2f10895e4e",
"repeats": false,
"enableWhen": [ {
"operator": "=",
"question": "fe0106a5-0e25-43a4-9820-7acb7e74d9d7",
"answerBoolean": false
} ],
"enableBehavior": "any"
}, {
"item": [ {
"text": "Question 2 - disable the group",
"type": "string",
"linkId": "65578509-21ae-4a48-94de-e46bd161lqzp"
} ],
"text": "Group hidden until radio 2 selected",
"type": "group",
"linkId": "65578509-21ae-4a48-94de-e46be454f8k1",
"repeats": false,
"enableWhen": [ {
"operator": "=",
"question": "s1-radio",
"answerString": "2"
} ],
"enableBehavior": "any"
}, {
"item": [ {
"text": "Question 2 - disable the group",
"type": "string",
"linkId": "65578509-21ae-sdj4-98s2-emhaskjh12"
} ],
"text": "Group hidden until dropdown selected",
"type": "group",
"linkId": "65578509-21ae-4a48-94de-h1l9v32opase",
"repeats": false,
"enableWhen": [ {
"operator": "=",
"question": "5e1209b7-c9e0-4bf4-b228-c6591b540qmo",
"answerString": "4"
} ],
"enableBehavior": "any"
}, {
"item": [ {
"text": "Question 2 - disable the group",
"type": "string",
"linkId": "65578509-21ae-234vy-slo4-eddfjqwwr2"
} ],
"text": "Group hidden until 7 is undeleted",
"type": "group",
"linkId": "65578509-21ae-4a48-3f56-aswtysn1238",
"repeats": false,
"enableWhen": [ {
"operator": "!=",
"question": "5e1209b7-c9e0-4bf4-b228-fr096s903m25",
"answerString": "7"
} ],
"enableBehavior": "any"
}, {
"item": [ {
"text": "Question 2 - disable the group",
"type": "string",
"linkId": "3cf51112-6896-4076-8994-b6ff3e52f359"
} ],
"text": "Group hidden until 8 and 4 selected",
"type": "group",
"linkId": "76daed4f-f957-45cb-9584-aab95f6021d4",
"repeats": false,
"enableWhen": [ {
"operator": "=",
"question": "5e1209b7-c9e0-4bf4-b228-fr096s903m25",
"answerString": "8"
}, {
"operator": "=",
"question": "5e1209b7-c9e0-4bf4-b228-c6591b540qmo",
"answerString": "4"
} ],
"enableBehavior": "all"
} ],
"text": "Scenario 1",
"type": "group",
"linkId": "3239e619-e2b9-492c-bf05-88b314fbe3e4"
}, {
"item": [ {
"text": "Yes/No/Dont know",
"type": "choice",
"linkId": "1acf93a7-0890-44cd-be48-542defb35248",
"answerValueSet": "http://sqlonfhir-r4.azurewebsites.net/fhir/ValueSet/a015b6a1ac024dc19baec940be2c1695"
}, {
"item": [ {
"text": "Yes Question",
"type": "string",
"linkId": "840c08ad-4b27-4c1d-9d6e-824202518ad0"
} ],
"text": "Group visible when Yes selected",
"type": "group",
"linkId": "945b97b5-6d74-4a55-9be1-1989751219fb",
"enableWhen": [ {
"operator": "=",
"question": "1acf93a7-0890-44cd-be48-542defb35248",
"answerCoding": {
"code": "Y",
"system": "http://terminology.hl7.org/CodeSystem/v2-0532"
}
} ],
"enableBehavior": "any"
}, {
"item": [ {
"text": "Yes/No Question",
"type": "string",
"linkId": "e78586ac-8c97-42a8-a56b-779c5c1d81f1"
} ],
"text": "Group visible when Yes/No",
"type": "group",
"linkId": "fab7c5c4-0ac0-4afa-bd6d-c0ce4f5e0bdf",
"enableWhen": [ {
"operator": "!=",
"question": "1acf93a7-0890-44cd-be48-542defb35248",
"answerCoding": {
"code": "ASKU",
"system": "http://terminology.hl7.org/CodeSystem/v2-0532"
}
} ],
"enableBehavior": "any"
} ],
"text": "Scenario 2",
"type": "group",
"linkId": "02a7536f-06b2-4dee-94e1-f5cfcb0e8622"
}, {
"item": [ {
"text": "Integer Values Radio Buttons",
"type": "choice",
"linkId": "s3-radio",
"repeats": false,
"answerOption": [ {
"valueCoding": {
"code": "1.1",
"system": "http://example.org",
"display": "1.1"
}
}, {
"valueCoding": {
"code": "2.2",
"system": "http://example.org",
"display": "2.2"
}
}, {
"valueCoding": {
"code": "3.3",
"system": "http://example.org",
"display": "3.3"
}
} ]
}, {
"item": [ {
"text": "Group 2 question",
"type": "string",
"linkId": "840c08ad-4b27-4c1d-9d6e-824202519kied"
} ],
"text": "Group visible when value < 2.2",
"type": "group",
"linkId": "945b97b5-6d74-4a55-9be1-19897512jj89",
"enableWhen": [ {
"operator": "<",
"question": "s3-radio",
"answerDecimal": 2.1
} ],
"enableBehavior": "any"
}, {
"item": [ {
"text": "Group 3 question",
"type": "string",
"linkId": "e70a3a50-e646-4831-a00d-4d6fbdaajn84"
} ],
"text": "Group visible when valuw >= 2.2",
"type": "group",
"linkId": "04fabc33-534a-4047-9a13-c13b0b63fa17",
"enableWhen": [ {
"operator": ">=",
"question": "s3-radio",
"answerDecimal": 2.1
} ],
"enableBehavior": "any"
} ],
"text": "Scenario 3: Comparator enable when with answeroption data",
"type": "group",
"linkId": "02a7536f-06b2-4dee-94e1-f5cfcb0e1234"
}, {
"item": [ {
"text": "Integer Values Radio Buttons",
"type": "choice",
"linkId": "s4-radio",
"repeats": false,
"answerOption": [ {
"valueCoding": {
"code": "1",
"system": "http://example.org",
"display": "1"
}
}, {
"valueCoding": {
"code": "2",
"system": "http://example.org",
"display": "2"
}
}, {
"valueCoding": {
"code": "3",
"system": "http://example.org",
"display": "3"
}
} ]
}, {
"item": [ {
"text": "Group 2 question",
"type": "string",
"linkId": "840c08ad-4b27-4c1d-9d6e-82420251hg12"
} ],
"text": "Group hidden until integer 2 selected",
"type": "group",
"linkId": "945b97b5-6d74-4a55-9be1-1989751233ew",
"enableWhen": [ {
"operator": "=",
"question": "s4-radio",
"answerInteger": 2
} ],
"enableBehavior": "any"
}, {
"item": [ {
"text": "Group 3 question",
"type": "string",
"linkId": "e70a3a50-e646-4831-a00d-4d6fbdaaefc3"
} ],
"text": "Group visible for 1 and 2",
"type": "group",
"linkId": "04fabc33-534a-4047-9a13-c13b0b63gh76",
"enableWhen": [ {
"operator": "!=",
"question": "s4-radio",
"answerInteger": 3
} ],
"enableBehavior": "any"
} ],
"text": "Scenario 4: choice selections with groups",
"type": "group",
"linkId": "02a7536f-06b2-4dee-94e1-f5cfcb0e5678"
}, {
"item": [ {
"text": "Date of Birth",
"type": "date",
"linkId": "date_of_birth_question",
"repeats": false
}, {
"text": "Please specify if DOB > 2000-01-01",
"type": "string",
"linkId": "date_greater_2000-01-01",
"enableWhen": [ {
"operator": ">",
"question": "date_of_birth_question",
"answerDate": "2000-01-01"
} ],
"enableBehavior": "any"
}, {
"text": "Please specify if DOB is <= 2000-01-01",
"type": "string",
"linkId": "date_less_2000-01-01",
"enableWhen": [ {
"operator": "<=",
"question": "date_of_birth_question",
"answerDate": "2000-01-01"
} ],
"enableBehavior": "any"
}, {
"text": "Please specify time",
"type": "time",
"linkId": "datetime_question"
}, {
"text": "If Time Greater Than 11:11:11",
"type": "string",
"linkId": "datetime_question_greter_than",
"enableWhen": [ {
"operator": ">",
"question": "datetime_question",
"answerTime": "11:11:11"
} ],
"enableBehavior": "any"
}, {
"text": "If Time Less Than 11:11:11",
"type": "string",
"linkId": "datetime_question_less_than_equal",
"enableWhen": [ {
"operator": "<=",
"question": "datetime_question",
"answerTime": "11:11:11"
} ],
"enableBehavior": "any"
} ],
"text": "Scenario 5: Test EnableWhen Date Trigger",
"type": "group",
"linkId": "02a7536f-06b2-4dee-94e1-f5cfcb088990"
}, {
"item": [ {
"text": "Adverse outcomes",
"type": "choice",
"linkId": "BC029",
"repeats": true,
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [ {
"code": "drop-down",
"system": "http://hl7.org/fhir/questionnaire-item-control"
} ]
}
} ],
"answerOption": [ {
"valueCoding": {
"code": "1",
"system": "http://example.org",
"display": "Bleeding"
}
}, {
"valueCoding": {
"code": "2",
"system": "http://example.org",
"display": "Infection/sepsis"
}
}, {
"valueCoding": {
"code": "3",
"system": "http://example.org",
"display": "Perforation"
}
}, {
"valueCoding": {
"code": "4",
"system": "http://example.org",
"display": "Reaction to sedation"
}
}, {
"valueCoding": {
"code": "5",
"system": "http://example.org",
"display": "Death"
}
}, {
"valueCoding": {
"code": "9",
"system": "http://example.org",
"display": "Other"
}
} ]
}, {
"text": "Please specify:",
"type": "string",
"linkId": "BOWOPTOTH",
"maxLength": 100,
"enableWhen": [ {
"operator": "=",
"question": "BC029",
"answerCoding": {
"code": "9",
"system": "http://example.org"
}
} ],
"enableBehavior": "any"
} ],
"text": "Scenario 6: Multi-select option enablewhen",
"type": "group",
"linkId": "02a7536f-06b2-4dee-94e1-f5cfcb0hd732"
} ],
"type": null,
"experimental": "true",
"resourceType": "Questionnaire",
"title": "Enable When",
"package_version": "4.0.0-ballot",
"extension": [ {
"url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-Questionnaire.versionAlgorithm[x]",
"valueCoding": {
"code": "semver",
"system": "http://hl7.org/fhir/version-algorithm"
}
} ],
"status": "active",
"id": "a712790f-f0fe-4c8b-bfb5-c02255394e51",
"kind": null,
"url": "http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-enableWhen",
"identifier": [ {
"value": "urn:oid:2.16.840.1.113883.4.642.40.17.35.20",
"system": "urn:ietf:rfc:3986"
} ],
"version": "4.0.0-ballot",
"contact": [ {
"name": "HL7 International / FHIR Infrastructure",
"telecom": [ {
"value": "http://www.hl7.org/Special/committees/fiwg",
"system": "url"
} ]
}, {
"telecom": [ {
"value": "http://www.hl7.org/Special/committees/fiwg",
"system": "url"
} ]
} ]
}