@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.
Files changed (179) hide show
  1. package/.storybook/main.ts +2 -1
  2. package/.storybook/preview.ts +6 -1
  3. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.d.ts +3 -2
  4. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js +9 -17
  5. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js.map +1 -1
  6. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +12 -9
  7. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
  8. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.d.ts +2 -2
  9. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js +7 -9
  10. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js.map +1 -1
  11. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +12 -8
  12. package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
  13. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.d.ts +2 -1
  14. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js +3 -3
  15. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js.map +1 -1
  16. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js +6 -4
  17. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js.map +1 -1
  18. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.d.ts +2 -1
  19. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.js +3 -3
  20. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.js.map +1 -1
  21. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.d.ts +2 -2
  22. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js +5 -7
  23. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js.map +1 -1
  24. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js +4 -4
  25. package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js.map +1 -1
  26. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.d.ts +2 -1
  27. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js +2 -3
  28. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js.map +1 -1
  29. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js +5 -3
  30. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js.map +1 -1
  31. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.d.ts +2 -1
  32. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js +3 -3
  33. package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js.map +1 -1
  34. package/lib/components/FormComponents/DecimalItem/DecimalItem.js +1 -1
  35. package/lib/components/FormComponents/GroupItem/TabButtonsWrapper.js +20 -20
  36. package/lib/components/FormComponents/GroupItem/TabButtonsWrapper.js.map +1 -1
  37. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.d.ts +3 -2
  38. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js +7 -19
  39. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js.map +1 -1
  40. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +40 -40
  41. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
  42. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +15 -3
  43. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
  44. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.d.ts +2 -1
  45. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js +3 -3
  46. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js.map +1 -1
  47. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js +27 -26
  48. package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js.map +1 -1
  49. package/lib/components/FormComponents/StringItem/StringField.js +1 -1
  50. package/lib/components/FormComponents/StringItem/StringField.js.map +1 -1
  51. package/lib/hooks/useInitialiseRenderer.js +1 -1
  52. package/lib/hooks/useInitialiseRenderer.js.map +1 -1
  53. package/lib/hooks/useNextAndPreviousVisibleTabs.d.ts +7 -0
  54. package/lib/hooks/useNextAndPreviousVisibleTabs.js +63 -0
  55. package/lib/hooks/useNextAndPreviousVisibleTabs.js.map +1 -0
  56. package/lib/hooks/useNextPreviousVisibleTabs.d.ts +6 -0
  57. package/lib/hooks/useNextPreviousVisibleTabs.js +63 -0
  58. package/lib/hooks/useNextPreviousVisibleTabs.js.map +1 -0
  59. package/lib/index.d.ts +0 -7
  60. package/lib/index.js +0 -24
  61. package/lib/index.js.map +1 -1
  62. package/lib/utils/choice.d.ts +1 -7
  63. package/lib/utils/choice.js +10 -20
  64. package/lib/utils/choice.js.map +1 -1
  65. package/lib/utils/enableWhen.js +5 -7
  66. package/lib/utils/enableWhen.js.map +1 -1
  67. package/lib/utils/index.d.ts +1 -0
  68. package/lib/utils/index.js +1 -0
  69. package/lib/utils/index.js.map +1 -1
  70. package/lib/utils/openChoice.d.ts +9 -4
  71. package/lib/utils/openChoice.js +47 -78
  72. package/lib/utils/openChoice.js.map +1 -1
  73. package/lib/utils/tabs.d.ts +0 -21
  74. package/lib/utils/tabs.js +0 -51
  75. package/lib/utils/tabs.js.map +1 -1
  76. package/package.json +4 -4
  77. package/src/components/FormComponents/ChoiceItems/CheckboxOptionList.tsx +82 -0
  78. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.tsx +23 -52
  79. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +15 -9
  80. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.tsx +17 -19
  81. package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +13 -8
  82. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.tsx +5 -4
  83. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +6 -2
  84. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.tsx +5 -1
  85. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.tsx +9 -16
  86. package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +4 -4
  87. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.tsx +4 -3
  88. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +5 -2
  89. package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.tsx +5 -1
  90. package/src/components/FormComponents/DecimalItem/DecimalItem.tsx +1 -1
  91. package/src/components/FormComponents/GroupItem/TabButtonsWrapper.tsx +28 -25
  92. package/src/components/FormComponents/ItemParts/{RadioAnswerOptionButtons.tsx → RadioOptionList.tsx} +7 -7
  93. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.tsx +18 -50
  94. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +70 -68
  95. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetFields.tsx +110 -0
  96. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.tsx +188 -0
  97. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +46 -19
  98. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.tsx +5 -3
  99. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.tsx +37 -29
  100. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetFields.tsx +104 -0
  101. package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.tsx +156 -0
  102. package/src/components/FormComponents/StringItem/StringField.tsx +1 -1
  103. package/src/hooks/useInitialiseRenderer.ts +1 -1
  104. package/src/hooks/useNextAndPreviousVisibleTabs.ts +86 -0
  105. package/src/hooks/useOpenLabel.ts +43 -0
  106. package/src/index.ts +0 -21
  107. package/src/stories/BuildFormWrapper.tsx +57 -0
  108. package/src/stories/assets/questionnaires/QAdvancedAdditionalDisplayContent.ts +83 -0
  109. package/src/stories/assets/questionnaires/QAdvancedControlAppearance.ts +294 -0
  110. package/src/stories/assets/questionnaires/QAdvancedOther.ts +495 -0
  111. package/src/stories/assets/questionnaires/QAdvancedTextApperance.ts +188 -0
  112. package/src/stories/assets/questionnaires/QAttachment.ts +38 -0
  113. package/src/stories/assets/questionnaires/QBehaviorCalculations.ts +645 -0
  114. package/src/stories/assets/questionnaires/QBehaviorChoiceRestriction.ts +281 -0
  115. package/src/stories/assets/questionnaires/QBehaviorOther.ts +1149 -0
  116. package/src/stories/assets/questionnaires/QBehaviorValueConstraints.ts +508 -0
  117. package/src/stories/assets/questionnaires/QBoolean.ts +130 -0
  118. package/src/stories/assets/questionnaires/QChoice.ts +137 -0
  119. package/src/stories/assets/questionnaires/QDate.ts +56 -0
  120. package/src/stories/assets/questionnaires/QDateTime.ts +56 -0
  121. package/src/stories/assets/questionnaires/QDecimal.ts +56 -0
  122. package/src/stories/assets/questionnaires/QDisplay.ts +38 -0
  123. package/src/stories/assets/questionnaires/QGroup.ts +52 -0
  124. package/src/stories/assets/questionnaires/QInteger.ts +119 -0
  125. package/src/stories/assets/questionnaires/QItemControlDisplay.ts +114 -0
  126. package/src/stories/assets/questionnaires/QItemControlGroup.ts +419 -0
  127. package/src/stories/assets/questionnaires/QItemControlQuestion.ts +1271 -0
  128. package/src/stories/assets/questionnaires/QOpenChoice.ts +151 -0
  129. package/src/stories/assets/questionnaires/QQuantity.ts +38 -0
  130. package/src/stories/assets/questionnaires/QReference.ts +38 -0
  131. package/src/stories/assets/questionnaires/QSingleItems.ts +251 -0
  132. package/src/stories/assets/questionnaires/QString.ts +131 -0
  133. package/src/stories/assets/questionnaires/QText.ts +169 -0
  134. package/src/stories/assets/questionnaires/QTime.ts +38 -0
  135. package/src/stories/assets/questionnaires/QUrl.ts +38 -0
  136. package/src/stories/assets/questionnaires/index.ts +44 -0
  137. package/src/stories/itemTypes/Attachment.stories.tsx +39 -0
  138. package/src/stories/itemTypes/Boolean.stories.tsx +72 -0
  139. package/src/stories/{MedicalHistoryTable.stories.tsx → itemTypes/Choice.stories.tsx} +32 -26
  140. package/src/stories/itemTypes/Date.stories.tsx +46 -0
  141. package/src/stories/itemTypes/DateTime.stories.tsx +45 -0
  142. package/src/stories/itemTypes/Decimal.stories.tsx +56 -0
  143. package/src/stories/itemTypes/Display.stories.tsx +39 -0
  144. package/src/stories/itemTypes/Group.stories.tsx +39 -0
  145. package/src/stories/itemTypes/Integer.stories.tsx +55 -0
  146. package/src/stories/itemTypes/OpenChoice.stories.tsx +64 -0
  147. package/src/stories/itemTypes/Quantity.stories.tsx +39 -0
  148. package/src/stories/itemTypes/Reference.stories.tsx +39 -0
  149. package/src/stories/itemTypes/String.stories.tsx +51 -0
  150. package/src/stories/itemTypes/Text.stories.tsx +51 -0
  151. package/src/stories/itemTypes/Time.stories.tsx +39 -0
  152. package/src/stories/itemTypes/Url.stories.tsx +39 -0
  153. package/src/stories/sdc/AdvancedAdditionalDisplayContent.stories.tsx +45 -0
  154. package/src/stories/sdc/AdvancedControlAppearance.stories.tsx +51 -0
  155. package/src/stories/sdc/AdvancedOther.stories.tsx +76 -0
  156. package/src/stories/sdc/AdvancedTextAppearance.stories.tsx +69 -0
  157. package/src/stories/sdc/BehaviorCalculations.stories.tsx +69 -0
  158. package/src/stories/sdc/BehaviorChoiceRestriction.stories.tsx +76 -0
  159. package/src/stories/sdc/BehaviorOther.stories.tsx +90 -0
  160. package/src/stories/sdc/BehaviorValueConstraints.stories.tsx +88 -0
  161. package/src/stories/sdc/ItemControlDisplay.stories.tsx +39 -0
  162. package/src/stories/sdc/ItemControlGroup.stories.tsx +55 -0
  163. package/src/stories/sdc/ItemControlQuestion.stories.tsx +118 -0
  164. package/src/utils/buildForm.ts +23 -0
  165. package/src/utils/choice.ts +16 -23
  166. package/src/utils/enableWhen.ts +5 -7
  167. package/src/utils/index.ts +1 -0
  168. package/src/utils/openChoice.ts +83 -98
  169. package/src/utils/tabs.ts +0 -75
  170. package/vite.config.ts +23 -0
  171. package/doctor-storybook.log +0 -18
  172. package/src/stories/SmartFormsRenderer.stories.ts +0 -139
  173. package/src/stories/assets/QItems-and-QRItems/QR_GTableMedicalHistory.json +0 -80
  174. package/src/stories/assets/QItems-and-QRItems/Q_GTableMedicalHistory.json +0 -109
  175. package/src/stories/assets/Qs-and-QRs/Q715.json +0 -15086
  176. package/src/stories/assets/Qs-and-QRs/QDev715.json +0 -16081
  177. package/src/stories/assets/Qs-and-QRs/QTestGrid.json +0 -411
  178. package/src/stories/assets/Qs-and-QRs/R715.json +0 -311
  179. package/src/stories/assets/Qs-and-QRs/RTestGrid.json +0 -34
@@ -0,0 +1,419 @@
1
+ import type { Questionnaire } from 'fhir/r4';
2
+
3
+ export const qItemControlGroupGTable: Questionnaire = {
4
+ resourceType: 'Questionnaire',
5
+ id: 'ItemControlGroupGTable',
6
+ name: 'ItemControlGroupGTable',
7
+ title: 'Item Control Group GTable',
8
+ version: '0.1.0',
9
+ status: 'draft',
10
+ publisher: 'AEHRC CSIRO',
11
+ date: '2024-05-01',
12
+ url: 'https://smartforms.csiro.au/docs/advanced/control/item-control-group-gtable',
13
+ contained: [
14
+ {
15
+ resourceType: 'ValueSet',
16
+ id: 'MedicalHistory',
17
+ url: 'https://smartforms.csiro.au/ig/ValueSet/MedicalHistory',
18
+ name: 'MedicalHistory',
19
+ title: 'Medical History',
20
+ status: 'draft',
21
+ experimental: false,
22
+ description:
23
+ 'The Medical History value set includes values that may be used to represent medical history, operations and hospital admissions.',
24
+ compose: {
25
+ include: [
26
+ {
27
+ system: 'http://snomed.info/sct',
28
+ filter: [
29
+ {
30
+ property: 'constraint',
31
+ op: '=',
32
+ value:
33
+ '^32570581000036105|Problem/Diagnosis reference set| OR ^32570141000036105|Procedure foundation reference set|'
34
+ }
35
+ ]
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ resourceType: 'ValueSet',
42
+ id: 'condition-clinical',
43
+ extension: [
44
+ {
45
+ url: 'http://hl7.org/fhir/StructureDefinition/structuredefinition-wg',
46
+ valueCode: 'pc'
47
+ },
48
+ {
49
+ url: 'http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status',
50
+ valueCode: 'trial-use'
51
+ },
52
+ {
53
+ url: 'http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm',
54
+ valueInteger: 3
55
+ }
56
+ ],
57
+ url: 'http://hl7.org/fhir/ValueSet/condition-clinical',
58
+ identifier: [
59
+ {
60
+ system: 'urn:ietf:rfc:3986',
61
+ value: 'urn:oid:2.16.840.1.113883.4.642.3.164'
62
+ }
63
+ ],
64
+ version: '4.0.1',
65
+ name: 'ConditionClinicalStatusCodes',
66
+ title: 'Condition Clinical Status Codes',
67
+ status: 'draft',
68
+ experimental: false,
69
+ publisher: 'FHIR Project team',
70
+ contact: [
71
+ {
72
+ telecom: [
73
+ {
74
+ system: 'url',
75
+ value: 'http://hl7.org/fhir'
76
+ }
77
+ ]
78
+ }
79
+ ],
80
+ description: 'Preferred value set for Condition Clinical Status.',
81
+ copyright: 'Copyright © 2011+ HL7. Licensed under Creative Commons "No Rights Reserved".',
82
+ compose: {
83
+ include: [
84
+ {
85
+ system: 'http://terminology.hl7.org/CodeSystem/condition-clinical'
86
+ }
87
+ ]
88
+ },
89
+ expansion: {
90
+ identifier: 'urn:uuid:79d21cca-9f34-4cfa-9020-17eee95eeed8',
91
+ timestamp: '2024-04-02T14:17:12+10:00',
92
+ total: 6,
93
+ parameter: [
94
+ {
95
+ name: 'version',
96
+ valueUri: 'http://terminology.hl7.org/CodeSystem/condition-clinical|4.0.1'
97
+ },
98
+ {
99
+ name: 'used-codesystem',
100
+ valueUri: 'http://terminology.hl7.org/CodeSystem/condition-clinical|4.0.1'
101
+ },
102
+ {
103
+ name: 'warning-draft',
104
+ valueUri: 'http://hl7.org/fhir/ValueSet/condition-clinical|4.0.1'
105
+ },
106
+ {
107
+ name: 'warning-trial-use',
108
+ valueUri: 'http://hl7.org/fhir/ValueSet/condition-clinical|4.0.1'
109
+ },
110
+ {
111
+ name: 'warning-trial-use',
112
+ valueUri: 'http://terminology.hl7.org/CodeSystem/condition-clinical|4.0.1'
113
+ },
114
+ {
115
+ name: 'warning-draft',
116
+ valueUri: 'http://terminology.hl7.org/CodeSystem/condition-clinical|4.0.1'
117
+ }
118
+ ],
119
+ contains: [
120
+ {
121
+ system: 'http://terminology.hl7.org/CodeSystem/condition-clinical',
122
+ code: 'active',
123
+ display: 'Active'
124
+ },
125
+ {
126
+ system: 'http://terminology.hl7.org/CodeSystem/condition-clinical',
127
+ code: 'inactive',
128
+ display: 'Inactive'
129
+ },
130
+ {
131
+ system: 'http://terminology.hl7.org/CodeSystem/condition-clinical',
132
+ code: 'recurrence',
133
+ display: 'Recurrence'
134
+ },
135
+ {
136
+ system: 'http://terminology.hl7.org/CodeSystem/condition-clinical',
137
+ code: 'relapse',
138
+ display: 'Relapse'
139
+ },
140
+ {
141
+ system: 'http://terminology.hl7.org/CodeSystem/condition-clinical',
142
+ code: 'remission',
143
+ display: 'Remission'
144
+ },
145
+ {
146
+ system: 'http://terminology.hl7.org/CodeSystem/condition-clinical',
147
+ code: 'resolved',
148
+ display: 'Resolved'
149
+ }
150
+ ]
151
+ }
152
+ }
153
+ ],
154
+ item: [
155
+ {
156
+ extension: [
157
+ {
158
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
159
+ valueCodeableConcept: {
160
+ coding: [
161
+ {
162
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
163
+ code: 'gtable'
164
+ }
165
+ ]
166
+ }
167
+ }
168
+ ],
169
+ linkId: 'medical-history',
170
+ text: 'Medical history and current problems list',
171
+ type: 'group',
172
+ repeats: true,
173
+ item: [
174
+ {
175
+ extension: [
176
+ {
177
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
178
+ valueCodeableConcept: {
179
+ coding: [
180
+ {
181
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
182
+ code: 'autocomplete'
183
+ }
184
+ ]
185
+ }
186
+ }
187
+ ],
188
+ linkId: 'medical-history-condition',
189
+ text: 'Condition',
190
+ type: 'open-choice',
191
+ answerValueSet: '#MedicalHistory'
192
+ },
193
+ {
194
+ extension: [
195
+ {
196
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
197
+ valueCodeableConcept: {
198
+ coding: [
199
+ {
200
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
201
+ code: 'drop-down'
202
+ }
203
+ ]
204
+ }
205
+ }
206
+ ],
207
+ linkId: 'medical-history-status',
208
+ text: 'Clinical Status',
209
+ type: 'choice',
210
+ answerValueSet: '#condition-clinical'
211
+ },
212
+ {
213
+ linkId: 'medical-history-onset',
214
+ text: 'Onset Date',
215
+ type: 'date'
216
+ },
217
+ {
218
+ linkId: 'medical-history-recorded',
219
+ text: 'Recorded Date',
220
+ type: 'date'
221
+ }
222
+ ]
223
+ }
224
+ ]
225
+ };
226
+
227
+ // FIXME at the moment, itemControl grid does not work without a parent container
228
+ export const qItemControlGroupGrid: Questionnaire = {
229
+ resourceType: 'Questionnaire',
230
+ id: 'ItemControlGroupGrid',
231
+ name: 'ItemControlGroupGrid',
232
+ title: 'Item Control Group Grid',
233
+ version: '0.1.0',
234
+ status: 'draft',
235
+ publisher: 'AEHRC CSIRO',
236
+ date: '2024-05-01',
237
+ url: 'https://smartforms.csiro.au/docs/advanced/control/item-control-group-grid',
238
+ item: [
239
+ {
240
+ linkId: 'parent-container',
241
+ type: 'group',
242
+ repeats: false,
243
+ item: [
244
+ {
245
+ extension: [
246
+ {
247
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
248
+ valueCodeableConcept: {
249
+ coding: [
250
+ {
251
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
252
+ version: '1.0.0',
253
+ code: 'grid'
254
+ }
255
+ ]
256
+ }
257
+ }
258
+ ],
259
+ linkId: 'blood-pressure-grid',
260
+ type: 'group',
261
+ repeats: false,
262
+ item: [
263
+ {
264
+ linkId: 'blood-pressure-group',
265
+ text: 'Blood pressure',
266
+ type: 'group',
267
+ repeats: false,
268
+ item: [
269
+ {
270
+ extension: [
271
+ {
272
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
273
+ valueCoding: {
274
+ system: 'http://unitsofmeasure.org',
275
+ code: 'mm[Hg]',
276
+ display: 'mm Hg'
277
+ }
278
+ }
279
+ ],
280
+ linkId: 'blood-pressure-systolic',
281
+ text: 'Systolic',
282
+ type: 'integer',
283
+ repeats: false
284
+ },
285
+ {
286
+ extension: [
287
+ {
288
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
289
+ valueCoding: {
290
+ system: 'http://unitsofmeasure.org',
291
+ code: 'mm[Hg]',
292
+ display: 'mm Hg'
293
+ }
294
+ }
295
+ ],
296
+ linkId: 'blood-pressure-diastolic',
297
+ text: 'Diastolic',
298
+ type: 'integer',
299
+ repeats: false
300
+ },
301
+ {
302
+ linkId: 'blood-pressure-date',
303
+ text: 'Date performed',
304
+ type: 'date',
305
+ repeats: false
306
+ }
307
+ ]
308
+ }
309
+ ]
310
+ }
311
+ ]
312
+ }
313
+ ]
314
+ };
315
+
316
+ export const qItemControlDisplayTabContainer: Questionnaire = {
317
+ resourceType: 'Questionnaire',
318
+ id: 'ItemControlGroupTabContainer',
319
+ name: 'ItemControlGroupTabContainer',
320
+ title: 'Item Control Group Tab Container',
321
+ version: '0.1.0',
322
+ status: 'draft',
323
+ publisher: 'AEHRC CSIRO',
324
+ date: '2024-05-01',
325
+ url: 'https://smartforms.csiro.au/docs/advanced/control/item-control-group-tab-container',
326
+ item: [
327
+ {
328
+ extension: [
329
+ {
330
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
331
+ valueCodeableConcept: {
332
+ coding: [
333
+ {
334
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
335
+ version: '1.0.0',
336
+ code: 'tab-container'
337
+ }
338
+ ]
339
+ }
340
+ }
341
+ ],
342
+ linkId: 'tab-container',
343
+ type: 'group',
344
+ repeats: false,
345
+ item: [
346
+ {
347
+ linkId: 'tab-about-health-check',
348
+ text: 'About the health check',
349
+ type: 'group',
350
+ repeats: false,
351
+ item: [
352
+ {
353
+ linkId: 'health-check-eligible',
354
+ text: 'Eligible for health check',
355
+ type: 'boolean',
356
+ repeats: false
357
+ },
358
+ {
359
+ linkId: 'health-check-in-progress',
360
+ text: 'Health check already in progress?',
361
+ type: 'boolean',
362
+ repeats: false
363
+ },
364
+ {
365
+ linkId: 'health-check-last-completed',
366
+ text: 'Date of last completed health check',
367
+ type: 'date',
368
+ repeats: false
369
+ },
370
+ {
371
+ linkId: 'health-check-this-commenced',
372
+ text: 'Date and time this health check commenced',
373
+ type: 'dateTime',
374
+ repeats: false
375
+ }
376
+ ]
377
+ },
378
+ {
379
+ extension: [
380
+ {
381
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText',
382
+ valueString: 'Current priorities'
383
+ }
384
+ ],
385
+ linkId: 'tab-current-priorities',
386
+ text: 'Current health/patient priorities',
387
+ type: 'group',
388
+ repeats: false,
389
+ item: [
390
+ {
391
+ extension: [
392
+ {
393
+ url: 'http://hl7.org/fhir/StructureDefinition/entryFormat',
394
+ valueString: 'Enter details'
395
+ }
396
+ ],
397
+ linkId: 'current-priorities-important-things',
398
+ text: 'What are the important things for you in this health check today?',
399
+ type: 'text',
400
+ repeats: false
401
+ },
402
+ {
403
+ extension: [
404
+ {
405
+ url: 'http://hl7.org/fhir/StructureDefinition/entryFormat',
406
+ valueString: 'Enter details'
407
+ }
408
+ ],
409
+ linkId: 'current-priorities-worried-things',
410
+ text: 'Is there anything you are worried about?',
411
+ type: 'text',
412
+ repeats: false
413
+ }
414
+ ]
415
+ }
416
+ ]
417
+ }
418
+ ]
419
+ };