Skip to content

Commit 945d2b8

Browse files
authored
Merge pull request #3 from mlaletina95/update-questionnaire-examples
Update questionnaire examples
2 parents 5619ab1 + a0660e2 commit 945d2b8

21 files changed

Lines changed: 278 additions & 130 deletions
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
resourceType: Questionnaire
2+
id: answer-option
3+
name: answer-option
4+
title: Questionnaire.item.answerOption
5+
status: active
6+
url: "http://example.org/fhir/Questionnaire/answer-option"
7+
meta:
8+
profile:
9+
- https://emr-core.beda.software/StructureDefinition/fhir-emr-questionnaire
10+
item:
11+
- linkId: instructions
12+
text: >-
13+
Instructions: Select one or more Reaction options from predefined answerOption values.
14+
type: display
15+
16+
- linkId: reaction
17+
text: Reaction
18+
type: choice
19+
answerOption:
20+
- valueCoding:
21+
code: "422587007"
22+
system: "http://snomed.info/sct"
23+
display: Nausea
24+
- valueCoding:
25+
code: "422400008"
26+
system: "http://snomed.info/sct"
27+
display: Vomiting
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
resourceType: Questionnaire
2+
id: answer-valueset
3+
name: answer-valueset
4+
title: Questionnaire.item.answerValueSet
5+
status: active
6+
url: "http://example.org/fhir/Questionnaire/answer-valueset"
7+
meta:
8+
profile:
9+
- https://emr-core.beda.software/StructureDefinition/fhir-emr-questionnaire
10+
item:
11+
- linkId: instructions
12+
text: >-
13+
Instructions: Open the choice field and verify values are loaded from answerValueSet.
14+
type: display
15+
16+
- linkId: condition-code
17+
text: Condition
18+
type: choice
19+
answerValueSet: "http://hl7.org/fhir/ValueSet/condition-code"
20+
preferredTerminologyServer: https://tx.ontoserver.csiro.au/fhir
21+

resources/Questionnaire/assemble.yaml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,30 @@ resourceType: Questionnaire
22
id: assemble
33
name: assemble
44
title: Assemble
5-
description: >-
6-
Demonstrates modular form composition via `subQuestionnaire`.
75
status: active
8-
subjectType:
9-
- Patient
106
url: "http://example.org/fhir/Questionnaire/assemble"
117
meta:
128
profile:
139
- https://emr-core.beda.software/StructureDefinition/fhir-emr-questionnaire
1410
item:
1511
- linkId: instructions
1612
text: >-
17-
Instructions: This form embeds two existing conference questionnaires via subQuestionnaire
18-
(nested-groups and read-only). Resolve each canonical id to the Questionnaire resource in your environment.
13+
Instructions: This form embeds short conference questionnaires via subQuestionnaire
14+
(required, repeats). Resolve each canonical id to the Questionnaire resource in your environment.
1915
type: display
2016

21-
- linkId: demo-nested-groups-group
22-
text: A. Nested groups (embedded)
17+
- linkId: required-group
18+
text: A. Required (embedded)
2319
type: group
2420
item:
25-
- linkId: demo-nested-groups-embed
21+
- linkId: required-embed
2622
type: display
27-
subQuestionnaire: nested-groups
23+
subQuestionnaire: required
2824

29-
- linkId: demo-read-only-group
30-
text: B. Read-only (embedded)
25+
- linkId: repeats-group
26+
text: B. Repeats (embedded)
3127
type: group
3228
item:
33-
- linkId: demo-read-only-embed
29+
- linkId: repeats-embed
3430
type: display
35-
subQuestionnaire: read-only
31+
subQuestionnaire: repeats

resources/Questionnaire/choice-initial-expression.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@ resourceType: Questionnaire
22
id: choice-initial-expression
33
name: choice-initial-expression
44
title: Choice InitialExpression
5-
description: >-
6-
Demonstrates two choice initialization patterns:
7-
Preferred contact type uses local `answerOption` and chooses phone/email from Patient.telecom.
8-
Preferred language uses external `answerValueSet` and initializes from Patient.communication.
95
status: active
10-
subjectType:
11-
- Patient
126
url: "http://example.org/fhir/Questionnaire/choice-initial-expression"
137
meta:
148
profile:

resources/Questionnaire/enable-when-options.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ resourceType: Questionnaire
22
id: enable-when-options
33
name: enable-when-options
44
title: EnableWhen Options
5-
description: >-
6-
Demonstrates visibility rules with `enableWhen`, `enableBehavior` (`any`/`all`),
7-
`enableWhenExpression`, parent variables, and `operator: exists`.
85
status: active
9-
subjectType:
10-
- Patient
116
url: "http://example.org/fhir/Questionnaire/enable-when-options"
127
meta:
138
profile:
@@ -131,7 +126,7 @@ item:
131126
type: date
132127

133128
# Parent variable reused in enableWhenExpression.
134-
- linkId: variable-demo-group
129+
- linkId: variable-group
135130
text: Expression using parent variable %AllergyYes
136131
type: group
137132
variable:
@@ -164,5 +159,4 @@ item:
164159
enableWhen:
165160
- question: chief-complaint-free
166161
operator: exists
167-
answerBoolean: true
168-
162+
answerBoolean: true

resources/Questionnaire/extract-vital-signs.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ resourceType: Questionnaire
22
id: extract-vital-signs
33
name: extract-vital-signs
44
title: Extract Vital Signs
5-
description: >-
6-
Demonstrates vital-sign extraction for body temperature with hidden derived data used by mapping.
75
status: active
8-
subjectType:
9-
- Patient
106
url: "http://example.org/fhir/Questionnaire/extract-vital-signs"
117
meta:
128
profile:

resources/Questionnaire/hidden-fields.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ resourceType: Questionnaire
22
id: hidden-fields
33
name: hidden-fields
44
title: Hidden Fields
5-
description: >-
6-
Demonstrates hidden calculated fields: visible pulse input, hidden derived severity,
7-
and visible severity summary.
85
status: active
9-
subjectType:
10-
- Patient
116
url: "http://example.org/fhir/Questionnaire/hidden-fields"
127
meta:
138
profile:
@@ -69,5 +64,4 @@ item:
6964
)
7065
),
7166
'—'
72-
)
73-
67+
)

resources/Questionnaire/initial-expression.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ resourceType: Questionnaire
22
id: initial-expression
33
name: initial-expression
44
title: InitialExpression
5-
description: >-
6-
Demonstrates `initialExpression` pre-population from launch context `Patient`
7-
(name, gender, birth date, telecom, and SSN).
85
status: active
9-
subjectType:
10-
- Patient
116
url: "http://example.org/fhir/Questionnaire/initial-expression"
127
meta:
138
profile:

resources/Questionnaire/item-constraint.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ resourceType: Questionnaire
22
id: item-constraint
33
name: item-constraint
44
title: Item Constraint
5-
description: >-
6-
Demonstrates `itemConstraint` with two fields where one field is mandatory.
75
status: active
8-
subjectType:
9-
- Patient
106
url: "http://example.org/fhir/Questionnaire/item-constraint"
117
meta:
128
profile:
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
resourceType: Questionnaire
2+
id: item-control
3+
name: item-control
4+
title: itemControl (HL7 specification examples)
5+
status: active
6+
url: "http://example.org/fhir/Questionnaire/item-control"
7+
meta:
8+
profile:
9+
- https://emr-core.beda.software/StructureDefinition/fhir-emr-questionnaire
10+
item:
11+
- linkId: note
12+
text: >-
13+
Demonstrates check-box, radio-button, and gtable.
14+
type: display
15+
16+
- linkId: symptoms-checkbox
17+
text: Select current symptoms (check-box)
18+
type: choice
19+
repeats: true
20+
itemControl:
21+
coding:
22+
- system: http://hl7.org/fhir/questionnaire-item-control
23+
code: check-box
24+
display: Check-box
25+
answerOption:
26+
- valueCoding:
27+
code: cough
28+
display: Cough
29+
- valueCoding:
30+
code: fever
31+
display: Fever
32+
- valueCoding:
33+
code: fatigue
34+
display: Fatigue
35+
36+
- linkId: consent-radio
37+
text: Do you consent to treatment? (radio-button)
38+
type: choice
39+
itemControl:
40+
coding:
41+
- system: http://hl7.org/fhir/questionnaire-item-control
42+
code: radio-button
43+
display: Radio Button
44+
answerOption:
45+
- valueCoding:
46+
code: "yes"
47+
display: "Yes"
48+
- valueCoding:
49+
code: "no"
50+
display: "No"
51+
52+
- linkId: repeated-observations-gtable
53+
text: Repeated observations (gtable)
54+
type: group
55+
repeats: true
56+
itemControl:
57+
coding:
58+
- system: http://hl7.org/fhir/questionnaire-item-control
59+
code: gtable
60+
display: Group Table
61+
item:
62+
- linkId: obs-date
63+
text: Observation date
64+
type: date
65+
66+
- linkId: obs-pain
67+
text: Pain score
68+
type: integer
69+

0 commit comments

Comments
 (0)