@aehrc/smart-forms-renderer 0.27.2 → 0.27.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +2 -1
- package/.storybook/preview.ts +6 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.d.ts +3 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js +9 -17
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +12 -9
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js +7 -9
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +12 -8
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.d.ts +2 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js +6 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.d.ts +2 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js +5 -7
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js +4 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.d.ts +2 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js +2 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js +5 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.d.ts +2 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js.map +1 -1
- package/lib/components/FormComponents/DecimalItem/DecimalItem.js +1 -1
- package/lib/components/FormComponents/GroupItem/TabButtonsWrapper.js +20 -20
- package/lib/components/FormComponents/GroupItem/TabButtonsWrapper.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.d.ts +3 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js +7 -19
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +40 -40
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +15 -3
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.d.ts +2 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js +3 -3
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js +27 -26
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/StringItem/StringField.js +1 -1
- package/lib/components/FormComponents/StringItem/StringField.js.map +1 -1
- package/lib/hooks/useInitialiseRenderer.js +1 -1
- package/lib/hooks/useInitialiseRenderer.js.map +1 -1
- package/lib/hooks/useNextAndPreviousVisibleTabs.d.ts +7 -0
- package/lib/hooks/useNextAndPreviousVisibleTabs.js +63 -0
- package/lib/hooks/useNextAndPreviousVisibleTabs.js.map +1 -0
- package/lib/hooks/useNextPreviousVisibleTabs.d.ts +6 -0
- package/lib/hooks/useNextPreviousVisibleTabs.js +63 -0
- package/lib/hooks/useNextPreviousVisibleTabs.js.map +1 -0
- package/lib/index.d.ts +0 -7
- package/lib/index.js +0 -24
- package/lib/index.js.map +1 -1
- package/lib/utils/choice.d.ts +1 -7
- package/lib/utils/choice.js +10 -20
- package/lib/utils/choice.js.map +1 -1
- package/lib/utils/enableWhen.js +5 -7
- package/lib/utils/enableWhen.js.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/openChoice.d.ts +9 -4
- package/lib/utils/openChoice.js +47 -78
- package/lib/utils/openChoice.js.map +1 -1
- package/lib/utils/tabs.d.ts +0 -21
- package/lib/utils/tabs.js +0 -51
- package/lib/utils/tabs.js.map +1 -1
- package/package.json +4 -4
- package/src/components/FormComponents/ChoiceItems/CheckboxOptionList.tsx +82 -0
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.tsx +23 -52
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +15 -9
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.tsx +17 -19
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +13 -8
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.tsx +5 -4
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +6 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.tsx +5 -1
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.tsx +9 -16
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +4 -4
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.tsx +4 -3
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +5 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.tsx +5 -1
- package/src/components/FormComponents/DecimalItem/DecimalItem.tsx +1 -1
- package/src/components/FormComponents/GroupItem/TabButtonsWrapper.tsx +28 -25
- package/src/components/FormComponents/ItemParts/{RadioAnswerOptionButtons.tsx → RadioOptionList.tsx} +7 -7
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.tsx +18 -50
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +70 -68
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetFields.tsx +110 -0
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.tsx +188 -0
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +46 -19
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.tsx +5 -3
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.tsx +37 -29
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetFields.tsx +104 -0
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.tsx +156 -0
- package/src/components/FormComponents/StringItem/StringField.tsx +1 -1
- package/src/hooks/useInitialiseRenderer.ts +1 -1
- package/src/hooks/useNextAndPreviousVisibleTabs.ts +86 -0
- package/src/hooks/useOpenLabel.ts +43 -0
- package/src/index.ts +0 -21
- package/src/stories/BuildFormWrapper.tsx +57 -0
- package/src/stories/assets/questionnaires/QAdvancedAdditionalDisplayContent.ts +83 -0
- package/src/stories/assets/questionnaires/QAdvancedControlAppearance.ts +294 -0
- package/src/stories/assets/questionnaires/QAdvancedOther.ts +495 -0
- package/src/stories/assets/questionnaires/QAdvancedTextApperance.ts +188 -0
- package/src/stories/assets/questionnaires/QAttachment.ts +38 -0
- package/src/stories/assets/questionnaires/QBehaviorCalculations.ts +645 -0
- package/src/stories/assets/questionnaires/QBehaviorChoiceRestriction.ts +281 -0
- package/src/stories/assets/questionnaires/QBehaviorOther.ts +1149 -0
- package/src/stories/assets/questionnaires/QBehaviorValueConstraints.ts +508 -0
- package/src/stories/assets/questionnaires/QBoolean.ts +130 -0
- package/src/stories/assets/questionnaires/QChoice.ts +137 -0
- package/src/stories/assets/questionnaires/QDate.ts +56 -0
- package/src/stories/assets/questionnaires/QDateTime.ts +56 -0
- package/src/stories/assets/questionnaires/QDecimal.ts +56 -0
- package/src/stories/assets/questionnaires/QDisplay.ts +38 -0
- package/src/stories/assets/questionnaires/QGroup.ts +52 -0
- package/src/stories/assets/questionnaires/QInteger.ts +119 -0
- package/src/stories/assets/questionnaires/QItemControlDisplay.ts +114 -0
- package/src/stories/assets/questionnaires/QItemControlGroup.ts +419 -0
- package/src/stories/assets/questionnaires/QItemControlQuestion.ts +1271 -0
- package/src/stories/assets/questionnaires/QOpenChoice.ts +151 -0
- package/src/stories/assets/questionnaires/QQuantity.ts +38 -0
- package/src/stories/assets/questionnaires/QReference.ts +38 -0
- package/src/stories/assets/questionnaires/QSingleItems.ts +251 -0
- package/src/stories/assets/questionnaires/QString.ts +131 -0
- package/src/stories/assets/questionnaires/QText.ts +169 -0
- package/src/stories/assets/questionnaires/QTime.ts +38 -0
- package/src/stories/assets/questionnaires/QUrl.ts +38 -0
- package/src/stories/assets/questionnaires/index.ts +44 -0
- package/src/stories/itemTypes/Attachment.stories.tsx +39 -0
- package/src/stories/itemTypes/Boolean.stories.tsx +72 -0
- package/src/stories/{MedicalHistoryTable.stories.tsx → itemTypes/Choice.stories.tsx} +32 -26
- package/src/stories/itemTypes/Date.stories.tsx +46 -0
- package/src/stories/itemTypes/DateTime.stories.tsx +45 -0
- package/src/stories/itemTypes/Decimal.stories.tsx +56 -0
- package/src/stories/itemTypes/Display.stories.tsx +39 -0
- package/src/stories/itemTypes/Group.stories.tsx +39 -0
- package/src/stories/itemTypes/Integer.stories.tsx +55 -0
- package/src/stories/itemTypes/OpenChoice.stories.tsx +64 -0
- package/src/stories/itemTypes/Quantity.stories.tsx +39 -0
- package/src/stories/itemTypes/Reference.stories.tsx +39 -0
- package/src/stories/itemTypes/String.stories.tsx +51 -0
- package/src/stories/itemTypes/Text.stories.tsx +51 -0
- package/src/stories/itemTypes/Time.stories.tsx +39 -0
- package/src/stories/itemTypes/Url.stories.tsx +39 -0
- package/src/stories/sdc/AdvancedAdditionalDisplayContent.stories.tsx +45 -0
- package/src/stories/sdc/AdvancedControlAppearance.stories.tsx +51 -0
- package/src/stories/sdc/AdvancedOther.stories.tsx +76 -0
- package/src/stories/sdc/AdvancedTextAppearance.stories.tsx +69 -0
- package/src/stories/sdc/BehaviorCalculations.stories.tsx +69 -0
- package/src/stories/sdc/BehaviorChoiceRestriction.stories.tsx +76 -0
- package/src/stories/sdc/BehaviorOther.stories.tsx +90 -0
- package/src/stories/sdc/BehaviorValueConstraints.stories.tsx +88 -0
- package/src/stories/sdc/ItemControlDisplay.stories.tsx +39 -0
- package/src/stories/sdc/ItemControlGroup.stories.tsx +55 -0
- package/src/stories/sdc/ItemControlQuestion.stories.tsx +118 -0
- package/src/utils/buildForm.ts +23 -0
- package/src/utils/choice.ts +16 -23
- package/src/utils/enableWhen.ts +5 -7
- package/src/utils/index.ts +1 -0
- package/src/utils/openChoice.ts +83 -98
- package/src/utils/tabs.ts +0 -75
- package/vite.config.ts +23 -0
- package/doctor-storybook.log +0 -18
- package/src/stories/SmartFormsRenderer.stories.ts +0 -139
- package/src/stories/assets/QItems-and-QRItems/QR_GTableMedicalHistory.json +0 -80
- package/src/stories/assets/QItems-and-QRItems/Q_GTableMedicalHistory.json +0 -109
- package/src/stories/assets/Qs-and-QRs/Q715.json +0 -15086
- package/src/stories/assets/Qs-and-QRs/QDev715.json +0 -16081
- package/src/stories/assets/Qs-and-QRs/QTestGrid.json +0 -411
- package/src/stories/assets/Qs-and-QRs/R715.json +0 -311
- package/src/stories/assets/Qs-and-QRs/RTestGrid.json +0 -34
|
@@ -0,0 +1,1149 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
3
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { Questionnaire } from 'fhir/r4';
|
|
19
|
+
|
|
20
|
+
export const qInitialSingle: Questionnaire = {
|
|
21
|
+
resourceType: 'Questionnaire',
|
|
22
|
+
id: 'InitialSingle',
|
|
23
|
+
name: 'InitialSingle',
|
|
24
|
+
title: 'Initial Single',
|
|
25
|
+
version: '0.1.0',
|
|
26
|
+
status: 'draft',
|
|
27
|
+
publisher: 'AEHRC CSIRO',
|
|
28
|
+
date: '2024-05-01',
|
|
29
|
+
url: 'https://smartforms.csiro.au/docs/behavior/other/initial-1',
|
|
30
|
+
item: [
|
|
31
|
+
{
|
|
32
|
+
linkId: 'patient-age',
|
|
33
|
+
text: 'Age',
|
|
34
|
+
type: 'integer',
|
|
35
|
+
initial: [
|
|
36
|
+
{
|
|
37
|
+
valueInteger: 30
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const qInitialRepeats: Questionnaire = {
|
|
45
|
+
resourceType: 'Questionnaire',
|
|
46
|
+
id: 'InitialRepeats',
|
|
47
|
+
name: 'InitialRepeats',
|
|
48
|
+
title: 'Initial Repeats',
|
|
49
|
+
version: '0.1.0',
|
|
50
|
+
status: 'draft',
|
|
51
|
+
publisher: 'AEHRC CSIRO',
|
|
52
|
+
date: '2024-05-01',
|
|
53
|
+
url: 'https://smartforms.csiro.au/docs/behavior/other/initial-2',
|
|
54
|
+
item: [
|
|
55
|
+
{
|
|
56
|
+
linkId: 'container',
|
|
57
|
+
text: '',
|
|
58
|
+
type: 'group',
|
|
59
|
+
repeats: false,
|
|
60
|
+
item: [
|
|
61
|
+
{
|
|
62
|
+
linkId: 'patient-age',
|
|
63
|
+
definition: 'http://hl7.org.au/fhir/StructureDefinition/au-address#Address.state',
|
|
64
|
+
text: 'Visited states',
|
|
65
|
+
type: 'choice',
|
|
66
|
+
repeats: true,
|
|
67
|
+
initial: [
|
|
68
|
+
{
|
|
69
|
+
valueCoding: {
|
|
70
|
+
system:
|
|
71
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
72
|
+
code: 'ACT',
|
|
73
|
+
display: 'Australian Capital Territory'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
valueCoding: {
|
|
78
|
+
system:
|
|
79
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
80
|
+
code: 'NSW',
|
|
81
|
+
display: 'New South Wales'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
valueCoding: {
|
|
86
|
+
system:
|
|
87
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
88
|
+
code: 'QLD',
|
|
89
|
+
display: 'Queensland'
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
valueCoding: {
|
|
94
|
+
system:
|
|
95
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
96
|
+
code: 'VIC',
|
|
97
|
+
display: 'Victoria'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
valueCoding: {
|
|
102
|
+
system:
|
|
103
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
104
|
+
code: 'TAS',
|
|
105
|
+
display: 'Tasmania'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
answerValueSet:
|
|
110
|
+
'https://healthterminologies.gov.au/fhir/ValueSet/australian-states-territories-2'
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export const qEnableWhen: Questionnaire = {
|
|
118
|
+
resourceType: 'Questionnaire',
|
|
119
|
+
id: 'EnableWhen',
|
|
120
|
+
name: 'EnableWhen',
|
|
121
|
+
title: 'Enable When',
|
|
122
|
+
version: '0.1.0',
|
|
123
|
+
status: 'draft',
|
|
124
|
+
publisher: 'AEHRC CSIRO',
|
|
125
|
+
date: '2024-05-01',
|
|
126
|
+
url: 'https://smartforms.csiro.au/docs/behavior/other/enable-when',
|
|
127
|
+
contained: [
|
|
128
|
+
{
|
|
129
|
+
resourceType: 'ValueSet',
|
|
130
|
+
id: 'YesNoNA',
|
|
131
|
+
url: 'https://smartforms.csiro.au/ig/ValueSet/YesNoNA',
|
|
132
|
+
name: 'YesNoNA',
|
|
133
|
+
title: 'Yes/No/NA',
|
|
134
|
+
status: 'draft',
|
|
135
|
+
experimental: false,
|
|
136
|
+
description: 'Concepts for Yes, No and Not applicable',
|
|
137
|
+
compose: {
|
|
138
|
+
include: [
|
|
139
|
+
{
|
|
140
|
+
system: 'http://terminology.hl7.org/CodeSystem/v2-0532',
|
|
141
|
+
concept: [
|
|
142
|
+
{
|
|
143
|
+
code: 'Y',
|
|
144
|
+
display: 'Yes'
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
code: 'N',
|
|
148
|
+
display: 'No'
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
code: 'NA',
|
|
152
|
+
display: 'N/A'
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
expansion: {
|
|
159
|
+
identifier: 'urn:uuid:5baa5444-e553-4412-a08c-9ce93d3271e0',
|
|
160
|
+
timestamp: '2023-09-01T11:16:50+10:00',
|
|
161
|
+
total: 3,
|
|
162
|
+
parameter: [
|
|
163
|
+
{
|
|
164
|
+
name: 'version',
|
|
165
|
+
valueUri: 'http://terminology.hl7.org/CodeSystem/v2-0532|2.1.0'
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: 'used-codesystem',
|
|
169
|
+
valueUri: 'http://terminology.hl7.org/CodeSystem/v2-0532|2.1.0'
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
contains: [
|
|
173
|
+
{
|
|
174
|
+
system: 'http://terminology.hl7.org/CodeSystem/v2-0532',
|
|
175
|
+
code: 'Y',
|
|
176
|
+
display: 'Yes'
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
system: 'http://terminology.hl7.org/CodeSystem/v2-0532',
|
|
180
|
+
code: 'N',
|
|
181
|
+
display: 'No'
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
system: 'http://terminology.hl7.org/CodeSystem/v2-0532',
|
|
185
|
+
code: 'NA',
|
|
186
|
+
display: 'N/A'
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
resourceType: 'ValueSet',
|
|
193
|
+
id: 'AboriginalTorresStraitIslander',
|
|
194
|
+
url: 'https://smartforms.csiro.au/ig/ValueSet/AboriginalTorresStraitIslander',
|
|
195
|
+
name: 'AboriginalTorresStraitIslander',
|
|
196
|
+
title: 'Aboriginal and/or Torres Strait Islander',
|
|
197
|
+
status: 'draft',
|
|
198
|
+
experimental: false,
|
|
199
|
+
description:
|
|
200
|
+
'The Aboriginal and/or Torres Strait Islander value set includes the Australian Indigenous statuses for Indigenous people.',
|
|
201
|
+
compose: {
|
|
202
|
+
include: [
|
|
203
|
+
{
|
|
204
|
+
system:
|
|
205
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-indigenous-status-1',
|
|
206
|
+
concept: [
|
|
207
|
+
{
|
|
208
|
+
code: '1',
|
|
209
|
+
display: 'Aboriginal'
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
code: '2',
|
|
213
|
+
display: 'Torres Strait Islander'
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
code: '3',
|
|
217
|
+
display: 'Aboriginal and Torres Strait Islander'
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
expansion: {
|
|
224
|
+
identifier: 'e2b013bd-1725-4299-a7a5-53635d42f1be',
|
|
225
|
+
timestamp: '2022-10-20T11:38:45+10:00',
|
|
226
|
+
total: 3,
|
|
227
|
+
offset: 0,
|
|
228
|
+
parameter: [
|
|
229
|
+
{
|
|
230
|
+
name: 'version',
|
|
231
|
+
valueUri:
|
|
232
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-indigenous-status-1|1.0.3'
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: 'count',
|
|
236
|
+
valueInteger: 2147483647
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: 'offset',
|
|
240
|
+
valueInteger: 0
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
contains: [
|
|
244
|
+
{
|
|
245
|
+
system:
|
|
246
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-indigenous-status-1',
|
|
247
|
+
code: '1',
|
|
248
|
+
display: 'Aboriginal but not Torres Strait Islander origin'
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
system:
|
|
252
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-indigenous-status-1',
|
|
253
|
+
code: '2',
|
|
254
|
+
display: 'Torres Strait Islander but not Aboriginal origin'
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
system:
|
|
258
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-indigenous-status-1',
|
|
259
|
+
code: '3',
|
|
260
|
+
display: 'Both Aboriginal and Torres Strait Islander origin'
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
item: [
|
|
267
|
+
{
|
|
268
|
+
linkId: 'a8143230-b30d-4b85-9805-5f2f73f2dffa',
|
|
269
|
+
text: 'My Aged Care',
|
|
270
|
+
type: 'group',
|
|
271
|
+
repeats: false,
|
|
272
|
+
item: [
|
|
273
|
+
{
|
|
274
|
+
extension: [
|
|
275
|
+
{
|
|
276
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
277
|
+
valueCodeableConcept: {
|
|
278
|
+
coding: [
|
|
279
|
+
{
|
|
280
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
281
|
+
code: 'radio-button'
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation',
|
|
288
|
+
valueCode: 'horizontal'
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
linkId: 'registered-for-my-aged-care',
|
|
292
|
+
text: 'Registered for My Aged Care',
|
|
293
|
+
type: 'choice',
|
|
294
|
+
repeats: false,
|
|
295
|
+
answerValueSet: '#YesNoNA'
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
linkId: 'my-aged-care-number',
|
|
299
|
+
text: 'My Aged Care Number',
|
|
300
|
+
type: 'string',
|
|
301
|
+
enableWhen: [
|
|
302
|
+
{
|
|
303
|
+
question: 'registered-for-my-aged-care',
|
|
304
|
+
operator: '=',
|
|
305
|
+
answerCoding: {
|
|
306
|
+
system: 'http://terminology.hl7.org/CodeSystem/v2-0136',
|
|
307
|
+
code: 'Y'
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
repeats: false
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
export const qEnableBehaviorAll: Questionnaire = {
|
|
319
|
+
resourceType: 'Questionnaire',
|
|
320
|
+
id: 'EnableBehaviorAll',
|
|
321
|
+
name: 'EnableBehaviorAll',
|
|
322
|
+
title: 'Enable Behavior All',
|
|
323
|
+
version: '0.1.0',
|
|
324
|
+
status: 'draft',
|
|
325
|
+
publisher: 'AEHRC CSIRO',
|
|
326
|
+
date: '2024-05-01',
|
|
327
|
+
url: 'https://smartforms.csiro.au/docs/behavior/other/enable-behavior-all',
|
|
328
|
+
item: [
|
|
329
|
+
{
|
|
330
|
+
linkId: 'has-heart-disease',
|
|
331
|
+
text: 'Do you have a history of heart disease?',
|
|
332
|
+
type: 'boolean'
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
linkId: 'has-heart-condition',
|
|
336
|
+
text: 'Are you currently taking any medications?',
|
|
337
|
+
type: 'boolean',
|
|
338
|
+
enableWhen: [
|
|
339
|
+
{
|
|
340
|
+
question: 'has-heart-disease',
|
|
341
|
+
operator: '=',
|
|
342
|
+
answerBoolean: true
|
|
343
|
+
}
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
linkId: 'medication-list',
|
|
348
|
+
text: 'What medications are you currently taking?',
|
|
349
|
+
type: 'string',
|
|
350
|
+
enableWhen: [
|
|
351
|
+
{
|
|
352
|
+
question: 'has-heart-disease',
|
|
353
|
+
operator: '=',
|
|
354
|
+
answerBoolean: true
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
question: 'has-heart-condition',
|
|
358
|
+
operator: '=',
|
|
359
|
+
answerBoolean: true
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
enableBehavior: 'all'
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
export const qEnableBehaviorAny: Questionnaire = {
|
|
368
|
+
resourceType: 'Questionnaire',
|
|
369
|
+
id: 'EnableBehaviorAny',
|
|
370
|
+
name: 'EnableBehaviorAny',
|
|
371
|
+
title: 'Enable Behavior Any',
|
|
372
|
+
version: '0.1.0',
|
|
373
|
+
status: 'draft',
|
|
374
|
+
publisher: 'AEHRC CSIRO',
|
|
375
|
+
date: '2024-05-01',
|
|
376
|
+
url: 'https://smartforms.csiro.au/docs/behavior/other/enable-behavior-any',
|
|
377
|
+
item: [
|
|
378
|
+
{
|
|
379
|
+
extension: [
|
|
380
|
+
{
|
|
381
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
382
|
+
valueCodeableConcept: {
|
|
383
|
+
coding: [
|
|
384
|
+
{
|
|
385
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
386
|
+
code: 'radio-button'
|
|
387
|
+
}
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
linkId: 'smoking-status',
|
|
393
|
+
text: 'Smoking status',
|
|
394
|
+
type: 'choice',
|
|
395
|
+
repeats: false,
|
|
396
|
+
answerOption: [
|
|
397
|
+
{
|
|
398
|
+
valueCoding: {
|
|
399
|
+
system: 'http://snomed.info/sct',
|
|
400
|
+
code: '266919005',
|
|
401
|
+
display: 'Never smoked'
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
valueCoding: {
|
|
406
|
+
system: 'http://snomed.info/sct',
|
|
407
|
+
code: '77176002',
|
|
408
|
+
display: 'Smoker'
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
valueCoding: {
|
|
413
|
+
system: 'http://snomed.info/sct',
|
|
414
|
+
code: '8517006',
|
|
415
|
+
display: 'Ex-smoker'
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
valueCoding: {
|
|
420
|
+
system: 'http://snomed.info/sct',
|
|
421
|
+
code: '16090371000119103',
|
|
422
|
+
display: 'Exposure to second hand tobacco smoke'
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
valueString: 'Wants to quit'
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
valueString: 'Other tobacco use'
|
|
430
|
+
}
|
|
431
|
+
]
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
linkId: 'how-long-as-a-smoker',
|
|
435
|
+
text: 'How long as a smoker?',
|
|
436
|
+
type: 'string',
|
|
437
|
+
enableWhen: [
|
|
438
|
+
{
|
|
439
|
+
question: 'smoking-status',
|
|
440
|
+
operator: '=',
|
|
441
|
+
answerCoding: {
|
|
442
|
+
system: 'http://snomed.info/sct',
|
|
443
|
+
code: '77176002'
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
question: 'smoking-status',
|
|
448
|
+
operator: '=',
|
|
449
|
+
answerCoding: {
|
|
450
|
+
system: 'http://snomed.info/sct',
|
|
451
|
+
code: '8517006'
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
question: 'smoking-status',
|
|
456
|
+
operator: '=',
|
|
457
|
+
answerString: 'Wants to quit'
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
enableBehavior: 'any'
|
|
461
|
+
}
|
|
462
|
+
]
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
export const qEnableWhenExpressionSimple: Questionnaire = {
|
|
466
|
+
resourceType: 'Questionnaire',
|
|
467
|
+
id: 'EnableWhenExpressionSimple',
|
|
468
|
+
name: 'EnableWhenExpressionSimple',
|
|
469
|
+
title: 'Enable When Expression Simple Example',
|
|
470
|
+
version: '0.1.0',
|
|
471
|
+
status: 'draft',
|
|
472
|
+
publisher: 'AEHRC CSIRO',
|
|
473
|
+
date: '2024-05-01',
|
|
474
|
+
url: 'https://smartforms.csiro.au/docs/behavior/other/enable-when-expression-1',
|
|
475
|
+
item: [
|
|
476
|
+
{
|
|
477
|
+
extension: [
|
|
478
|
+
{
|
|
479
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
480
|
+
valueExpression: {
|
|
481
|
+
name: 'age',
|
|
482
|
+
language: 'text/fhirpath',
|
|
483
|
+
expression: "item.where(linkId='patient-age').answer.value"
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
],
|
|
487
|
+
linkId: 'container',
|
|
488
|
+
text: 'Finalising the health check',
|
|
489
|
+
type: 'group',
|
|
490
|
+
repeats: false,
|
|
491
|
+
item: [
|
|
492
|
+
{
|
|
493
|
+
linkId: 'patient-age-instructions',
|
|
494
|
+
_text: {
|
|
495
|
+
extension: [
|
|
496
|
+
{
|
|
497
|
+
url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
|
|
498
|
+
valueString:
|
|
499
|
+
'<div xmlns="http://www.w3.org/1999/xhtml">\r\n <p style="font-size:0.875em">Feel free to play around with the age value according to different age groups:</p><ul style="font-size:0.875em">\r\n <li >Less or equal to 5</li>\r\n <li>6 to 12</li>\r\n <li>12 to 24</li>\r\n <li>24 to 49</li>\r\n <li>More or equal to 49</li>\r\n</ul></div>'
|
|
500
|
+
}
|
|
501
|
+
]
|
|
502
|
+
},
|
|
503
|
+
text: 'Feel free to play around with the age value according to different age groups i.e. <=5, 6-12, 12-24, 24-49, >49',
|
|
504
|
+
type: 'display',
|
|
505
|
+
repeats: false
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
linkId: 'patient-age',
|
|
509
|
+
text: 'Age',
|
|
510
|
+
type: 'integer',
|
|
511
|
+
repeats: false
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
extension: [
|
|
515
|
+
{
|
|
516
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
517
|
+
valueExpression: {
|
|
518
|
+
language: 'text/fhirpath',
|
|
519
|
+
expression: '%age <= 5'
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
],
|
|
523
|
+
linkId: 'patient-priorities-less-than-6',
|
|
524
|
+
text: 'Patient priorities and goals: What does the parent/carer say are the important things that have come out of this health check?',
|
|
525
|
+
type: 'text',
|
|
526
|
+
repeats: false
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
extension: [
|
|
530
|
+
{
|
|
531
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
532
|
+
valueExpression: {
|
|
533
|
+
language: 'text/fhirpath',
|
|
534
|
+
expression: '(%age <= 12).intersect(%age > 5)'
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
],
|
|
538
|
+
linkId: 'patient-priorities-6-to-12',
|
|
539
|
+
text: 'Patient priorities and goals: What does the parent/carer and child say are the important things that have come out of this health check?',
|
|
540
|
+
type: 'text',
|
|
541
|
+
repeats: false
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
extension: [
|
|
545
|
+
{
|
|
546
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
547
|
+
valueExpression: {
|
|
548
|
+
language: 'text/fhirpath',
|
|
549
|
+
expression: '%age > 12'
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
linkId: 'patient-priorities-more-than-12',
|
|
554
|
+
text: 'Patient priorities and goals: What does the patient say are the important things that have come out of this health check?',
|
|
555
|
+
type: 'text',
|
|
556
|
+
repeats: false
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
extension: [
|
|
560
|
+
{
|
|
561
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
562
|
+
valueExpression: {
|
|
563
|
+
language: 'text/fhirpath',
|
|
564
|
+
expression: '%age <= 5'
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
569
|
+
valueCodeableConcept: {
|
|
570
|
+
coding: [
|
|
571
|
+
{
|
|
572
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
573
|
+
code: 'check-box'
|
|
574
|
+
}
|
|
575
|
+
]
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel',
|
|
580
|
+
valueString: 'Other'
|
|
581
|
+
}
|
|
582
|
+
],
|
|
583
|
+
linkId: 'brief-intervention-less-than-6',
|
|
584
|
+
text: 'Brief intervention: advice and information provided during health check',
|
|
585
|
+
type: 'open-choice',
|
|
586
|
+
repeats: true,
|
|
587
|
+
answerOption: [
|
|
588
|
+
{
|
|
589
|
+
valueString: 'Sugary drinks'
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
valueString: 'Screen use'
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
valueString: 'Healthy eating, including breastfeeding'
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
valueString: 'Environmental exposure to harmful elements eg tobacco smoke'
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
valueString: 'Physical activity and exercise'
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
valueString: 'Sun protection'
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
valueString: 'Parenting advice'
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
valueString: 'Safe sleeping practices'
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
valueString: 'Developmental milestones - including language and hearing'
|
|
614
|
+
}
|
|
615
|
+
]
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
extension: [
|
|
619
|
+
{
|
|
620
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
621
|
+
valueExpression: {
|
|
622
|
+
language: 'text/fhirpath',
|
|
623
|
+
expression: '(%age <= 12).intersect(%age > 5)'
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
628
|
+
valueCodeableConcept: {
|
|
629
|
+
coding: [
|
|
630
|
+
{
|
|
631
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
632
|
+
code: 'check-box'
|
|
633
|
+
}
|
|
634
|
+
]
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel',
|
|
639
|
+
valueString: 'Other'
|
|
640
|
+
}
|
|
641
|
+
],
|
|
642
|
+
linkId: 'brief-intervention-6-to-12',
|
|
643
|
+
text: 'Brief intervention: advice and information provided during health check',
|
|
644
|
+
type: 'open-choice',
|
|
645
|
+
repeats: true,
|
|
646
|
+
answerOption: [
|
|
647
|
+
{
|
|
648
|
+
valueString: 'Healthy eating'
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
valueString: 'Screen use'
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
valueString: 'Sun protection'
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
valueString: 'Environmental exposure to harmful elements (e.g. tobacco smoke)'
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
valueString: 'Sugary drinks'
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
valueString: 'Physical activity and exercise'
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
valueString: 'Parenting advice'
|
|
667
|
+
}
|
|
668
|
+
]
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
extension: [
|
|
672
|
+
{
|
|
673
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
674
|
+
valueExpression: {
|
|
675
|
+
language: 'text/fhirpath',
|
|
676
|
+
expression: '(%age <= 24).intersect(%age > 12)'
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
681
|
+
valueCodeableConcept: {
|
|
682
|
+
coding: [
|
|
683
|
+
{
|
|
684
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
685
|
+
code: 'check-box'
|
|
686
|
+
}
|
|
687
|
+
]
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel',
|
|
692
|
+
valueString: 'Other'
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
linkId: 'brief-intervention-13-to-24',
|
|
696
|
+
text: 'Brief intervention: advice and information provided during health check',
|
|
697
|
+
type: 'open-choice',
|
|
698
|
+
repeats: true,
|
|
699
|
+
answerOption: [
|
|
700
|
+
{
|
|
701
|
+
valueString: 'Healthy eating'
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
valueString: 'Screen use'
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
valueString: 'Physical activity and exercise'
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
valueString: 'Mental health and wellbeing'
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
valueString: 'Safety/risky behaviours'
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
valueString: 'Smoking cessation'
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
valueString: 'Substance use/harm minimisation'
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
valueString: 'Safe sex/contraception'
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
valueString: 'Care of teeth and gums'
|
|
726
|
+
}
|
|
727
|
+
]
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
extension: [
|
|
731
|
+
{
|
|
732
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
733
|
+
valueExpression: {
|
|
734
|
+
language: 'text/fhirpath',
|
|
735
|
+
expression: '(%age <= 49).intersect(%age > 24)'
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
740
|
+
valueCodeableConcept: {
|
|
741
|
+
coding: [
|
|
742
|
+
{
|
|
743
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
744
|
+
code: 'check-box'
|
|
745
|
+
}
|
|
746
|
+
]
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel',
|
|
751
|
+
valueString: 'Other'
|
|
752
|
+
}
|
|
753
|
+
],
|
|
754
|
+
linkId: 'brief-intervention-25-to-49',
|
|
755
|
+
text: 'Brief intervention: advice and information provided during health check',
|
|
756
|
+
type: 'open-choice',
|
|
757
|
+
repeats: true,
|
|
758
|
+
answerOption: [
|
|
759
|
+
{
|
|
760
|
+
valueString: 'Healthy eating'
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
valueString: 'Screen use'
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
valueString: 'Physical activity and exercise'
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
valueString: 'Mental health and wellbeing'
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
valueString: 'Carer support'
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
valueString: 'Safety/risky behaviours'
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
valueString: 'Smoking cessation'
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
valueString: 'Substance use/harm minimisation'
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
valueString: 'Safe sex/contraception'
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
valueString: 'Oral and dental health'
|
|
788
|
+
}
|
|
789
|
+
]
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
extension: [
|
|
793
|
+
{
|
|
794
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
795
|
+
valueExpression: {
|
|
796
|
+
language: 'text/fhirpath',
|
|
797
|
+
expression: '%age > 49'
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
802
|
+
valueCodeableConcept: {
|
|
803
|
+
coding: [
|
|
804
|
+
{
|
|
805
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
806
|
+
code: 'check-box'
|
|
807
|
+
}
|
|
808
|
+
]
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel',
|
|
813
|
+
valueString: 'Other'
|
|
814
|
+
}
|
|
815
|
+
],
|
|
816
|
+
linkId: 'brief-intervention-more-than-49',
|
|
817
|
+
text: 'Brief intervention: advice and information provided during health check',
|
|
818
|
+
type: 'open-choice',
|
|
819
|
+
repeats: true,
|
|
820
|
+
answerOption: [
|
|
821
|
+
{
|
|
822
|
+
valueString: 'Healthy eating'
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
valueString: 'Physical activity and exercise'
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
valueString: 'Mental health and wellbeing'
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
valueString: 'Carer support'
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
valueString: 'Smoking cessation'
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
valueString: 'Substance use/harm minimisation'
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
valueString: 'Social support and services'
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
valueString: 'Oral and dental health'
|
|
844
|
+
}
|
|
845
|
+
]
|
|
846
|
+
}
|
|
847
|
+
]
|
|
848
|
+
}
|
|
849
|
+
]
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
export const qEnableWhenExpressionTabs: Questionnaire = {
|
|
853
|
+
resourceType: 'Questionnaire',
|
|
854
|
+
id: 'EnableWhenExpressionTabs',
|
|
855
|
+
name: 'EnableWhenExpressionTabs',
|
|
856
|
+
title: 'Enable When Expression Tabs',
|
|
857
|
+
version: '0.1.0',
|
|
858
|
+
status: 'draft',
|
|
859
|
+
publisher: 'AEHRC CSIRO',
|
|
860
|
+
date: '2024-05-01',
|
|
861
|
+
url: 'https://smartforms.csiro.au/docs/behavior/other/enable-when-expression-2',
|
|
862
|
+
item: [
|
|
863
|
+
{
|
|
864
|
+
extension: [
|
|
865
|
+
{
|
|
866
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
867
|
+
valueCodeableConcept: {
|
|
868
|
+
coding: [
|
|
869
|
+
{
|
|
870
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
871
|
+
version: '1.0.0',
|
|
872
|
+
code: 'tab-container'
|
|
873
|
+
}
|
|
874
|
+
]
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
879
|
+
valueExpression: {
|
|
880
|
+
name: 'age',
|
|
881
|
+
language: 'text/fhirpath',
|
|
882
|
+
expression:
|
|
883
|
+
"item.where(linkId='patient-details').item.where(linkId='patient-age').answer.value"
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
],
|
|
887
|
+
linkId: 'tab-container',
|
|
888
|
+
type: 'group',
|
|
889
|
+
item: [
|
|
890
|
+
{
|
|
891
|
+
extension: [
|
|
892
|
+
{
|
|
893
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
894
|
+
valueExpression: {
|
|
895
|
+
language: 'text/fhirpath',
|
|
896
|
+
expression: '%age.exists()'
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
],
|
|
900
|
+
linkId: 'about-health-check',
|
|
901
|
+
text: 'About the health check',
|
|
902
|
+
type: 'group',
|
|
903
|
+
repeats: false,
|
|
904
|
+
item: [
|
|
905
|
+
{
|
|
906
|
+
linkId: 'about-health-check-display',
|
|
907
|
+
text: 'This section contains fields about the status of current and previous health checks.',
|
|
908
|
+
type: 'display',
|
|
909
|
+
repeats: false
|
|
910
|
+
}
|
|
911
|
+
]
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
extension: [
|
|
915
|
+
{
|
|
916
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
917
|
+
valueExpression: {
|
|
918
|
+
language: 'text/fhirpath',
|
|
919
|
+
expression: '%age.exists()'
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
],
|
|
923
|
+
linkId: 'consent',
|
|
924
|
+
text: 'Consent',
|
|
925
|
+
type: 'group',
|
|
926
|
+
repeats: false,
|
|
927
|
+
item: [
|
|
928
|
+
{
|
|
929
|
+
linkId: 'consent-display',
|
|
930
|
+
text: "This section contains fields about the patient's consent to the health check.",
|
|
931
|
+
type: 'display',
|
|
932
|
+
repeats: false
|
|
933
|
+
}
|
|
934
|
+
]
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
linkId: 'patient-details',
|
|
938
|
+
text: 'Patient Details',
|
|
939
|
+
type: 'group',
|
|
940
|
+
repeats: false,
|
|
941
|
+
item: [
|
|
942
|
+
{
|
|
943
|
+
linkId: 'patient-age-instructions',
|
|
944
|
+
_text: {
|
|
945
|
+
extension: [
|
|
946
|
+
{
|
|
947
|
+
url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
|
|
948
|
+
valueString:
|
|
949
|
+
'<div xmlns="http://www.w3.org/1999/xhtml">\r\n <p style="font-size:0.875em">Feel free to play around with the age value according to different age groups:</p><ul style="font-size:0.875em">\r\n <li >Less or equal to 5</li>\r\n <li>6 to 12</li>\r\n <li>13 to 24</li>\r\n <li>25 to 49</li>\r\n <li>More or equal to 49</li>\r\n</ul></div>'
|
|
950
|
+
}
|
|
951
|
+
]
|
|
952
|
+
},
|
|
953
|
+
text: 'Feel free to play around with the age value according to different age groups i.e. <=5, 6-12, 13-24, 25-49, >49',
|
|
954
|
+
type: 'display',
|
|
955
|
+
repeats: false
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
linkId: 'patient-age',
|
|
959
|
+
text: 'Age',
|
|
960
|
+
type: 'integer',
|
|
961
|
+
repeats: false
|
|
962
|
+
}
|
|
963
|
+
]
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
extension: [
|
|
967
|
+
{
|
|
968
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText',
|
|
969
|
+
valueString: 'Current priorities'
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
973
|
+
valueExpression: {
|
|
974
|
+
language: 'text/fhirpath',
|
|
975
|
+
expression: '%age.exists()'
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
],
|
|
979
|
+
linkId: 'current-priorities',
|
|
980
|
+
text: 'Current health/patient priorities',
|
|
981
|
+
type: 'group',
|
|
982
|
+
repeats: false,
|
|
983
|
+
item: [
|
|
984
|
+
{
|
|
985
|
+
linkId: 'current-priorities-display',
|
|
986
|
+
text: "This section contains fields about the patient's current health priorities.",
|
|
987
|
+
type: 'display',
|
|
988
|
+
repeats: false
|
|
989
|
+
}
|
|
990
|
+
]
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
extension: [
|
|
994
|
+
{
|
|
995
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
996
|
+
valueExpression: {
|
|
997
|
+
language: 'text/fhirpath',
|
|
998
|
+
expression: '%age.exists()'
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
],
|
|
1002
|
+
linkId: 'medical-history',
|
|
1003
|
+
text: 'Medical history and current problems',
|
|
1004
|
+
type: 'group',
|
|
1005
|
+
repeats: false,
|
|
1006
|
+
item: [
|
|
1007
|
+
{
|
|
1008
|
+
linkId: 'medical-history-display',
|
|
1009
|
+
text: "This section contains fields about the patient's medical history and current problems.",
|
|
1010
|
+
type: 'display',
|
|
1011
|
+
repeats: false
|
|
1012
|
+
}
|
|
1013
|
+
]
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
extension: [
|
|
1017
|
+
{
|
|
1018
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
1019
|
+
valueExpression: {
|
|
1020
|
+
language: 'text/fhirpath',
|
|
1021
|
+
expression: '%age <= 5'
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
],
|
|
1025
|
+
linkId: 'red-flags-early-identification',
|
|
1026
|
+
text: 'Red flags early identification guide for children',
|
|
1027
|
+
type: 'group',
|
|
1028
|
+
repeats: false,
|
|
1029
|
+
item: [
|
|
1030
|
+
{
|
|
1031
|
+
linkId: 'red-flags-early-identification-display',
|
|
1032
|
+
text: 'This section contains fields to provide guidance on identifiying early red flags in children.',
|
|
1033
|
+
type: 'display',
|
|
1034
|
+
repeats: false
|
|
1035
|
+
}
|
|
1036
|
+
]
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
extension: [
|
|
1040
|
+
{
|
|
1041
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
1042
|
+
valueExpression: {
|
|
1043
|
+
language: 'text/fhirpath',
|
|
1044
|
+
expression: '%age >= 12'
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
],
|
|
1048
|
+
linkId: 'substance-use',
|
|
1049
|
+
text: 'Substance use, including tobacco',
|
|
1050
|
+
type: 'group',
|
|
1051
|
+
repeats: false,
|
|
1052
|
+
item: [
|
|
1053
|
+
{
|
|
1054
|
+
linkId: 'substance-use-display',
|
|
1055
|
+
text: "This section contains fields about a patient's substance and tobacco use.",
|
|
1056
|
+
type: 'display',
|
|
1057
|
+
repeats: false
|
|
1058
|
+
}
|
|
1059
|
+
]
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
extension: [
|
|
1063
|
+
{
|
|
1064
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
1065
|
+
valueExpression: {
|
|
1066
|
+
language: 'text/fhirpath',
|
|
1067
|
+
expression: '(%age > 12).intersect(%age <= 24)'
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText',
|
|
1072
|
+
valueString: 'Sexual health'
|
|
1073
|
+
}
|
|
1074
|
+
],
|
|
1075
|
+
linkId: 'sexual-health',
|
|
1076
|
+
text: 'Sexual health (sexual activity, contraception, safe sex/protection, sexual orientation, gender identity, pressure to have sex, STIs)',
|
|
1077
|
+
type: 'group',
|
|
1078
|
+
repeats: false,
|
|
1079
|
+
item: [
|
|
1080
|
+
{
|
|
1081
|
+
linkId: 'sexual-health-display',
|
|
1082
|
+
text: "This section contains fields about a patient's sexual health, including sexual activity, contraception, safe sex/protection, sexual orientation, gender identity, pressure to have sex, STIs.",
|
|
1083
|
+
type: 'display',
|
|
1084
|
+
repeats: false
|
|
1085
|
+
}
|
|
1086
|
+
]
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
extension: [
|
|
1090
|
+
{
|
|
1091
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression',
|
|
1092
|
+
valueExpression: {
|
|
1093
|
+
language: 'text/fhirpath',
|
|
1094
|
+
expression: '%age >= 50'
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
],
|
|
1098
|
+
linkId: 'genitourinary-and-sexual-health',
|
|
1099
|
+
text: 'Genitourinary and sexual health',
|
|
1100
|
+
type: 'group',
|
|
1101
|
+
repeats: false,
|
|
1102
|
+
item: [
|
|
1103
|
+
{
|
|
1104
|
+
linkId: 'genitourinary-and-sexual-health-display',
|
|
1105
|
+
text: "This section contains fields about a patient's genitourinary and sexual health",
|
|
1106
|
+
type: 'display',
|
|
1107
|
+
repeats: false
|
|
1108
|
+
}
|
|
1109
|
+
]
|
|
1110
|
+
}
|
|
1111
|
+
]
|
|
1112
|
+
}
|
|
1113
|
+
]
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
export const qText: Questionnaire = {
|
|
1117
|
+
resourceType: 'Questionnaire',
|
|
1118
|
+
id: 'Text',
|
|
1119
|
+
name: 'Text',
|
|
1120
|
+
title: 'Text',
|
|
1121
|
+
version: '0.1.0',
|
|
1122
|
+
status: 'draft',
|
|
1123
|
+
publisher: 'AEHRC CSIRO',
|
|
1124
|
+
date: '2024-05-01',
|
|
1125
|
+
url: 'https://smartforms.csiro.au/docs/behavior/other/text',
|
|
1126
|
+
item: [
|
|
1127
|
+
{
|
|
1128
|
+
linkId: 'text-normal',
|
|
1129
|
+
text: 'This sentence is an example of a normal usage of text.',
|
|
1130
|
+
type: 'display',
|
|
1131
|
+
repeats: false
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
linkId: 'text-xhtml',
|
|
1135
|
+
_text: {
|
|
1136
|
+
extension: [
|
|
1137
|
+
{
|
|
1138
|
+
url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
|
|
1139
|
+
valueString:
|
|
1140
|
+
'<div xmlns="http://www.w3.org/1999/xhtml">\r\n <p>This sentence is an example of a text using the rendering-xhtml extension.</p></div>'
|
|
1141
|
+
}
|
|
1142
|
+
]
|
|
1143
|
+
},
|
|
1144
|
+
text: 'This sentence is an example of a text using the rendering-xhtml extension.',
|
|
1145
|
+
type: 'display',
|
|
1146
|
+
repeats: false
|
|
1147
|
+
}
|
|
1148
|
+
]
|
|
1149
|
+
};
|