@aehrc/smart-forms-renderer 0.36.0 → 0.37.2

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 (106) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/lib/components/FormComponents/Button.styles.d.ts +4 -0
  3. package/lib/components/FormComponents/Button.styles.js +10 -0
  4. package/lib/components/FormComponents/Button.styles.js.map +1 -0
  5. package/lib/components/FormComponents/GroupItem/GroupHeading.d.ts +1 -0
  6. package/lib/components/FormComponents/GroupItem/GroupHeading.js +3 -2
  7. package/lib/components/FormComponents/GroupItem/GroupHeading.js.map +1 -1
  8. package/lib/components/FormComponents/GroupItem/GroupItem.d.ts +4 -0
  9. package/lib/components/FormComponents/GroupItem/GroupItem.js +3 -3
  10. package/lib/components/FormComponents/GroupItem/GroupItem.js.map +1 -1
  11. package/lib/components/FormComponents/GroupItem/GroupItemView.d.ts +4 -0
  12. package/lib/components/FormComponents/GroupItem/GroupItemView.js +8 -5
  13. package/lib/components/FormComponents/GroupItem/GroupItemView.js.map +1 -1
  14. package/lib/components/FormComponents/GroupItem/NextPageButton.d.ts +7 -0
  15. package/lib/components/FormComponents/GroupItem/NextPageButton.js +26 -0
  16. package/lib/components/FormComponents/GroupItem/NextPageButton.js.map +1 -0
  17. package/lib/components/FormComponents/GroupItem/PageButtonWrapper.d.ts +8 -0
  18. package/lib/components/FormComponents/GroupItem/PageButtonWrapper.js +46 -0
  19. package/lib/components/FormComponents/GroupItem/PageButtonWrapper.js.map +1 -0
  20. package/lib/components/FormComponents/GroupItem/PreviousPageButton.d.ts +7 -0
  21. package/lib/components/FormComponents/GroupItem/PreviousPageButton.js +26 -0
  22. package/lib/components/FormComponents/GroupItem/PreviousPageButton.js.map +1 -0
  23. package/lib/components/Renderer/BaseRenderer.js +8 -0
  24. package/lib/components/Renderer/BaseRenderer.js.map +1 -1
  25. package/lib/components/Renderer/FormBodyPage.d.ts +9 -0
  26. package/lib/components/Renderer/FormBodyPage.js +43 -0
  27. package/lib/components/Renderer/FormBodyPage.js.map +1 -0
  28. package/lib/components/Renderer/FormTopLevelItem.js +7 -0
  29. package/lib/components/Renderer/FormTopLevelItem.js.map +1 -1
  30. package/lib/components/Renderer/FormTopLevelPage.d.ts +9 -0
  31. package/lib/components/Renderer/FormTopLevelPage.js +29 -0
  32. package/lib/components/Renderer/FormTopLevelPage.js.map +1 -0
  33. package/lib/hooks/useCodingCalculatedExpression.js +11 -0
  34. package/lib/hooks/useCodingCalculatedExpression.js.map +1 -1
  35. package/lib/hooks/useNextAndPreviousVisiblePages.d.ts +7 -0
  36. package/lib/hooks/useNextAndPreviousVisiblePages.js +47 -0
  37. package/lib/hooks/useNextAndPreviousVisiblePages.js.map +1 -0
  38. package/lib/interfaces/page.interface.d.ts +16 -0
  39. package/lib/interfaces/page.interface.js +2 -0
  40. package/lib/interfaces/page.interface.js.map +1 -0
  41. package/lib/interfaces/questionnaireStore.interface.d.ts +2 -0
  42. package/lib/stores/questionnaireStore.d.ts +13 -0
  43. package/lib/stores/questionnaireStore.js +19 -3
  44. package/lib/stores/questionnaireStore.js.map +1 -1
  45. package/lib/utils/calculatedExpression.js +1 -1
  46. package/lib/utils/calculatedExpression.js.map +1 -1
  47. package/lib/utils/fhirpath.js +0 -4
  48. package/lib/utils/fhirpath.js.map +1 -1
  49. package/lib/utils/initialise.d.ts +3 -0
  50. package/lib/utils/initialise.js +6 -1
  51. package/lib/utils/initialise.js.map +1 -1
  52. package/lib/utils/page.d.ts +43 -0
  53. package/lib/utils/page.js +101 -0
  54. package/lib/utils/page.js.map +1 -0
  55. package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js +4 -0
  56. package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +1 -1
  57. package/lib/utils/questionnaireStoreUtils/extractPages.d.ts +3 -0
  58. package/lib/utils/questionnaireStoreUtils/extractPages.js +18 -0
  59. package/lib/utils/questionnaireStoreUtils/extractPages.js.map +1 -0
  60. package/package.json +4 -4
  61. package/src/components/FormComponents/Button.styles.ts +10 -0
  62. package/src/components/FormComponents/GroupItem/GroupHeading.tsx +5 -3
  63. package/src/components/FormComponents/GroupItem/GroupItem.tsx +11 -1
  64. package/src/components/FormComponents/GroupItem/GroupItemView.tsx +12 -0
  65. package/src/components/FormComponents/GroupItem/NextPageButton.tsx +37 -0
  66. package/src/components/FormComponents/GroupItem/PageButtonWrapper.tsx +78 -0
  67. package/src/components/FormComponents/GroupItem/PreviousPageButton.tsx +41 -0
  68. package/src/components/Renderer/BaseRenderer.tsx +21 -0
  69. package/src/components/Renderer/FormBodyPage.tsx +93 -0
  70. package/src/components/Renderer/FormTopLevelItem.tsx +17 -0
  71. package/src/components/Renderer/FormTopLevelPage.tsx +70 -0
  72. package/src/hooks/useCodingCalculatedExpression.ts +14 -1
  73. package/src/hooks/useNextAndPreviousVisiblePages.ts +69 -0
  74. package/src/interfaces/page.interface.ts +13 -0
  75. package/src/interfaces/questionnaireStore.interface.ts +2 -0
  76. package/src/stores/questionnaireStore.ts +33 -2
  77. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreAllergyIntolerance.json +209 -0
  78. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreCondition.json +220 -0
  79. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreEncounter.json +299 -0
  80. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreImmunization.json +175 -0
  81. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreMedicationRequest.json +229 -0
  82. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBP.json +359 -0
  83. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBodyHeight.json +195 -0
  84. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBodyWeight.json +195 -0
  85. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationHeartRate.json +195 -0
  86. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationSmokingStatus.json +174 -0
  87. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePatient.json +495 -0
  88. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePractitioner.json +139 -0
  89. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePractitionerRole.json +216 -0
  90. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreProcedure.json +199 -0
  91. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreRespirationRate.json +195 -0
  92. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreWaistCircumference.json +195 -0
  93. package/src/stories/assets/questionnaires/QAuCoreTesting.ts +3796 -0
  94. package/src/stories/assets/questionnaires/QItemControlGroup.ts +673 -0
  95. package/src/stories/assets/questionnaires/QPrePopTester.ts +266 -71
  96. package/src/stories/sdc/ItemControlGroup.stories.tsx +22 -1
  97. package/src/stories/testing/AuCoreTester.stories.tsx +196 -0
  98. package/src/utils/calculatedExpression.ts +1 -1
  99. package/src/utils/fhirpath.ts +0 -5
  100. package/src/utils/initialise.ts +11 -0
  101. package/src/utils/page.ts +134 -0
  102. package/src/utils/questionnaireStoreUtils/createQuestionaireModel.ts +5 -0
  103. package/src/utils/questionnaireStoreUtils/extractPages.ts +24 -0
  104. package/stats.html +0 -4842
  105. package/stats1.html +0 -4842
  106. package/stats3.html +0 -4842
@@ -0,0 +1,3796 @@
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
+ // FIX choice autocomplete
21
+
22
+ export const QAuCoreAllergyIntolerance: Questionnaire = {
23
+ resourceType: 'Questionnaire',
24
+ id: 'AuCoreAllergyIntolerance',
25
+ extension: [
26
+ {
27
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
28
+ extension: [
29
+ {
30
+ url: 'name',
31
+ valueCoding: {
32
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
33
+ code: 'patient'
34
+ }
35
+ },
36
+ {
37
+ url: 'type',
38
+ valueCode: 'Patient'
39
+ },
40
+ {
41
+ url: 'description',
42
+ valueString: 'The patient that is to be used to pre-populate the form'
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
48
+ valueExpression: {
49
+ name: 'AllergyIntolerance',
50
+ language: 'application/x-fhir-query',
51
+ expression: 'AllergyIntolerance?patient={{%patient.id}}'
52
+ }
53
+ }
54
+ ],
55
+ version: '0.1.0',
56
+ name: 'AU Core AllergyIntolerance',
57
+ title: 'AU Core AllergyIntolerance',
58
+ status: 'draft',
59
+ date: '2024-07-15',
60
+ item: [
61
+ {
62
+ linkId: 'allergy-intolerance',
63
+ text: 'AU Core AllergyIntolerance',
64
+ type: 'group',
65
+ repeats: false,
66
+ item: [
67
+ {
68
+ linkId: 'patient-details',
69
+ text: 'Patient Details',
70
+ type: 'group',
71
+ item: [
72
+ {
73
+ extension: [
74
+ {
75
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
76
+ valueExpression: {
77
+ language: 'text/fhirpath',
78
+ expression: '%patient.id'
79
+ }
80
+ }
81
+ ],
82
+ linkId: 'patient-id',
83
+ text: 'Patient ID',
84
+ type: 'string',
85
+ required: true,
86
+ readOnly: true
87
+ },
88
+ {
89
+ extension: [
90
+ {
91
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
92
+ valueExpression: {
93
+ language: 'text/fhirpath',
94
+ expression:
95
+ "(%patient.name.where(use='official').select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()"
96
+ }
97
+ }
98
+ ],
99
+ linkId: 'patient-name',
100
+ text: 'Patient Name',
101
+ type: 'string',
102
+ required: true,
103
+ readOnly: true
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ linkId: 'first-resource-note',
109
+ text: 'This questionnaire only uses the first AllergyTolerance resource of a reference patient.',
110
+ _text: {
111
+ extension: [
112
+ {
113
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
114
+ valueString:
115
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom: 8px;">\r\n <b>This questionnaire only uses the first AllergyIntolerance resource of a reference patient.</b>\r\n</div>'
116
+ }
117
+ ]
118
+ },
119
+ type: 'display'
120
+ },
121
+ {
122
+ extension: [
123
+ {
124
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
125
+ valueExpression: {
126
+ language: 'text/fhirpath',
127
+ expression: '%AllergyIntolerance.entry[0].resource.clinicalStatus.coding'
128
+ }
129
+ }
130
+ ],
131
+ linkId: 'clinical-status',
132
+ text: 'Clinical Status',
133
+ type: 'choice',
134
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/allergyintolerance-clinical'
135
+ },
136
+ {
137
+ extension: [
138
+ {
139
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
140
+ valueExpression: {
141
+ language: 'text/fhirpath',
142
+ expression: '%AllergyIntolerance.entry[0].resource.verificationStatus.coding'
143
+ }
144
+ }
145
+ ],
146
+ linkId: 'verification-status',
147
+ text: 'Verification Status',
148
+ type: 'choice',
149
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/allergyintolerance-verification'
150
+ },
151
+ {
152
+ extension: [
153
+ {
154
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
155
+ valueCodeableConcept: {
156
+ coding: [
157
+ {
158
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
159
+ code: 'autocomplete'
160
+ }
161
+ ]
162
+ }
163
+ },
164
+ {
165
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
166
+ valueExpression: {
167
+ language: 'text/fhirpath',
168
+ expression: '%AllergyIntolerance.entry[0].resource.code.coding'
169
+ }
170
+ }
171
+ ],
172
+ linkId: 'code',
173
+ text: 'Code',
174
+ type: 'open-choice',
175
+ required: true,
176
+ answerValueSet:
177
+ 'https://healthterminologies.gov.au/fhir/ValueSet/indicator-hypersensitivity-intolerance-to-substance-2'
178
+ },
179
+ {
180
+ extension: [
181
+ {
182
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
183
+ valueExpression: {
184
+ language: 'text/fhirpath',
185
+ expression: '%AllergyIntolerance.entry[0].resource.onset'
186
+ }
187
+ }
188
+ ],
189
+ linkId: 'onset',
190
+ text: 'Onset[x]',
191
+ type: 'string'
192
+ },
193
+ {
194
+ linkId: 'reaction',
195
+ text: 'Reaction',
196
+ type: 'group',
197
+ item: [
198
+ {
199
+ extension: [
200
+ {
201
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
202
+ valueExpression: {
203
+ language: 'text/fhirpath',
204
+ expression:
205
+ '%AllergyIntolerance.entry[0].resource.reaction.manifestation[0].coding'
206
+ }
207
+ }
208
+ ],
209
+ linkId: 'reaction-manifestation',
210
+ text: 'Reaction Manifestation',
211
+ type: 'choice',
212
+ answerValueSet: 'https://healthterminologies.gov.au/fhir/ValueSet/clinical-finding-1'
213
+ },
214
+ {
215
+ extension: [
216
+ {
217
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
218
+ valueExpression: {
219
+ language: 'text/fhirpath',
220
+ expression: '%AllergyIntolerance.entry[0].resource.reaction.severity'
221
+ }
222
+ }
223
+ ],
224
+ linkId: 'reaction-severity',
225
+ text: 'Reaction Severity',
226
+ type: 'choice',
227
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/reaction-event-severity'
228
+ }
229
+ ]
230
+ }
231
+ ]
232
+ }
233
+ ]
234
+ };
235
+
236
+ export const QAuCoreCondition: Questionnaire = {
237
+ resourceType: 'Questionnaire',
238
+ id: 'AuCoreCondition',
239
+ extension: [
240
+ {
241
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
242
+ extension: [
243
+ {
244
+ url: 'name',
245
+ valueCoding: {
246
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
247
+ code: 'patient'
248
+ }
249
+ },
250
+ {
251
+ url: 'type',
252
+ valueCode: 'Patient'
253
+ },
254
+ {
255
+ url: 'description',
256
+ valueString: 'The patient that is to be used to pre-populate the form'
257
+ }
258
+ ]
259
+ },
260
+ {
261
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
262
+ valueExpression: {
263
+ name: 'Condition',
264
+ language: 'application/x-fhir-query',
265
+ expression: 'Condition?patient={{%patient.id}}'
266
+ }
267
+ }
268
+ ],
269
+ version: '0.1.0',
270
+ name: 'AU Core Condition',
271
+ title: 'AU Core Condition',
272
+ status: 'draft',
273
+ date: '2024-07-15',
274
+ item: [
275
+ {
276
+ linkId: 'condition',
277
+ text: 'AU Core Condition',
278
+ type: 'group',
279
+ repeats: false,
280
+ item: [
281
+ {
282
+ linkId: 'patient-details',
283
+ text: 'Patient Details',
284
+ type: 'group',
285
+ item: [
286
+ {
287
+ extension: [
288
+ {
289
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
290
+ valueExpression: {
291
+ language: 'text/fhirpath',
292
+ expression: '%patient.id'
293
+ }
294
+ }
295
+ ],
296
+ linkId: 'patient-id',
297
+ text: 'Patient ID',
298
+ type: 'string',
299
+ required: true,
300
+ readOnly: true
301
+ },
302
+ {
303
+ extension: [
304
+ {
305
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
306
+ valueExpression: {
307
+ language: 'text/fhirpath',
308
+ expression:
309
+ "(%patient.name.where(use='official').select((family | (given\n| prefix).join(' ')).join(', ').where($this != '') | text)).first()"
310
+ }
311
+ }
312
+ ],
313
+ linkId: 'patient-name',
314
+ text: 'Patient Name',
315
+ type: 'string',
316
+ required: true,
317
+ readOnly: true
318
+ }
319
+ ]
320
+ },
321
+ {
322
+ linkId: 'first-condition-note',
323
+ text: 'This questionnaire only uses the first Condition resource of a referenced patient.',
324
+ _text: {
325
+ extension: [
326
+ {
327
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
328
+ valueString:
329
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n <b>This questionnaire only uses the first Condition resource of a referenced patient.</b>\r\n</div>'
330
+ }
331
+ ]
332
+ },
333
+ type: 'display'
334
+ },
335
+ {
336
+ linkId: 'clinical-status',
337
+ text: 'Clinical Status',
338
+ type: 'choice',
339
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/condition-clinical',
340
+ extension: [
341
+ {
342
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
343
+ valueExpression: {
344
+ language: 'text/fhirpath',
345
+ expression: '%Condition.entry[0].resource.clinicalStatus.coding'
346
+ }
347
+ }
348
+ ]
349
+ },
350
+ {
351
+ linkId: 'verification-status',
352
+ text: 'Verification Status',
353
+ type: 'choice',
354
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/condition-ver-status',
355
+ extension: [
356
+ {
357
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
358
+ valueExpression: {
359
+ language: 'text/fhirpath',
360
+ expression: '%Condition.entry[0].resource.verificationStatus.coding'
361
+ }
362
+ }
363
+ ]
364
+ },
365
+ {
366
+ linkId: 'category',
367
+ text: 'Category',
368
+ type: 'choice',
369
+ required: true,
370
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/condition-category',
371
+ extension: [
372
+ {
373
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
374
+ valueExpression: {
375
+ language: 'text/fhirpath',
376
+ expression: '%Condition.entry[0].resource.category.coding'
377
+ }
378
+ }
379
+ ]
380
+ },
381
+ {
382
+ linkId: 'severity',
383
+ text: 'Severity',
384
+ type: 'choice',
385
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/condition-severity',
386
+ extension: [
387
+ {
388
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
389
+ valueExpression: {
390
+ language: 'text/fhirpath',
391
+ expression: '%Condition.entry[0].resource.severity.coding'
392
+ }
393
+ }
394
+ ]
395
+ },
396
+ {
397
+ linkId: 'code',
398
+ text: 'Code',
399
+ type: 'choice',
400
+ required: true,
401
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/condition-code',
402
+ extension: [
403
+ {
404
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
405
+ valueExpression: {
406
+ language: 'text/fhirpath',
407
+ expression: '%Condition.entry[0].resource.code.coding'
408
+ }
409
+ }
410
+ ]
411
+ },
412
+ {
413
+ extension: [
414
+ {
415
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
416
+ valueExpression: {
417
+ language: 'text/fhirpath',
418
+ expression: '%Condition.entry[0].resource.onset.value'
419
+ }
420
+ }
421
+ ],
422
+ linkId: 'onset',
423
+ text: 'Onset[x]',
424
+ type: 'string'
425
+ },
426
+ {
427
+ extension: [
428
+ {
429
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
430
+ valueExpression: {
431
+ language: 'text/fhirpath',
432
+ expression: '%Condition.entry[0].resource.abatement.value'
433
+ }
434
+ }
435
+ ],
436
+ linkId: 'abatement',
437
+ text: 'Abatement[x]',
438
+ type: 'string'
439
+ },
440
+ {
441
+ linkId: 'note',
442
+ text: 'Note',
443
+ type: 'string',
444
+ extension: [
445
+ {
446
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
447
+ valueExpression: {
448
+ language: 'text/fhirpath',
449
+ expression: '%Condition.entry[0].resource.note.text'
450
+ }
451
+ }
452
+ ]
453
+ }
454
+ ]
455
+ }
456
+ ]
457
+ };
458
+
459
+ export const QAuCoreEncounter: Questionnaire = {
460
+ resourceType: 'Questionnaire',
461
+ id: 'AuCoreEncounter',
462
+ extension: [
463
+ {
464
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
465
+ extension: [
466
+ {
467
+ url: 'name',
468
+ valueCoding: {
469
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
470
+ code: 'patient'
471
+ }
472
+ },
473
+ {
474
+ url: 'type',
475
+ valueCode: 'Patient'
476
+ },
477
+ {
478
+ url: 'description',
479
+ valueString: 'The patient that is to be used to pre-populate the form'
480
+ }
481
+ ]
482
+ },
483
+ {
484
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
485
+ valueExpression: {
486
+ name: 'Encounter',
487
+ language: 'application/x-fhir-query',
488
+ expression: 'Encounter?patient={{%patient.id}}'
489
+ }
490
+ }
491
+ ],
492
+ version: '0.1.0',
493
+ name: 'AU Core Encounter',
494
+ title: 'AU Core Encounter',
495
+ status: 'draft',
496
+ date: '2024-07-15',
497
+ item: [
498
+ {
499
+ linkId: 'encounter',
500
+ text: 'AU Core Encounter',
501
+ type: 'group',
502
+ repeats: false,
503
+ item: [
504
+ {
505
+ linkId: 'patient-details',
506
+ text: 'Patient Details',
507
+ type: 'group',
508
+ item: [
509
+ {
510
+ extension: [
511
+ {
512
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
513
+ valueExpression: {
514
+ language: 'text/fhirpath',
515
+ expression: '%patient.id'
516
+ }
517
+ }
518
+ ],
519
+ linkId: 'patient-id',
520
+ text: 'Patient ID',
521
+ type: 'string',
522
+ required: true,
523
+ readOnly: true
524
+ },
525
+ {
526
+ extension: [
527
+ {
528
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
529
+ valueExpression: {
530
+ language: 'text/fhirpath',
531
+ expression:
532
+ "(%patient.name.where(use='official').select((family | (given\n| prefix).join(' ')).join(', ').where($this != '') | text)).first()"
533
+ }
534
+ }
535
+ ],
536
+ linkId: 'patient-name',
537
+ text: 'Patient Name',
538
+ type: 'string',
539
+ required: true,
540
+ readOnly: true
541
+ }
542
+ ]
543
+ },
544
+ {
545
+ linkId: 'first-encounter-note',
546
+ text: 'This questionnaire only uses the first Encounter resource of a referenced\npatient.',
547
+ _text: {
548
+ extension: [
549
+ {
550
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
551
+ valueString:
552
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n\n <b>This questionnaire only uses the first Encounter resource\nof a referenced\npatient.</b>\r\n</div>'
553
+ }
554
+ ]
555
+ },
556
+ type: 'display'
557
+ },
558
+ {
559
+ linkId: 'status',
560
+ text: 'Status',
561
+ type: 'choice',
562
+ required: true,
563
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/encounter-status',
564
+ extension: [
565
+ {
566
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
567
+ valueExpression: {
568
+ language: 'text/fhirpath',
569
+ expression: '%Encounter.entry[0].resource.status'
570
+ }
571
+ }
572
+ ]
573
+ },
574
+ {
575
+ linkId: 'class',
576
+ text: 'Class',
577
+ type: 'choice',
578
+ required: true,
579
+ answerValueSet: 'http://terminology.hl7.org.au/ValueSet/v3-ActEncounterCode-extended',
580
+ extension: [
581
+ {
582
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
583
+ valueExpression: {
584
+ language: 'text/fhirpath',
585
+ expression: '%Encounter.entry[0].resource.class'
586
+ }
587
+ }
588
+ ]
589
+ },
590
+ {
591
+ linkId: 'service-type',
592
+ text: 'Service Type',
593
+ type: 'choice',
594
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/service-type',
595
+ extension: [
596
+ {
597
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
598
+ valueExpression: {
599
+ language: 'text/fhirpath',
600
+ expression: '%Encounter.entry[0].resource.serviceType.coding'
601
+ }
602
+ }
603
+ ]
604
+ },
605
+ {
606
+ linkId: 'participant',
607
+ text: 'Participant',
608
+ type: 'group',
609
+ item: [
610
+ {
611
+ linkId: 'participant-type',
612
+ text: 'Participant Type',
613
+ type: 'choice',
614
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/encounter-participant-type',
615
+ extension: [
616
+ {
617
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
618
+ valueExpression: {
619
+ language: 'text/fhirpath',
620
+ expression: '%Encounter.entry[0].resource.participant.type.coding'
621
+ }
622
+ }
623
+ ]
624
+ },
625
+ {
626
+ linkId: 'participant-individual',
627
+ text: 'Participant Individual',
628
+ type: 'reference',
629
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/participant-individual',
630
+ extension: [
631
+ {
632
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
633
+ valueExpression: {
634
+ language: 'text/fhirpath',
635
+ expression: '%Encounter.entry[0].resource.participant.individual.reference'
636
+ }
637
+ }
638
+ ]
639
+ }
640
+ ]
641
+ },
642
+ {
643
+ linkId: 'period',
644
+ text: 'Period',
645
+ type: 'group',
646
+ item: [
647
+ {
648
+ linkId: 'period-start',
649
+ text: 'Period Start',
650
+ type: 'dateTime',
651
+ extension: [
652
+ {
653
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
654
+ valueExpression: {
655
+ language: 'text/fhirpath',
656
+ expression: '%Encounter.entry[0].resource.period.start'
657
+ }
658
+ }
659
+ ]
660
+ },
661
+ {
662
+ linkId: 'period-end',
663
+ text: 'Period End',
664
+ type: 'dateTime',
665
+ extension: [
666
+ {
667
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
668
+ valueExpression: {
669
+ language: 'text/fhirpath',
670
+ expression: '%Encounter.entry[0].resource.period.end'
671
+ }
672
+ }
673
+ ]
674
+ }
675
+ ]
676
+ },
677
+
678
+ {
679
+ linkId: 'reason-code',
680
+ text: 'Reason Code',
681
+ type: 'choice',
682
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/encounter-reason',
683
+ extension: [
684
+ {
685
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
686
+ valueExpression: {
687
+ language: 'text/fhirpath',
688
+ expression: '%Encounter.entry[0].resource.reasonCode.coding'
689
+ }
690
+ },
691
+ {
692
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
693
+ valueCodeableConcept: {
694
+ coding: [
695
+ {
696
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
697
+ code: 'autocomplete'
698
+ }
699
+ ]
700
+ }
701
+ }
702
+ ]
703
+ },
704
+ {
705
+ linkId: 'reason-reference',
706
+ text: 'Reason Reference',
707
+ type: 'reference',
708
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/reason-reference',
709
+ extension: [
710
+ {
711
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
712
+ valueExpression: {
713
+ language: 'text/fhirpath',
714
+ expression: '%Encounter.entry[0].resource.reasonReference.reference'
715
+ }
716
+ }
717
+ ]
718
+ },
719
+ {
720
+ linkId: 'location',
721
+ text: 'Location',
722
+ type: 'group',
723
+ item: [
724
+ {
725
+ linkId: 'location-location',
726
+ text: 'Location',
727
+ type: 'reference',
728
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/location',
729
+ extension: [
730
+ {
731
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
732
+ valueExpression: {
733
+ language: 'text/fhirpath',
734
+ expression: '%Encounter.entry[0].resource.location.location.reference'
735
+ }
736
+ }
737
+ ]
738
+ }
739
+ ]
740
+ },
741
+ {
742
+ linkId: 'service-provider',
743
+ text: 'Service Provider',
744
+ type: 'reference',
745
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/service-provider',
746
+ extension: [
747
+ {
748
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
749
+ valueExpression: {
750
+ language: 'text/fhirpath',
751
+ expression: '%Encounter.entry[0].resource.serviceProvider.reference'
752
+ }
753
+ }
754
+ ]
755
+ }
756
+ ]
757
+ }
758
+ ]
759
+ };
760
+
761
+ export const QAuCoreImmunization: Questionnaire = {
762
+ resourceType: 'Questionnaire',
763
+ id: 'AuCoreImmunization',
764
+ extension: [
765
+ {
766
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
767
+ extension: [
768
+ {
769
+ url: 'name',
770
+ valueCoding: {
771
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
772
+ code: 'patient'
773
+ }
774
+ },
775
+ {
776
+ url: 'type',
777
+ valueCode: 'Patient'
778
+ },
779
+ {
780
+ url: 'description',
781
+ valueString: 'The patient that is to be used to pre-populate the form'
782
+ }
783
+ ]
784
+ },
785
+ {
786
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
787
+ valueExpression: {
788
+ name: 'Immunization',
789
+ language: 'application/x-fhir-query',
790
+ expression: 'Immunization?patient={{%patient.id}}'
791
+ }
792
+ }
793
+ ],
794
+ version: '0.1.0',
795
+ name: 'AU Core Immunization',
796
+ title: 'AU Core Immunization',
797
+ status: 'draft',
798
+ date: '2024-07-24',
799
+ item: [
800
+ {
801
+ linkId: 'immunization',
802
+ text: 'AU Core Immunization',
803
+ type: 'group',
804
+ repeats: false,
805
+ item: [
806
+ {
807
+ linkId: 'patient-details',
808
+ text: 'Patient Details',
809
+ type: 'group',
810
+ item: [
811
+ {
812
+ extension: [
813
+ {
814
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
815
+ valueExpression: {
816
+ language: 'text/fhirpath',
817
+ expression: '%patient.id'
818
+ }
819
+ }
820
+ ],
821
+ linkId: 'patient-id',
822
+ text: 'Patient ID',
823
+ type: 'string',
824
+ required: true,
825
+ readOnly: true
826
+ },
827
+ {
828
+ extension: [
829
+ {
830
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
831
+ valueExpression: {
832
+ language: 'text/fhirpath',
833
+ expression:
834
+ "(%patient.name.where(use='official').select((family | (given\n| prefix).join(' ')).join(', ').where($this != '') | text)).first()"
835
+ }
836
+ }
837
+ ],
838
+ linkId: 'patient-name',
839
+ text: 'Patient Name',
840
+ type: 'string',
841
+ required: true,
842
+ readOnly: true
843
+ }
844
+ ]
845
+ },
846
+ {
847
+ linkId: 'first-immunization-note',
848
+ text: 'This questionnaire only uses the first Immunization resource of a referenced\npatient.',
849
+ _text: {
850
+ extension: [
851
+ {
852
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
853
+ valueString:
854
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n\n <b>This questionnaire only uses the first Immunization resource\nof a referenced\npatient.</b>\r\n</div>'
855
+ }
856
+ ]
857
+ },
858
+ type: 'display'
859
+ },
860
+ {
861
+ linkId: 'status',
862
+ text: 'Status',
863
+ type: 'choice',
864
+ required: true,
865
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/immunization-status',
866
+ extension: [
867
+ {
868
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
869
+ valueExpression: {
870
+ language: 'text/fhirpath',
871
+ expression: '%Immunization.entry[0].resource.status'
872
+ }
873
+ }
874
+ ]
875
+ },
876
+ {
877
+ linkId: 'vaccineCode',
878
+ text: 'Vaccine Code',
879
+ type: 'choice',
880
+ required: true,
881
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/vaccine-code',
882
+ extension: [
883
+ {
884
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
885
+ valueExpression: {
886
+ language: 'text/fhirpath',
887
+ expression: '%Immunization.entry[0].resource.vaccineCode.coding'
888
+ }
889
+ }
890
+ ]
891
+ },
892
+ {
893
+ linkId: 'occurrenceDateTime',
894
+ text: 'Occurrence DateTime',
895
+ type: 'dateTime',
896
+ extension: [
897
+ {
898
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
899
+ valueExpression: {
900
+ language: 'text/fhirpath',
901
+ expression: '%Immunization.entry[0].resource.occurrenceDateTime'
902
+ }
903
+ }
904
+ ]
905
+ },
906
+ {
907
+ linkId: 'primarySource',
908
+ text: 'Primary Source',
909
+ type: 'boolean',
910
+ extension: [
911
+ {
912
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
913
+ valueExpression: {
914
+ language: 'text/fhirpath',
915
+ expression: '%Immunization.entry[0].resource.primarySource'
916
+ }
917
+ }
918
+ ]
919
+ },
920
+ {
921
+ linkId: 'note',
922
+ text: 'Note',
923
+ type: 'text',
924
+ extension: [
925
+ {
926
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
927
+ valueExpression: {
928
+ language: 'text/fhirpath',
929
+ expression: '%Immunization.entry[0].resource.note.text'
930
+ }
931
+ }
932
+ ]
933
+ }
934
+ ]
935
+ }
936
+ ]
937
+ };
938
+
939
+ export const QAuCoreMedicationRequest: Questionnaire = {
940
+ resourceType: 'Questionnaire',
941
+ id: 'AuCoreMedicationRequest',
942
+ extension: [
943
+ {
944
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
945
+ extension: [
946
+ {
947
+ url: 'name',
948
+ valueCoding: {
949
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
950
+ code: 'patient'
951
+ }
952
+ },
953
+ {
954
+ url: 'type',
955
+ valueCode: 'Patient'
956
+ },
957
+ {
958
+ url: 'description',
959
+ valueString: 'The patient that is to be used to pre-populate the form'
960
+ }
961
+ ]
962
+ },
963
+ {
964
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
965
+ valueExpression: {
966
+ name: 'MedicationRequest',
967
+ language: 'application/x-fhir-query',
968
+ expression: 'MedicationRequest?patient={{%patient.id}}'
969
+ }
970
+ }
971
+ ],
972
+ version: '0.1.0',
973
+ name: 'AU Core Medication Request',
974
+ title: 'AU Core Medication Request',
975
+ status: 'draft',
976
+ date: '2024-07-24',
977
+ item: [
978
+ {
979
+ linkId: 'medication-request',
980
+ text: 'AU Core Medication Request',
981
+ type: 'group',
982
+ repeats: false,
983
+ item: [
984
+ {
985
+ linkId: 'patient-details',
986
+ text: 'Patient Details',
987
+ type: 'group',
988
+ item: [
989
+ {
990
+ extension: [
991
+ {
992
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
993
+ valueExpression: {
994
+ language: 'text/fhirpath',
995
+ expression: '%patient.id'
996
+ }
997
+ }
998
+ ],
999
+ linkId: 'patient-id',
1000
+ text: 'Patient ID',
1001
+ type: 'string',
1002
+ required: true,
1003
+ readOnly: true
1004
+ },
1005
+ {
1006
+ extension: [
1007
+ {
1008
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1009
+ valueExpression: {
1010
+ language: 'text/fhirpath',
1011
+ expression:
1012
+ "(%patient.name.where(use='official').select((family | (given\n| prefix).join(' ')).join(', ').where($this != '') | text)).first()"
1013
+ }
1014
+ }
1015
+ ],
1016
+ linkId: 'patient-name',
1017
+ text: 'Patient Name',
1018
+ type: 'string',
1019
+ required: true,
1020
+ readOnly: true
1021
+ }
1022
+ ]
1023
+ },
1024
+ {
1025
+ linkId: 'first-medication-request-note',
1026
+ text: 'This questionnaire only uses the first MedicationRequest resource of a referenced\npatient.',
1027
+ _text: {
1028
+ extension: [
1029
+ {
1030
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
1031
+ valueString:
1032
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n\n <b>This questionnaire only uses the first MedicationRequest resource\nof a referenced\npatient.</b>\r\n</div>'
1033
+ }
1034
+ ]
1035
+ },
1036
+ type: 'display'
1037
+ },
1038
+ {
1039
+ linkId: 'status',
1040
+ text: 'Status',
1041
+ type: 'choice',
1042
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/medicationrequest-status',
1043
+ extension: [
1044
+ {
1045
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1046
+ valueExpression: {
1047
+ language: 'text/fhirpath',
1048
+ expression: '%MedicationRequest.entry[0].resource.status'
1049
+ }
1050
+ }
1051
+ ]
1052
+ },
1053
+ {
1054
+ linkId: 'intent',
1055
+ text: 'Intent',
1056
+ type: 'choice',
1057
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/medicationrequest-intent',
1058
+ extension: [
1059
+ {
1060
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1061
+ valueExpression: {
1062
+ language: 'text/fhirpath',
1063
+ expression: '%MedicationRequest.entry[0].resource.intent'
1064
+ }
1065
+ }
1066
+ ]
1067
+ },
1068
+ {
1069
+ extension: [
1070
+ {
1071
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1072
+ valueExpression: {
1073
+ language: 'text/fhirpath',
1074
+ expression: '%MedicationRequest.entry[0].resource.medicationCodeableConcept.coding'
1075
+ }
1076
+ }
1077
+ ],
1078
+ linkId: 'medication-codeableconcept',
1079
+ text: 'Medication CodeableConcept',
1080
+ type: 'choice',
1081
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/medication-codes'
1082
+ },
1083
+ {
1084
+ linkId: 'encounter',
1085
+ text: 'Encounter',
1086
+ type: 'reference',
1087
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/encounter-reference',
1088
+ extension: [
1089
+ {
1090
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1091
+ valueExpression: {
1092
+ language: 'text/fhirpath',
1093
+ expression: '%MedicationRequest.entry[0].resource.encounter.reference'
1094
+ }
1095
+ }
1096
+ ]
1097
+ },
1098
+ {
1099
+ linkId: 'authored-on',
1100
+ text: 'Authored On',
1101
+ type: 'dateTime',
1102
+ extension: [
1103
+ {
1104
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1105
+ valueExpression: {
1106
+ language: 'text/fhirpath',
1107
+ expression: '%MedicationRequest.entry[0].resource.authoredOn'
1108
+ }
1109
+ }
1110
+ ]
1111
+ },
1112
+ {
1113
+ linkId: 'requester',
1114
+ text: 'Requester',
1115
+ type: 'reference',
1116
+ extension: [
1117
+ {
1118
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1119
+ valueExpression: {
1120
+ language: 'text/fhirpath',
1121
+ expression: '%MedicationRequest.entry[0].resource.requester.reference'
1122
+ }
1123
+ }
1124
+ ]
1125
+ },
1126
+ {
1127
+ linkId: 'reason-code',
1128
+ text: 'Reason Code',
1129
+ type: 'choice',
1130
+ answerValueSet: 'https://healthterminologies.gov.au/fhir/ValueSet/reason-for-request-1',
1131
+ extension: [
1132
+ {
1133
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1134
+ valueExpression: {
1135
+ language: 'text/fhirpath',
1136
+ expression: '%MedicationRequest.entry[0].resource.reasonCode.coding'
1137
+ }
1138
+ },
1139
+ {
1140
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
1141
+ valueCodeableConcept: {
1142
+ coding: [
1143
+ {
1144
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
1145
+ code: 'autocomplete'
1146
+ }
1147
+ ]
1148
+ }
1149
+ }
1150
+ ]
1151
+ },
1152
+ {
1153
+ linkId: 'dosage-instruction',
1154
+ text: 'Dosage Instruction',
1155
+ type: 'string',
1156
+ extension: [
1157
+ {
1158
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1159
+ valueExpression: {
1160
+ language: 'text/fhirpath',
1161
+ expression: '%MedicationRequest.entry[0].resource.dosageInstruction.text'
1162
+ }
1163
+ }
1164
+ ]
1165
+ }
1166
+ ]
1167
+ }
1168
+ ]
1169
+ };
1170
+
1171
+ export const QAuCorePatient: Questionnaire = {
1172
+ resourceType: 'Questionnaire',
1173
+ id: 'AuCorePatient',
1174
+ extension: [
1175
+ {
1176
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
1177
+ extension: [
1178
+ {
1179
+ url: 'name',
1180
+ valueCoding: {
1181
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
1182
+ code: 'patient'
1183
+ }
1184
+ },
1185
+ {
1186
+ url: 'type',
1187
+ valueCode: 'Patient'
1188
+ },
1189
+ {
1190
+ url: 'description',
1191
+ valueString: 'The patient that is to be used to pre-populate the form'
1192
+ }
1193
+ ]
1194
+ }
1195
+ ],
1196
+ version: '0.1.0',
1197
+ name: 'AU Core Patient',
1198
+ title: 'AU Core Patient',
1199
+ status: 'draft',
1200
+ date: '2024-07-24',
1201
+ item: [
1202
+ {
1203
+ linkId: 'patient',
1204
+ text: 'AU Core Patient',
1205
+ type: 'group',
1206
+ repeats: false,
1207
+ item: [
1208
+ {
1209
+ extension: [
1210
+ {
1211
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1212
+ valueExpression: {
1213
+ language: 'text/fhirpath',
1214
+ expression: '%patient.id'
1215
+ }
1216
+ }
1217
+ ],
1218
+ linkId: 'patient-id',
1219
+ text: 'Patient ID',
1220
+ type: 'string'
1221
+ },
1222
+ {
1223
+ linkId: 'extensions',
1224
+ text: 'Extensions',
1225
+ type: 'group',
1226
+ item: [
1227
+ {
1228
+ linkId: 'extension-indigenous-status',
1229
+ text: 'Indigenous Status',
1230
+ type: 'choice',
1231
+ answerValueSet:
1232
+ 'https://healthterminologies.gov.au/fhir/ValueSet/australian-indigenous-status-1',
1233
+ extension: [
1234
+ {
1235
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1236
+ valueExpression: {
1237
+ language: 'text/fhirpath',
1238
+ expression:
1239
+ "%patient.extension.where(url='http://hl7.org.au/fhir/StructureDefinition/indigenous-status').value"
1240
+ }
1241
+ }
1242
+ ]
1243
+ },
1244
+ {
1245
+ extension: [
1246
+ {
1247
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1248
+ valueExpression: {
1249
+ language: 'text/fhirpath',
1250
+ expression:
1251
+ "%patient.extension.where(exists(url='http://hl7.org/fhir/StructureDefinition/individual-genderIdentity') and extension.where(url='period').value.end.empty()).extension.where(url='value').value.coding"
1252
+ }
1253
+ },
1254
+ {
1255
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
1256
+ valueCodeableConcept: {
1257
+ coding: [
1258
+ {
1259
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
1260
+ code: 'drop-down'
1261
+ }
1262
+ ]
1263
+ }
1264
+ }
1265
+ ],
1266
+ linkId: 'f669a4fe-4818-429a-8847-d20da88d2bb3',
1267
+ text: 'Gender identity',
1268
+ type: 'choice',
1269
+ repeats: false,
1270
+ answerValueSet:
1271
+ 'https://healthterminologies.gov.au/fhir/ValueSet/gender-identity-response-1'
1272
+ },
1273
+ {
1274
+ linkId: 'extension-individual-pronouns',
1275
+ text: 'Individual Pronouns',
1276
+ type: 'choice',
1277
+ answerValueSet:
1278
+ 'https://healthterminologies.gov.au/fhir/ValueSet/australian-pronouns-1',
1279
+ extension: [
1280
+ {
1281
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1282
+ valueExpression: {
1283
+ language: 'text/fhirpath',
1284
+ expression:
1285
+ "%patient.extension.where(exists(url='http://hl7.org/fhir/StructureDefinition/individual-pronouns') and extension.where(url='period').value.end.empty()).extension.where(url='value').value.coding"
1286
+ }
1287
+ }
1288
+ ]
1289
+ }
1290
+ ]
1291
+ },
1292
+ {
1293
+ linkId: 'identifiers',
1294
+ text: 'Identifiers',
1295
+ type: 'group',
1296
+ item: [
1297
+ {
1298
+ linkId: 'identifier-ihi',
1299
+ text: 'IHI',
1300
+ type: 'string',
1301
+ extension: [
1302
+ {
1303
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1304
+ valueExpression: {
1305
+ language: 'text/fhirpath',
1306
+ expression:
1307
+ "%patient.identifier.where(type.coding.exists(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='NI')).value"
1308
+ }
1309
+ }
1310
+ ]
1311
+ },
1312
+ {
1313
+ linkId: 'identifier-medicare-number',
1314
+ text: 'Medicare Number',
1315
+ type: 'string',
1316
+ extension: [
1317
+ {
1318
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1319
+ valueExpression: {
1320
+ language: 'text/fhirpath',
1321
+ expression:
1322
+ "%patient.identifier.where(type.coding.exists(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='MC')).value"
1323
+ }
1324
+ }
1325
+ ]
1326
+ },
1327
+ {
1328
+ linkId: 'identifier-dva-number',
1329
+ text: 'DVA Number',
1330
+ type: 'string',
1331
+ extension: [
1332
+ {
1333
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1334
+ valueExpression: {
1335
+ language: 'text/fhirpath',
1336
+ expression:
1337
+ "%patient.identifier.where(type.coding.exists(system='http://terminology.hl7.org.au/CodeSystem/v2-0203' and code='DVAU')).value"
1338
+ }
1339
+ }
1340
+ ]
1341
+ },
1342
+ {
1343
+ linkId: 'identifier-healthcare-card-number',
1344
+ text: 'Healthcare Card Number',
1345
+ type: 'string',
1346
+ extension: [
1347
+ {
1348
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1349
+ valueExpression: {
1350
+ language: 'text/fhirpath',
1351
+ expression:
1352
+ "%patient.identifier.where(type.coding.exists(system='http://terminology.hl7.org.au/CodeSystem/v2-0203' and code='HC')).value"
1353
+ }
1354
+ }
1355
+ ]
1356
+ },
1357
+ {
1358
+ linkId: 'identifier-pensioner-consession-card-number',
1359
+ text: 'Pensioner Concession Card Number',
1360
+ type: 'string',
1361
+ extension: [
1362
+ {
1363
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1364
+ valueExpression: {
1365
+ language: 'text/fhirpath',
1366
+ expression:
1367
+ "%patient.identifier.where(type.coding.exists(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='PEN')).value"
1368
+ }
1369
+ }
1370
+ ]
1371
+ },
1372
+ {
1373
+ linkId: 'identifier-senior-health-card-number',
1374
+ text: 'Seniors Health Card Number',
1375
+ type: 'string',
1376
+ extension: [
1377
+ {
1378
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1379
+ valueExpression: {
1380
+ language: 'text/fhirpath',
1381
+ expression:
1382
+ "%patient.identifier.where(type.coding.exists(system='http://terminology.hl7.org.au/CodeSystem/v2-0203' and code='SEN')).value"
1383
+ }
1384
+ }
1385
+ ]
1386
+ },
1387
+ {
1388
+ linkId: 'identifier-medical-record-number',
1389
+ text: 'Medical Record Number',
1390
+ type: 'string',
1391
+ extension: [
1392
+ {
1393
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1394
+ valueExpression: {
1395
+ language: 'text/fhirpath',
1396
+ expression:
1397
+ "%patient.identifier.where(type.coding.exists(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='MR')).value"
1398
+ }
1399
+ }
1400
+ ]
1401
+ },
1402
+ {
1403
+ linkId: 'identifier-au-insurance-member-number',
1404
+ text: ' AU Insurance Member Number',
1405
+ type: 'string',
1406
+ extension: [
1407
+ {
1408
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1409
+ valueExpression: {
1410
+ language: 'text/fhirpath',
1411
+ expression:
1412
+ "%patient.identifier.where(type.coding.exists(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='MB')).value"
1413
+ }
1414
+ }
1415
+ ]
1416
+ }
1417
+ ]
1418
+ },
1419
+ {
1420
+ linkId: 'name',
1421
+ text: 'Name',
1422
+ type: 'group',
1423
+ item: [
1424
+ {
1425
+ linkId: 'name-use',
1426
+ text: 'Name Use',
1427
+ type: 'choice',
1428
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/name-use',
1429
+ extension: [
1430
+ {
1431
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1432
+ valueExpression: {
1433
+ language: 'text/fhirpath',
1434
+ expression: '%patient.name.use'
1435
+ }
1436
+ }
1437
+ ]
1438
+ },
1439
+ {
1440
+ linkId: 'name-text',
1441
+ text: 'Name Text',
1442
+ type: 'string',
1443
+ extension: [
1444
+ {
1445
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1446
+ valueExpression: {
1447
+ language: 'text/fhirpath',
1448
+ expression: '%patient.name.text'
1449
+ }
1450
+ }
1451
+ ]
1452
+ },
1453
+ {
1454
+ linkId: 'name-family',
1455
+ text: 'Family Name',
1456
+ type: 'string',
1457
+ extension: [
1458
+ {
1459
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1460
+ valueExpression: {
1461
+ language: 'text/fhirpath',
1462
+ expression: '%patient.name.family'
1463
+ }
1464
+ }
1465
+ ]
1466
+ },
1467
+ {
1468
+ linkId: 'name-given',
1469
+ text: 'Given Name',
1470
+ type: 'string',
1471
+ extension: [
1472
+ {
1473
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1474
+ valueExpression: {
1475
+ language: 'text/fhirpath',
1476
+ expression: '%patient.name.given'
1477
+ }
1478
+ }
1479
+ ]
1480
+ }
1481
+ ]
1482
+ },
1483
+ {
1484
+ linkId: 'telecom',
1485
+ text: 'Telecom',
1486
+ type: 'group',
1487
+ item: [
1488
+ {
1489
+ extension: [
1490
+ {
1491
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1492
+ valueExpression: {
1493
+ language: 'text/fhirpath',
1494
+ expression: "%patient.telecom.where(system = 'phone' and use = 'home').value"
1495
+ }
1496
+ }
1497
+ ],
1498
+ linkId: '9541f0b0-f5ba-4fe7-a8e9-ad003cef897b',
1499
+ text: 'Home phone',
1500
+ type: 'string'
1501
+ },
1502
+ {
1503
+ extension: [
1504
+ {
1505
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1506
+ valueExpression: {
1507
+ language: 'text/fhirpath',
1508
+ expression: "%patient.telecom.where(system = 'phone' and use = 'mobile').value"
1509
+ }
1510
+ }
1511
+ ],
1512
+ linkId: '4037a02b-4a85-40e0-9be6-5b17df1aac56',
1513
+ text: 'Mobile phone',
1514
+ type: 'string'
1515
+ }
1516
+ ]
1517
+ },
1518
+ {
1519
+ linkId: 'gender',
1520
+ text: 'Gender',
1521
+ type: 'choice',
1522
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/administrative-gender',
1523
+ extension: [
1524
+ {
1525
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1526
+ valueExpression: {
1527
+ language: 'text/fhirpath',
1528
+ expression: '%patient.gender'
1529
+ }
1530
+ }
1531
+ ]
1532
+ },
1533
+ {
1534
+ linkId: 'birth-date',
1535
+ text: 'Birth Date',
1536
+ type: 'string',
1537
+ extension: [
1538
+ {
1539
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1540
+ valueExpression: {
1541
+ language: 'text/fhirpath',
1542
+ expression: '%patient.birthDate'
1543
+ }
1544
+ }
1545
+ ]
1546
+ },
1547
+ {
1548
+ linkId: 'address',
1549
+ text: 'Address',
1550
+ type: 'group',
1551
+ item: [
1552
+ {
1553
+ linkId: 'address-use',
1554
+ text: 'Address Use',
1555
+ type: 'choice',
1556
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/address-use',
1557
+ extension: [
1558
+ {
1559
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1560
+ valueExpression: {
1561
+ language: 'text/fhirpath',
1562
+ expression: '%patient.address.use'
1563
+ }
1564
+ }
1565
+ ]
1566
+ },
1567
+ {
1568
+ linkId: 'address-text',
1569
+ text: 'Address Text',
1570
+ type: 'string',
1571
+ extension: [
1572
+ {
1573
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1574
+ valueExpression: {
1575
+ language: 'text/fhirpath',
1576
+ expression: '%patient.address.text'
1577
+ }
1578
+ }
1579
+ ]
1580
+ },
1581
+ {
1582
+ linkId: 'address-line',
1583
+ text: 'Address Line',
1584
+ type: 'string',
1585
+ repeats: true,
1586
+ extension: [
1587
+ {
1588
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1589
+ valueExpression: {
1590
+ language: 'text/fhirpath',
1591
+ expression: '%patient.address.line'
1592
+ }
1593
+ }
1594
+ ]
1595
+ },
1596
+ {
1597
+ linkId: 'address-city',
1598
+ text: 'City',
1599
+ type: 'string',
1600
+ extension: [
1601
+ {
1602
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1603
+ valueExpression: {
1604
+ language: 'text/fhirpath',
1605
+ expression: '%patient.address.city'
1606
+ }
1607
+ }
1608
+ ]
1609
+ },
1610
+ {
1611
+ linkId: 'address-state',
1612
+ text: 'State',
1613
+ type: 'string',
1614
+ extension: [
1615
+ {
1616
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1617
+ valueExpression: {
1618
+ language: 'text/fhirpath',
1619
+ expression: '%patient.address.state'
1620
+ }
1621
+ }
1622
+ ]
1623
+ },
1624
+ {
1625
+ linkId: 'address-postal-code',
1626
+ text: 'Postal Code',
1627
+ type: 'string',
1628
+ extension: [
1629
+ {
1630
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1631
+ valueExpression: {
1632
+ language: 'text/fhirpath',
1633
+ expression: '%patient.address.postalCode'
1634
+ }
1635
+ }
1636
+ ]
1637
+ }
1638
+ ]
1639
+ },
1640
+ {
1641
+ linkId: 'communication',
1642
+ text: 'Communication',
1643
+ type: 'group',
1644
+ item: [
1645
+ {
1646
+ linkId: 'communication-language',
1647
+ text: 'Communication Language',
1648
+ type: 'choice',
1649
+ answerValueSet:
1650
+ 'https://healthterminologies.gov.au/fhir/ValueSet/common-languages-australia-2',
1651
+ extension: [
1652
+ {
1653
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1654
+ valueExpression: {
1655
+ language: 'text/fhirpath',
1656
+ expression: '%patient.communication.language.coding'
1657
+ }
1658
+ }
1659
+ ]
1660
+ },
1661
+ {
1662
+ linkId: 'communication-preferred',
1663
+ text: 'Communication Preferred',
1664
+ type: 'boolean',
1665
+ extension: [
1666
+ {
1667
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1668
+ valueExpression: {
1669
+ language: 'text/fhirpath',
1670
+ expression: '%patient.communication.preferred'
1671
+ }
1672
+ }
1673
+ ]
1674
+ }
1675
+ ]
1676
+ }
1677
+ ]
1678
+ }
1679
+ ]
1680
+ };
1681
+
1682
+ export const QAuCorePractitioner: Questionnaire = {
1683
+ resourceType: 'Questionnaire',
1684
+ id: 'AuCorePractitioner',
1685
+ extension: [
1686
+ {
1687
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
1688
+ extension: [
1689
+ {
1690
+ url: 'name',
1691
+ valueCoding: {
1692
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
1693
+ code: 'user'
1694
+ }
1695
+ },
1696
+ {
1697
+ url: 'type',
1698
+ valueCode: 'Practitioner'
1699
+ },
1700
+ {
1701
+ url: 'description',
1702
+ valueString: 'The practitioner that is to be used to pre-populate the form'
1703
+ }
1704
+ ]
1705
+ }
1706
+ ],
1707
+ version: '0.1.0',
1708
+ name: 'AU Core Practitioner',
1709
+ title: 'AU Core Practitioner',
1710
+ status: 'draft',
1711
+ date: '2024-07-24',
1712
+ item: [
1713
+ {
1714
+ linkId: 'practitioner',
1715
+ text: 'AU Core Practitioner',
1716
+ type: 'group',
1717
+ repeats: false,
1718
+ item: [
1719
+ {
1720
+ linkId: 'identifiers',
1721
+ text: 'Identifiers',
1722
+ type: 'group',
1723
+ item: [
1724
+ {
1725
+ linkId: 'identifier-au-hpi-i',
1726
+ text: 'Healthcare Provider Identifier – Individual',
1727
+ type: 'string',
1728
+ extension: [
1729
+ {
1730
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1731
+ valueExpression: {
1732
+ language: 'text/fhirpath',
1733
+ expression:
1734
+ "%user.identifier.where(type.coding.exists(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='NPI')).value"
1735
+ }
1736
+ }
1737
+ ]
1738
+ },
1739
+ {
1740
+ linkId: 'identifier-pbs-presciber-number',
1741
+ text: 'PBS Prescriber Number',
1742
+ type: 'string',
1743
+ extension: [
1744
+ {
1745
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1746
+ valueExpression: {
1747
+ language: 'text/fhirpath',
1748
+ expression:
1749
+ "%user.identifier.where(type.coding.exists(system='http://terminology.hl7.org.au/CodeSystem/v2-0203' and code='PRES')).value"
1750
+ }
1751
+ }
1752
+ ]
1753
+ },
1754
+ {
1755
+ linkId: 'identifier-cae-identifier',
1756
+ text: 'Care Agency Employee (CAE) Identifier',
1757
+ type: 'string',
1758
+ extension: [
1759
+ {
1760
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1761
+ valueExpression: {
1762
+ language: 'text/fhirpath',
1763
+ expression:
1764
+ "%user.identifier.where(type.coding.exists(system='http://terminology.hl7.org.au/CodeSystem/v2-0203' and code='CAEI')).value"
1765
+ }
1766
+ }
1767
+ ]
1768
+ },
1769
+ {
1770
+ linkId: 'identifier-ahpra-number',
1771
+ text: 'Australian Health Practitioner Regulation Agency (Ahpra) Registration Number',
1772
+ type: 'string',
1773
+ extension: [
1774
+ {
1775
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1776
+ valueExpression: {
1777
+ language: 'text/fhirpath',
1778
+ expression:
1779
+ "%user.identifier.where(type.coding.exists(system='http://terminology.hl7.org.au/CodeSystem/v2-0203' and code='AHPRA')).value"
1780
+ }
1781
+ }
1782
+ ]
1783
+ }
1784
+ ]
1785
+ },
1786
+ {
1787
+ linkId: 'name',
1788
+ text: 'Name',
1789
+ type: 'group',
1790
+ item: [
1791
+ {
1792
+ linkId: 'name-family',
1793
+ text: 'Family Name',
1794
+ type: 'string',
1795
+ extension: [
1796
+ {
1797
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1798
+ valueExpression: {
1799
+ language: 'text/fhirpath',
1800
+ expression: '%user.name.family'
1801
+ }
1802
+ }
1803
+ ]
1804
+ },
1805
+ {
1806
+ linkId: 'name-given',
1807
+ text: 'Given Name',
1808
+ type: 'string',
1809
+ extension: [
1810
+ {
1811
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1812
+ valueExpression: {
1813
+ language: 'text/fhirpath',
1814
+ expression: '%user.name.given'
1815
+ }
1816
+ }
1817
+ ]
1818
+ }
1819
+ ]
1820
+ }
1821
+ ]
1822
+ }
1823
+ ]
1824
+ };
1825
+
1826
+ export const QAuCorePractitionerRole: Questionnaire = {
1827
+ resourceType: 'Questionnaire',
1828
+ id: 'AuCorePractitionerRole',
1829
+ extension: [
1830
+ {
1831
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
1832
+ extension: [
1833
+ {
1834
+ url: 'name',
1835
+ valueCoding: {
1836
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
1837
+ code: 'user'
1838
+ }
1839
+ },
1840
+ {
1841
+ url: 'type',
1842
+ valueCode: 'Practitioner'
1843
+ },
1844
+ {
1845
+ url: 'description',
1846
+ valueString: 'The practitioner that is to be used to pre-populate the form'
1847
+ }
1848
+ ]
1849
+ },
1850
+ {
1851
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
1852
+ valueExpression: {
1853
+ name: 'PractitionerRole',
1854
+ language: 'application/x-fhir-query',
1855
+ expression: 'PractitionerRole?practitioner={{%user.id}}'
1856
+ }
1857
+ }
1858
+ ],
1859
+ version: '0.1.0',
1860
+ name: 'AU Core PractitionerRole',
1861
+ title: 'AU Core PractitionerRole',
1862
+ status: 'draft',
1863
+ date: '2024-07-24',
1864
+ item: [
1865
+ {
1866
+ linkId: 'practitionerRole',
1867
+ text: 'AU Core PractitionerRole',
1868
+ type: 'group',
1869
+ repeats: false,
1870
+ item: [
1871
+ {
1872
+ linkId: 'practitioner-details',
1873
+ text: 'Practitioner Details',
1874
+ type: 'group',
1875
+ item: [
1876
+ {
1877
+ extension: [
1878
+ {
1879
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1880
+ valueExpression: {
1881
+ language: 'text/fhirpath',
1882
+ expression: '%user.id'
1883
+ }
1884
+ }
1885
+ ],
1886
+ linkId: 'practitioner-id',
1887
+ text: 'Practitioner ID',
1888
+ type: 'string',
1889
+ required: true,
1890
+ readOnly: true
1891
+ },
1892
+ {
1893
+ extension: [
1894
+ {
1895
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1896
+ valueExpression: {
1897
+ language: 'text/fhirpath',
1898
+ expression:
1899
+ "(%user.name.select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()"
1900
+ }
1901
+ }
1902
+ ],
1903
+ linkId: 'practitioner-name',
1904
+ text: 'Practitioner Name',
1905
+ type: 'string',
1906
+ required: true,
1907
+ readOnly: true
1908
+ }
1909
+ ]
1910
+ },
1911
+ {
1912
+ linkId: 'identifiers',
1913
+ text: 'Identifiers',
1914
+ type: 'group',
1915
+ item: [
1916
+ {
1917
+ linkId: 'identifier-medicare-provider-number',
1918
+ text: 'Medicare Provider Number',
1919
+ type: 'string',
1920
+ extension: [
1921
+ {
1922
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1923
+ valueExpression: {
1924
+ language: 'text/fhirpath',
1925
+ expression:
1926
+ "%PractitionerRole.entry[0].resource.identifier.where(type.coding.exists(system='http://terminology.hl7.org.au/CodeSystem/v2-0203' and code='UPIN')).value"
1927
+ }
1928
+ }
1929
+ ]
1930
+ },
1931
+ {
1932
+ linkId: 'identifier-national-provider-identifier',
1933
+ text: 'National Provider Identifier at Organisation (NPIO)',
1934
+ type: 'string',
1935
+ extension: [
1936
+ {
1937
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1938
+ valueExpression: {
1939
+ language: 'text/fhirpath',
1940
+ expression:
1941
+ "%PractitionerRole.entry[0].resource.identifier.where(type.coding.exists(system='http://terminology.hl7.org.au/CodeSystem/v2-0203' and code='NPIO')).value"
1942
+ }
1943
+ }
1944
+ ]
1945
+ },
1946
+ {
1947
+ linkId: 'identifier-employee-number',
1948
+ text: 'Employee Number',
1949
+ type: 'string',
1950
+ extension: [
1951
+ {
1952
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1953
+ valueExpression: {
1954
+ language: 'text/fhirpath',
1955
+ expression:
1956
+ "%PractitionerRole.entry[0].resource.identifier.where(type.coding.exists(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='EI')).value"
1957
+ }
1958
+ }
1959
+ ]
1960
+ }
1961
+ ]
1962
+ },
1963
+ {
1964
+ linkId: 'organization',
1965
+ text: 'Organization',
1966
+ type: 'reference',
1967
+ extension: [
1968
+ {
1969
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1970
+ valueExpression: {
1971
+ language: 'text/fhirpath',
1972
+ expression: '%PractitionerRole.entry[0].resource.organization.reference'
1973
+ }
1974
+ }
1975
+ ]
1976
+ },
1977
+ {
1978
+ linkId: 'code',
1979
+ text: 'Code',
1980
+ type: 'choice',
1981
+ answerValueSet: 'https://healthterminologies.gov.au/fhir/ValueSet/practitioner-role-1',
1982
+ extension: [
1983
+ {
1984
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
1985
+ valueExpression: {
1986
+ language: 'text/fhirpath',
1987
+ expression: '%PractitionerRole.entry[0].resource.code.coding'
1988
+ }
1989
+ }
1990
+ ]
1991
+ },
1992
+ {
1993
+ linkId: 'specialty',
1994
+ text: 'Specialty',
1995
+ type: 'choice',
1996
+ answerValueSet: 'https://healthterminologies.gov.au/fhir/ValueSet/clinical-specialty-1',
1997
+ extension: [
1998
+ {
1999
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2000
+ valueExpression: {
2001
+ language: 'text/fhirpath',
2002
+ expression: '%PractitionerRole.entry[0].resource.specialty.coding'
2003
+ }
2004
+ }
2005
+ ]
2006
+ },
2007
+ {
2008
+ linkId: 'telecom',
2009
+ text: 'Telecom',
2010
+ type: 'group',
2011
+ item: [
2012
+ {
2013
+ extension: [
2014
+ {
2015
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2016
+ valueExpression: {
2017
+ language: 'text/fhirpath',
2018
+ expression:
2019
+ "%PractitionerRole.entry[0].resource.telecom.where(system = 'phone' and use = 'work').value"
2020
+ }
2021
+ }
2022
+ ],
2023
+ linkId: '9541f0b0-f5ba-4fe7-a8e9-ad003cef897b',
2024
+ text: 'Home phone',
2025
+ type: 'string'
2026
+ },
2027
+ {
2028
+ extension: [
2029
+ {
2030
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2031
+ valueExpression: {
2032
+ language: 'text/fhirpath',
2033
+ expression:
2034
+ "%PractitionerRole.entry[0].resource.telecom.where(system = 'email' and use = 'work').value"
2035
+ }
2036
+ }
2037
+ ],
2038
+ linkId: '4037a02b-4a85-40e0-9be6-5b17df1aac56',
2039
+ text: 'Mobile phone',
2040
+ type: 'string'
2041
+ }
2042
+ ]
2043
+ }
2044
+ ]
2045
+ }
2046
+ ]
2047
+ };
2048
+
2049
+ export const QAuCoreProcedure: Questionnaire = {
2050
+ resourceType: 'Questionnaire',
2051
+ id: 'AuCoreProcedure',
2052
+ extension: [
2053
+ {
2054
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
2055
+ extension: [
2056
+ {
2057
+ url: 'name',
2058
+ valueCoding: {
2059
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
2060
+ code: 'patient'
2061
+ }
2062
+ },
2063
+ {
2064
+ url: 'type',
2065
+ valueCode: 'Patient'
2066
+ },
2067
+ {
2068
+ url: 'description',
2069
+ valueString: 'The procedure that is to be used to pre-populate the form'
2070
+ }
2071
+ ]
2072
+ },
2073
+ {
2074
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
2075
+ valueExpression: {
2076
+ name: 'Procedure',
2077
+ language: 'application/x-fhir-query',
2078
+ expression: 'Procedure?patient={{%patient.id}}'
2079
+ }
2080
+ }
2081
+ ],
2082
+ version: '0.1.0',
2083
+ name: 'AU Core Procedure',
2084
+ title: 'AU Core Procedure',
2085
+ status: 'draft',
2086
+ date: '2024-07-24',
2087
+ item: [
2088
+ {
2089
+ linkId: 'procedure',
2090
+ text: 'AU Core Procedure',
2091
+ type: 'group',
2092
+ repeats: false,
2093
+ item: [
2094
+ {
2095
+ linkId: 'patient-details',
2096
+ text: 'Patient Details',
2097
+ type: 'group',
2098
+ item: [
2099
+ {
2100
+ extension: [
2101
+ {
2102
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2103
+ valueExpression: {
2104
+ language: 'text/fhirpath',
2105
+ expression: '%patient.id'
2106
+ }
2107
+ }
2108
+ ],
2109
+ linkId: 'patient-id',
2110
+ text: 'Patient ID',
2111
+ type: 'string',
2112
+ required: true,
2113
+ readOnly: true
2114
+ },
2115
+ {
2116
+ extension: [
2117
+ {
2118
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2119
+ valueExpression: {
2120
+ language: 'text/fhirpath',
2121
+ expression:
2122
+ "(%patient.name.where(use='official').select((family | (given\n| prefix).join(' ')).join(', ').where($this != '') | text)).first()"
2123
+ }
2124
+ }
2125
+ ],
2126
+ linkId: 'patient-name',
2127
+ text: 'Patient Name',
2128
+ type: 'string',
2129
+ required: true,
2130
+ readOnly: true
2131
+ }
2132
+ ]
2133
+ },
2134
+ {
2135
+ linkId: 'first-procedure-note',
2136
+ text: 'This questionnaire only uses the first Procedure resource of a referenced\npatient.',
2137
+ _text: {
2138
+ extension: [
2139
+ {
2140
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
2141
+ valueString:
2142
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n\n <b>This questionnaire only uses the first Procedure resource\nof a referenced\npatient.</b>\r\n</div>'
2143
+ }
2144
+ ]
2145
+ },
2146
+ type: 'display'
2147
+ },
2148
+ {
2149
+ linkId: 'status',
2150
+ text: 'Status',
2151
+ type: 'choice',
2152
+ required: true,
2153
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/event-status',
2154
+ extension: [
2155
+ {
2156
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2157
+ valueExpression: {
2158
+ language: 'text/fhirpath',
2159
+ expression: '%Procedure.entry[0].resource.status'
2160
+ }
2161
+ }
2162
+ ]
2163
+ },
2164
+ {
2165
+ linkId: 'code',
2166
+ text: 'Code',
2167
+ type: 'choice',
2168
+ required: true,
2169
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/procedure-code',
2170
+ extension: [
2171
+ {
2172
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2173
+ valueExpression: {
2174
+ language: 'text/fhirpath',
2175
+ expression: '%Procedure.entry[0].resource.code.coding'
2176
+ }
2177
+ },
2178
+ {
2179
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
2180
+ valueCodeableConcept: {
2181
+ coding: [
2182
+ {
2183
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
2184
+ code: 'autocomplete'
2185
+ }
2186
+ ]
2187
+ }
2188
+ }
2189
+ ]
2190
+ },
2191
+
2192
+ {
2193
+ linkId: 'encounter',
2194
+ text: 'Encounter',
2195
+ type: 'reference',
2196
+ extension: [
2197
+ {
2198
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2199
+ valueExpression: {
2200
+ language: 'text/fhirpath',
2201
+ expression: '%Procedure.entry[0].resource.encounter.reference'
2202
+ }
2203
+ }
2204
+ ]
2205
+ },
2206
+ {
2207
+ linkId: 'performed',
2208
+ text: 'Performed[x]',
2209
+ type: 'string',
2210
+ extension: [
2211
+ {
2212
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2213
+ valueExpression: {
2214
+ language: 'text/fhirpath',
2215
+ expression: '%Procedure.entry[0].resource.performed'
2216
+ }
2217
+ }
2218
+ ]
2219
+ },
2220
+ {
2221
+ linkId: 'reasonCode',
2222
+ text: 'Reason Code',
2223
+ type: 'choice',
2224
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/procedure-reason',
2225
+ extension: [
2226
+ {
2227
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2228
+ valueExpression: {
2229
+ language: 'text/fhirpath',
2230
+ expression: '%Procedure.entry[0].resource.reasonCode.coding'
2231
+ }
2232
+ },
2233
+ {
2234
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
2235
+ valueCodeableConcept: {
2236
+ coding: [
2237
+ {
2238
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
2239
+ code: 'autocomplete'
2240
+ }
2241
+ ]
2242
+ }
2243
+ }
2244
+ ]
2245
+ }
2246
+ ]
2247
+ }
2248
+ ]
2249
+ };
2250
+
2251
+ export const QAuCoreObservationBP: Questionnaire = {
2252
+ resourceType: 'Questionnaire',
2253
+ id: 'BloodPressureObservation',
2254
+ version: '0.1.0',
2255
+ name: 'BloodPressureObservation',
2256
+ title: 'Blood Pressure Observation',
2257
+ status: 'draft',
2258
+ date: '2024-07-15',
2259
+ extension: [
2260
+ {
2261
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
2262
+ extension: [
2263
+ {
2264
+ url: 'name',
2265
+ valueCoding: {
2266
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
2267
+ code: 'patient'
2268
+ }
2269
+ },
2270
+ {
2271
+ url: 'type',
2272
+ valueCode: 'Patient'
2273
+ },
2274
+ {
2275
+ url: 'description',
2276
+ valueString: 'The patient that is to be used to pre-populate the form'
2277
+ }
2278
+ ]
2279
+ },
2280
+ {
2281
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
2282
+ valueExpression: {
2283
+ name: 'ObservationBP',
2284
+ language: 'application/x-fhir-query',
2285
+ expression: 'Observation?code=75367002&_count=1&_sort=-date&patient={{%patient.id}}'
2286
+ }
2287
+ }
2288
+ ],
2289
+ item: [
2290
+ {
2291
+ linkId: 'observation',
2292
+ text: 'AU Core Observation - Blood Pressure',
2293
+ type: 'group',
2294
+ item: [
2295
+ {
2296
+ linkId: 'patient-details',
2297
+ text: 'Patient Details',
2298
+ type: 'group',
2299
+ item: [
2300
+ {
2301
+ extension: [
2302
+ {
2303
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2304
+ valueExpression: {
2305
+ language: 'text/fhirpath',
2306
+ expression: '%patient.id'
2307
+ }
2308
+ }
2309
+ ],
2310
+ linkId: 'patient-id',
2311
+ text: 'Patient ID',
2312
+ type: 'string',
2313
+ required: true,
2314
+ readOnly: true
2315
+ },
2316
+ {
2317
+ extension: [
2318
+ {
2319
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2320
+ valueExpression: {
2321
+ language: 'text/fhirpath',
2322
+ expression:
2323
+ "(%patient.name.where(use='official').select((family | (given\n| prefix).join(' ')).join(', ').where($this != '') | text)).first()"
2324
+ }
2325
+ }
2326
+ ],
2327
+ linkId: 'patient-name',
2328
+ text: 'Patient Name',
2329
+ type: 'string',
2330
+ required: true,
2331
+ readOnly: true
2332
+ }
2333
+ ]
2334
+ },
2335
+ {
2336
+ linkId: 'first-observation-note',
2337
+ text: 'This questionnaire only uses the first Observation resource with LOINC code 85354-9 (Blood pressure) of a referenced\npatient.',
2338
+ _text: {
2339
+ extension: [
2340
+ {
2341
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
2342
+ valueString:
2343
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n\n <b>This questionnaire only uses the first Observation resource with LOINC code 85354-9 (Blood pressure) of a referenced\npatient.</b>\r\n</div>'
2344
+ }
2345
+ ]
2346
+ },
2347
+ type: 'display'
2348
+ },
2349
+ {
2350
+ linkId: 'observation-status',
2351
+ text: 'Observation Status',
2352
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-status',
2353
+ type: 'choice',
2354
+ extension: [
2355
+ {
2356
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2357
+ valueExpression: {
2358
+ language: 'text/fhirpath',
2359
+ expression: '%ObservationBP.entry[0].resource.status'
2360
+ }
2361
+ }
2362
+ ]
2363
+ },
2364
+ {
2365
+ linkId: 'observation-category',
2366
+ text: 'Observation Category',
2367
+ type: 'choice',
2368
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-category',
2369
+ extension: [
2370
+ {
2371
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2372
+ valueExpression: {
2373
+ language: 'text/fhirpath',
2374
+ expression: '%ObservationBP.entry[0].resource.category.coding'
2375
+ }
2376
+ }
2377
+ ]
2378
+ },
2379
+ {
2380
+ linkId: 'observation-category-vscat-boolean',
2381
+ text: 'Observation Category is VSCat?',
2382
+ type: 'boolean',
2383
+ extension: [
2384
+ {
2385
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2386
+ valueExpression: {
2387
+ language: 'text/fhirpath',
2388
+ expression: "%ObservationBP.entry[0].resource.category.coding.code = 'vital-signs'"
2389
+ }
2390
+ }
2391
+ ]
2392
+ },
2393
+ {
2394
+ linkId: 'observation-code-loinc',
2395
+ text: 'Observation Code (LOINC)',
2396
+ type: 'choice',
2397
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-vitalsignresult',
2398
+ extension: [
2399
+ {
2400
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2401
+ valueExpression: {
2402
+ language: 'text/fhirpath',
2403
+ expression:
2404
+ "%ObservationBP.entry[0].resource.code.coding.where(system='http://loinc.org' and code='85354-9')"
2405
+ }
2406
+ }
2407
+ ]
2408
+ },
2409
+ {
2410
+ linkId: 'observation-code-snomed',
2411
+ text: 'Observation Code (SNOMED)',
2412
+ type: 'choice',
2413
+ answerValueSet: 'http://snomed.info/sct/32506021000036107',
2414
+ extension: [
2415
+ {
2416
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
2417
+ valueCodeableConcept: {
2418
+ coding: [
2419
+ {
2420
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
2421
+ code: 'autocomplete'
2422
+ }
2423
+ ]
2424
+ }
2425
+ },
2426
+ {
2427
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2428
+ valueExpression: {
2429
+ language: 'text/fhirpath',
2430
+ expression:
2431
+ "%ObservationBP.entry[0].resource.code.coding.where(system='http://snomed.info/sct' and code='75367002')"
2432
+ }
2433
+ }
2434
+ ]
2435
+ },
2436
+ {
2437
+ linkId: 'Observation.effectivedateTime',
2438
+ text: 'Effective Date Time',
2439
+ type: 'dateTime',
2440
+ extension: [
2441
+ {
2442
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2443
+ valueExpression: {
2444
+ language: 'text/fhirpath',
2445
+ expression: '%ObservationBP.entry[0].resource.effectiveDateTime'
2446
+ }
2447
+ }
2448
+ ]
2449
+ },
2450
+ {
2451
+ linkId: 'component-systolic-bp',
2452
+ text: 'SystolicBP Component',
2453
+ type: 'group',
2454
+ extension: [
2455
+ {
2456
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext',
2457
+ valueExpression: {
2458
+ name: 'ComponentSystolic',
2459
+ language: 'text/fhirpath',
2460
+ expression: '%ObservationBP.entry[0].resource.component[0]'
2461
+ }
2462
+ }
2463
+ ],
2464
+ item: [
2465
+ {
2466
+ linkId: 'component-systolic-bp-code-loinc',
2467
+ text: 'Code (LOINC)',
2468
+ type: 'choice',
2469
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-vitalsignresult',
2470
+ extension: [
2471
+ {
2472
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2473
+ valueExpression: {
2474
+ language: 'text/fhirpath',
2475
+ expression:
2476
+ "%ComponentSystolic.code.coding.where(system='http://loinc.org' and code='8480-6')"
2477
+ }
2478
+ }
2479
+ ]
2480
+ },
2481
+ {
2482
+ linkId: 'component-systolic-bp-code-snomed',
2483
+ text: 'Code (SNOMED)',
2484
+ type: 'choice',
2485
+ answerValueSet: 'http://snomed.info/sct/32506021000036107',
2486
+ extension: [
2487
+ {
2488
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2489
+ valueExpression: {
2490
+ language: 'text/fhirpath',
2491
+ expression:
2492
+ "%ComponentSystolic.code.coding.where(system='http://snomed.info/sct' and code='271649006')"
2493
+ }
2494
+ },
2495
+ {
2496
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
2497
+ valueCodeableConcept: {
2498
+ coding: [
2499
+ {
2500
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
2501
+ code: 'autocomplete'
2502
+ }
2503
+ ]
2504
+ }
2505
+ }
2506
+ ]
2507
+ },
2508
+ {
2509
+ linkId: 'component-systolic-bp-value',
2510
+ text: 'Value',
2511
+ type: 'decimal',
2512
+ extension: [
2513
+ {
2514
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2515
+ valueExpression: {
2516
+ language: 'text/fhirpath',
2517
+ expression: '%ComponentSystolic.value.value'
2518
+ }
2519
+ },
2520
+ {
2521
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
2522
+ valueCoding: {
2523
+ system: 'http://unitsofmeasure.org',
2524
+ code: 'mm[Hg]',
2525
+ display: 'mmHg'
2526
+ }
2527
+ }
2528
+ ]
2529
+ }
2530
+ ]
2531
+ },
2532
+ {
2533
+ linkId: 'component-diastolic-bp',
2534
+ text: 'DiastolicBP Component',
2535
+ type: 'group',
2536
+ extension: [
2537
+ {
2538
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext',
2539
+ valueExpression: {
2540
+ name: 'ComponentDiastolic',
2541
+ language: 'text/fhirpath',
2542
+ expression: '%ObservationBP.entry[0].resource.component[1]'
2543
+ }
2544
+ }
2545
+ ],
2546
+ item: [
2547
+ {
2548
+ linkId: 'component-diastolic-bp-code-loinc',
2549
+ text: 'Code (LOINC)',
2550
+ type: 'choice',
2551
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-vitalsignresult',
2552
+ extension: [
2553
+ {
2554
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2555
+ valueExpression: {
2556
+ language: 'text/fhirpath',
2557
+ expression:
2558
+ "%ComponentDiastolic.code.coding.where(system='http://loinc.org' and code='8462-4')"
2559
+ }
2560
+ }
2561
+ ]
2562
+ },
2563
+ {
2564
+ linkId: 'component-diastolic-bp-code-snomed',
2565
+ text: 'Code (SNOMED)',
2566
+ type: 'choice',
2567
+ answerValueSet: 'http://snomed.info/sct/32506021000036107',
2568
+ extension: [
2569
+ {
2570
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2571
+ valueExpression: {
2572
+ language: 'text/fhirpath',
2573
+ expression:
2574
+ "%ComponentDiastolic.code.coding.where(system='http://snomed.info/sct' and code='271650006')"
2575
+ }
2576
+ },
2577
+ {
2578
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
2579
+ valueCodeableConcept: {
2580
+ coding: [
2581
+ {
2582
+ system: 'http://hl7.org/fhir/questionnaire-item-control',
2583
+ code: 'autocomplete'
2584
+ }
2585
+ ]
2586
+ }
2587
+ }
2588
+ ]
2589
+ },
2590
+ {
2591
+ linkId: 'component-diastolic-bp-value',
2592
+ text: 'Value',
2593
+ type: 'decimal',
2594
+ extension: [
2595
+ {
2596
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2597
+ valueExpression: {
2598
+ language: 'text/fhirpath',
2599
+ expression: '%ComponentDiastolic.value.value'
2600
+ }
2601
+ },
2602
+ {
2603
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
2604
+ valueCoding: {
2605
+ system: 'http://unitsofmeasure.org',
2606
+ code: 'mm[Hg]',
2607
+ display: 'mmHg'
2608
+ }
2609
+ }
2610
+ ]
2611
+ }
2612
+ ]
2613
+ }
2614
+ ]
2615
+ }
2616
+ ]
2617
+ };
2618
+
2619
+ export const QAuCoreObservationBodyHeight: Questionnaire = {
2620
+ resourceType: 'Questionnaire',
2621
+ id: 'BodyHeightObservation',
2622
+ version: '0.1.0',
2623
+ name: 'BodyHeightObservation',
2624
+ title: 'Body Height Observation',
2625
+ status: 'draft',
2626
+ date: '2024-07-15',
2627
+ extension: [
2628
+ {
2629
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
2630
+ extension: [
2631
+ {
2632
+ url: 'name',
2633
+ valueCoding: {
2634
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
2635
+ code: 'patient'
2636
+ }
2637
+ },
2638
+ {
2639
+ url: 'type',
2640
+ valueCode: 'Patient'
2641
+ },
2642
+ {
2643
+ url: 'description',
2644
+ valueString: 'The patient that is to be used to pre-populate the form'
2645
+ }
2646
+ ]
2647
+ },
2648
+ {
2649
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
2650
+ valueExpression: {
2651
+ name: 'ObservationHeight',
2652
+ language: 'application/x-fhir-query',
2653
+ expression: 'Observation?code=8302-2&_count=1&_sort=-date&patient={{%patient.id}}'
2654
+ }
2655
+ }
2656
+ ],
2657
+ item: [
2658
+ {
2659
+ linkId: 'observation',
2660
+ text: 'AU Core Observation - Body Height',
2661
+ type: 'group',
2662
+ item: [
2663
+ {
2664
+ linkId: 'patient-details',
2665
+ text: 'Patient Details',
2666
+ type: 'group',
2667
+ item: [
2668
+ {
2669
+ extension: [
2670
+ {
2671
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2672
+ valueExpression: {
2673
+ language: 'text/fhirpath',
2674
+ expression: '%patient.id'
2675
+ }
2676
+ }
2677
+ ],
2678
+ linkId: 'patient-id',
2679
+ text: 'Patient ID',
2680
+ type: 'string',
2681
+ required: true,
2682
+ readOnly: true
2683
+ },
2684
+ {
2685
+ extension: [
2686
+ {
2687
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2688
+ valueExpression: {
2689
+ language: 'text/fhirpath',
2690
+ expression:
2691
+ "(%patient.name.where(use='official').select((family | (given\n| prefix).join(' ')).join(', ').where($this != '') | text)).first()"
2692
+ }
2693
+ }
2694
+ ],
2695
+ linkId: 'patient-name',
2696
+ text: 'Patient Name',
2697
+ type: 'string',
2698
+ required: true,
2699
+ readOnly: true
2700
+ }
2701
+ ]
2702
+ },
2703
+ {
2704
+ linkId: 'first-observation-note',
2705
+ text: 'This questionnaire only uses the first Observation resource with LOINC code 8302-2 (Body height) of a referenced\npatient.',
2706
+ _text: {
2707
+ extension: [
2708
+ {
2709
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
2710
+ valueString:
2711
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n\n <b>This questionnaire only uses the first Observation resource with LOINC code 8302-2 (Body height) of a referenced\npatient.</b>\r\n</div>'
2712
+ }
2713
+ ]
2714
+ },
2715
+ type: 'display'
2716
+ },
2717
+ {
2718
+ linkId: 'observation-status',
2719
+ text: 'Observation Status',
2720
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-status',
2721
+ type: 'choice',
2722
+ extension: [
2723
+ {
2724
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2725
+ valueExpression: {
2726
+ language: 'text/fhirpath',
2727
+ expression: '%ObservationHeight.entry[0].resource.status'
2728
+ }
2729
+ }
2730
+ ]
2731
+ },
2732
+ {
2733
+ linkId: 'observation-category',
2734
+ text: 'Observation Category',
2735
+ type: 'choice',
2736
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-category',
2737
+ extension: [
2738
+ {
2739
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2740
+ valueExpression: {
2741
+ language: 'text/fhirpath',
2742
+ expression: '%ObservationHeight.entry[0].resource.category.coding'
2743
+ }
2744
+ }
2745
+ ]
2746
+ },
2747
+ {
2748
+ linkId: 'observation-category-vscat-boolean',
2749
+ text: 'Observation Category is VSCat?',
2750
+ type: 'boolean',
2751
+ extension: [
2752
+ {
2753
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2754
+ valueExpression: {
2755
+ language: 'text/fhirpath',
2756
+ expression:
2757
+ "%ObservationHeight.entry[0].resource.category.coding.code = 'vital-signs'"
2758
+ }
2759
+ }
2760
+ ]
2761
+ },
2762
+ {
2763
+ linkId: 'observation-code-loinc',
2764
+ text: 'Observation Code (LOINC)',
2765
+ type: 'choice',
2766
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-vitalsignresult',
2767
+ extension: [
2768
+ {
2769
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2770
+ valueExpression: {
2771
+ language: 'text/fhirpath',
2772
+ expression:
2773
+ "%ObservationHeight.entry[0].resource.code.coding.where(system='http://loinc.org' and code='8302-2')"
2774
+ }
2775
+ }
2776
+ ]
2777
+ },
2778
+ {
2779
+ linkId: 'Observation.effectivedateTime',
2780
+ text: 'Effective Date Time',
2781
+ type: 'dateTime',
2782
+ extension: [
2783
+ {
2784
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2785
+ valueExpression: {
2786
+ language: 'text/fhirpath',
2787
+ expression: '%ObservationHeight.entry[0].resource.effectiveDateTime'
2788
+ }
2789
+ }
2790
+ ]
2791
+ },
2792
+ {
2793
+ linkId: 'observation-value',
2794
+ text: 'Observation Value',
2795
+ type: 'decimal',
2796
+ extension: [
2797
+ {
2798
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2799
+ valueExpression: {
2800
+ language: 'text/fhirpath',
2801
+ expression: '%ObservationHeight.entry[0].resource.valueQuantity.value'
2802
+ }
2803
+ },
2804
+ {
2805
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
2806
+ valueCoding: {
2807
+ system: 'http://unitsofmeasure.org',
2808
+ code: 'cm',
2809
+ display: 'cm'
2810
+ }
2811
+ }
2812
+ ]
2813
+ }
2814
+ ]
2815
+ }
2816
+ ]
2817
+ };
2818
+
2819
+ export const QAuCoreObservationBodyWeight: Questionnaire = {
2820
+ resourceType: 'Questionnaire',
2821
+ id: 'BodyWeightObservation',
2822
+ version: '0.1.0',
2823
+ name: 'BodyWeightObservation',
2824
+ title: 'Body Weight Observation',
2825
+ status: 'draft',
2826
+ date: '2024-07-15',
2827
+ extension: [
2828
+ {
2829
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
2830
+ extension: [
2831
+ {
2832
+ url: 'name',
2833
+ valueCoding: {
2834
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
2835
+ code: 'patient'
2836
+ }
2837
+ },
2838
+ {
2839
+ url: 'type',
2840
+ valueCode: 'Patient'
2841
+ },
2842
+ {
2843
+ url: 'description',
2844
+ valueString: 'The patient that is to be used to pre-populate the form'
2845
+ }
2846
+ ]
2847
+ },
2848
+ {
2849
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
2850
+ valueExpression: {
2851
+ name: 'ObservationWeight',
2852
+ language: 'application/x-fhir-query',
2853
+ expression: 'Observation?code=29463-7&_count=1&_sort=-date&patient={{%patient.id}}'
2854
+ }
2855
+ }
2856
+ ],
2857
+ item: [
2858
+ {
2859
+ linkId: 'observation',
2860
+ text: 'AU Core Observation - Body Weight',
2861
+ type: 'group',
2862
+ item: [
2863
+ {
2864
+ linkId: 'patient-details',
2865
+ text: 'Patient Details',
2866
+ type: 'group',
2867
+ item: [
2868
+ {
2869
+ extension: [
2870
+ {
2871
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2872
+ valueExpression: {
2873
+ language: 'text/fhirpath',
2874
+ expression: '%patient.id'
2875
+ }
2876
+ }
2877
+ ],
2878
+ linkId: 'patient-id',
2879
+ text: 'Patient ID',
2880
+ type: 'string',
2881
+ required: true,
2882
+ readOnly: true
2883
+ },
2884
+ {
2885
+ extension: [
2886
+ {
2887
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2888
+ valueExpression: {
2889
+ language: 'text/fhirpath',
2890
+ expression:
2891
+ "(%patient.name.where(use='official').select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()"
2892
+ }
2893
+ }
2894
+ ],
2895
+ linkId: 'patient-name',
2896
+ text: 'Patient Name',
2897
+ type: 'string',
2898
+ required: true,
2899
+ readOnly: true
2900
+ }
2901
+ ]
2902
+ },
2903
+ {
2904
+ linkId: 'first-observation-note',
2905
+ text: 'This questionnaire only uses the first Observation resource with LOINC code 29463-7 (Body weight) of a referenced\npatient.',
2906
+ _text: {
2907
+ extension: [
2908
+ {
2909
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
2910
+ valueString:
2911
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n <b>This questionnaire only uses the first Observation resource with LOINC code 29463-7 (Body weight) of a referenced\npatient.</b>\r\n</div>'
2912
+ }
2913
+ ]
2914
+ },
2915
+ type: 'display'
2916
+ },
2917
+ {
2918
+ linkId: 'observation-status',
2919
+ text: 'Observation Status',
2920
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-status',
2921
+ type: 'choice',
2922
+ extension: [
2923
+ {
2924
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2925
+ valueExpression: {
2926
+ language: 'text/fhirpath',
2927
+ expression: '%ObservationWeight.entry[0].resource.status'
2928
+ }
2929
+ }
2930
+ ]
2931
+ },
2932
+ {
2933
+ linkId: 'observation-category',
2934
+ text: 'Observation Category',
2935
+ type: 'choice',
2936
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-category',
2937
+ extension: [
2938
+ {
2939
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2940
+ valueExpression: {
2941
+ language: 'text/fhirpath',
2942
+ expression: '%ObservationWeight.entry[0].resource.category.coding'
2943
+ }
2944
+ }
2945
+ ]
2946
+ },
2947
+ {
2948
+ linkId: 'observation-category-vscat-boolean',
2949
+ text: 'Observation Category is VSCat?',
2950
+ type: 'boolean',
2951
+ extension: [
2952
+ {
2953
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2954
+ valueExpression: {
2955
+ language: 'text/fhirpath',
2956
+ expression:
2957
+ "%ObservationWeight.entry[0].resource.category.coding.code = 'vital-signs'"
2958
+ }
2959
+ }
2960
+ ]
2961
+ },
2962
+ {
2963
+ linkId: 'observation-code-loinc',
2964
+ text: 'Observation Code (LOINC)',
2965
+ type: 'choice',
2966
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-vitalsignresult',
2967
+ extension: [
2968
+ {
2969
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2970
+ valueExpression: {
2971
+ language: 'text/fhirpath',
2972
+ expression:
2973
+ "%ObservationWeight.entry[0].resource.code.coding.where(system='http://loinc.org' and code='29463-7')"
2974
+ }
2975
+ }
2976
+ ]
2977
+ },
2978
+ {
2979
+ linkId: 'Observation.effectivedateTime',
2980
+ text: 'Effective Date Time',
2981
+ type: 'dateTime',
2982
+ extension: [
2983
+ {
2984
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2985
+ valueExpression: {
2986
+ language: 'text/fhirpath',
2987
+ expression: '%ObservationWeight.entry[0].resource.effectiveDateTime'
2988
+ }
2989
+ }
2990
+ ]
2991
+ },
2992
+ {
2993
+ linkId: 'observation-value',
2994
+ text: 'Observation Value',
2995
+ type: 'decimal',
2996
+ extension: [
2997
+ {
2998
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
2999
+ valueExpression: {
3000
+ language: 'text/fhirpath',
3001
+ expression: '%ObservationWeight.entry[0].resource.valueQuantity.value'
3002
+ }
3003
+ },
3004
+ {
3005
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
3006
+ valueCoding: {
3007
+ system: 'http://unitsofmeasure.org',
3008
+ code: 'kg',
3009
+ display: 'kg'
3010
+ }
3011
+ }
3012
+ ]
3013
+ }
3014
+ ]
3015
+ }
3016
+ ]
3017
+ };
3018
+
3019
+ export const QAuCoreObservationHeartRate: Questionnaire = {
3020
+ resourceType: 'Questionnaire',
3021
+ id: 'HeartRateObservation',
3022
+ version: '0.1.0',
3023
+ name: 'HeartRateObservation',
3024
+ title: 'Heart Rate Observation',
3025
+ status: 'draft',
3026
+ date: '2024-07-15',
3027
+ extension: [
3028
+ {
3029
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
3030
+ extension: [
3031
+ {
3032
+ url: 'name',
3033
+ valueCoding: {
3034
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
3035
+ code: 'patient'
3036
+ }
3037
+ },
3038
+ {
3039
+ url: 'type',
3040
+ valueCode: 'Patient'
3041
+ },
3042
+ {
3043
+ url: 'description',
3044
+ valueString: 'The patient that is to be used to pre-populate the form'
3045
+ }
3046
+ ]
3047
+ },
3048
+ {
3049
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
3050
+ valueExpression: {
3051
+ name: 'ObservationHeartRate',
3052
+ language: 'application/x-fhir-query',
3053
+ expression: 'Observation?code=8867-4&_count=1&_sort=-date&patient={{%patient.id}}'
3054
+ }
3055
+ }
3056
+ ],
3057
+ item: [
3058
+ {
3059
+ linkId: 'observation',
3060
+ text: 'AU Core Observation - Heart Rate',
3061
+ type: 'group',
3062
+ item: [
3063
+ {
3064
+ linkId: 'patient-details',
3065
+ text: 'Patient Details',
3066
+ type: 'group',
3067
+ item: [
3068
+ {
3069
+ extension: [
3070
+ {
3071
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3072
+ valueExpression: {
3073
+ language: 'text/fhirpath',
3074
+ expression: '%patient.id'
3075
+ }
3076
+ }
3077
+ ],
3078
+ linkId: 'patient-id',
3079
+ text: 'Patient ID',
3080
+ type: 'string',
3081
+ required: true,
3082
+ readOnly: true
3083
+ },
3084
+ {
3085
+ extension: [
3086
+ {
3087
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3088
+ valueExpression: {
3089
+ language: 'text/fhirpath',
3090
+ expression:
3091
+ "(%patient.name.where(use='official').select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()"
3092
+ }
3093
+ }
3094
+ ],
3095
+ linkId: 'patient-name',
3096
+ text: 'Patient Name',
3097
+ type: 'string',
3098
+ required: true,
3099
+ readOnly: true
3100
+ }
3101
+ ]
3102
+ },
3103
+ {
3104
+ linkId: 'first-observation-note',
3105
+ text: 'This questionnaire only uses the first Observation resource with LOINC code 8867-4 (Heart rate) of a referenced\npatient.',
3106
+ _text: {
3107
+ extension: [
3108
+ {
3109
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
3110
+ valueString:
3111
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n <b>This questionnaire only uses the first Observation resource with LOINC code 8867-4 (Heart rate) of a referenced\npatient.</b>\r\n</div>'
3112
+ }
3113
+ ]
3114
+ },
3115
+ type: 'display'
3116
+ },
3117
+ {
3118
+ linkId: 'observation-status',
3119
+ text: 'Observation Status',
3120
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-status',
3121
+ type: 'choice',
3122
+ extension: [
3123
+ {
3124
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3125
+ valueExpression: {
3126
+ language: 'text/fhirpath',
3127
+ expression: '%ObservationHeartRate.entry[0].resource.status'
3128
+ }
3129
+ }
3130
+ ]
3131
+ },
3132
+ {
3133
+ linkId: 'observation-category',
3134
+ text: 'Observation Category',
3135
+ type: 'choice',
3136
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-category',
3137
+ extension: [
3138
+ {
3139
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3140
+ valueExpression: {
3141
+ language: 'text/fhirpath',
3142
+ expression: '%ObservationHeartRate.entry[0].resource.category.coding'
3143
+ }
3144
+ }
3145
+ ]
3146
+ },
3147
+ {
3148
+ linkId: 'observation-category-vscat-boolean',
3149
+ text: 'Observation Category is VSCat?',
3150
+ type: 'boolean',
3151
+ extension: [
3152
+ {
3153
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3154
+ valueExpression: {
3155
+ language: 'text/fhirpath',
3156
+ expression:
3157
+ "%ObservationHeartRate.entry[0].resource.category.coding.code = 'vital-signs'"
3158
+ }
3159
+ }
3160
+ ]
3161
+ },
3162
+ {
3163
+ linkId: 'observation-code-loinc',
3164
+ text: 'Observation Code (LOINC)',
3165
+ type: 'choice',
3166
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-vitalsignresult',
3167
+ extension: [
3168
+ {
3169
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3170
+ valueExpression: {
3171
+ language: 'text/fhirpath',
3172
+ expression:
3173
+ "%ObservationHeartRate.entry[0].resource.code.coding.where(system='http://loinc.org' and code='8867-4')"
3174
+ }
3175
+ }
3176
+ ]
3177
+ },
3178
+ {
3179
+ linkId: 'Observation.effectiveDateTime',
3180
+ text: 'Effective Date Time',
3181
+ type: 'dateTime',
3182
+ extension: [
3183
+ {
3184
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3185
+ valueExpression: {
3186
+ language: 'text/fhirpath',
3187
+ expression: '%ObservationHeartRate.entry[0].resource.effectiveDateTime'
3188
+ }
3189
+ }
3190
+ ]
3191
+ },
3192
+ {
3193
+ linkId: 'observation-value',
3194
+ text: 'Observation Value',
3195
+ type: 'decimal',
3196
+ extension: [
3197
+ {
3198
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3199
+ valueExpression: {
3200
+ language: 'text/fhirpath',
3201
+ expression: '%ObservationHeartRate.entry[0].resource.valueQuantity.value'
3202
+ }
3203
+ },
3204
+ {
3205
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
3206
+ valueCoding: {
3207
+ system: 'http://unitsofmeasure.org',
3208
+ code: 'beats/min',
3209
+ display: 'beats/min'
3210
+ }
3211
+ }
3212
+ ]
3213
+ }
3214
+ ]
3215
+ }
3216
+ ]
3217
+ };
3218
+
3219
+ export const QAuCoreObservationRespirationRate: Questionnaire = {
3220
+ resourceType: 'Questionnaire',
3221
+ id: 'RespirationRateObservation',
3222
+ version: '0.1.0',
3223
+ name: 'RespirationRateObservation',
3224
+ title: 'Respiration Rate Observation',
3225
+ status: 'draft',
3226
+ date: '2024-07-15',
3227
+ extension: [
3228
+ {
3229
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
3230
+ extension: [
3231
+ {
3232
+ url: 'name',
3233
+ valueCoding: {
3234
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
3235
+ code: 'patient'
3236
+ }
3237
+ },
3238
+ {
3239
+ url: 'type',
3240
+ valueCode: 'Patient'
3241
+ },
3242
+ {
3243
+ url: 'description',
3244
+ valueString: 'The patient that is to be used to pre-populate the form'
3245
+ }
3246
+ ]
3247
+ },
3248
+ {
3249
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
3250
+ valueExpression: {
3251
+ name: 'ObservationRespirationRate',
3252
+ language: 'application/x-fhir-query',
3253
+ expression: 'Observation?code=9279-1&_count=1&_sort=-date&patient={{%patient.id}}'
3254
+ }
3255
+ }
3256
+ ],
3257
+ item: [
3258
+ {
3259
+ linkId: 'observation',
3260
+ text: 'AU Core Observation - Respiration Rate',
3261
+ type: 'group',
3262
+ item: [
3263
+ {
3264
+ linkId: 'patient-details',
3265
+ text: 'Patient Details',
3266
+ type: 'group',
3267
+ item: [
3268
+ {
3269
+ extension: [
3270
+ {
3271
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3272
+ valueExpression: {
3273
+ language: 'text/fhirpath',
3274
+ expression: '%patient.id'
3275
+ }
3276
+ }
3277
+ ],
3278
+ linkId: 'patient-id',
3279
+ text: 'Patient ID',
3280
+ type: 'string',
3281
+ required: true,
3282
+ readOnly: true
3283
+ },
3284
+ {
3285
+ extension: [
3286
+ {
3287
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3288
+ valueExpression: {
3289
+ language: 'text/fhirpath',
3290
+ expression:
3291
+ "(%patient.name.where(use='official').select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()"
3292
+ }
3293
+ }
3294
+ ],
3295
+ linkId: 'patient-name',
3296
+ text: 'Patient Name',
3297
+ type: 'string',
3298
+ required: true,
3299
+ readOnly: true
3300
+ }
3301
+ ]
3302
+ },
3303
+ {
3304
+ linkId: 'first-observation-note',
3305
+ text: 'This questionnaire only uses the first Observation resource with LOINC code 9279-1 (Respiration rate) of a referenced\npatient.',
3306
+ _text: {
3307
+ extension: [
3308
+ {
3309
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
3310
+ valueString:
3311
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n <b>This questionnaire only uses the first Observation resource with LOINC code 9279-1 (Respiration rate) of a referenced\npatient.</b>\r\n</div>'
3312
+ }
3313
+ ]
3314
+ },
3315
+ type: 'display'
3316
+ },
3317
+ {
3318
+ linkId: 'observation-status',
3319
+ text: 'Observation Status',
3320
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-status',
3321
+ type: 'choice',
3322
+ extension: [
3323
+ {
3324
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3325
+ valueExpression: {
3326
+ language: 'text/fhirpath',
3327
+ expression: '%ObservationRespirationRate.entry[0].resource.status'
3328
+ }
3329
+ }
3330
+ ]
3331
+ },
3332
+ {
3333
+ linkId: 'observation-category',
3334
+ text: 'Observation Category',
3335
+ type: 'choice',
3336
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-category',
3337
+ extension: [
3338
+ {
3339
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3340
+ valueExpression: {
3341
+ language: 'text/fhirpath',
3342
+ expression: '%ObservationRespirationRate.entry[0].resource.category.coding'
3343
+ }
3344
+ }
3345
+ ]
3346
+ },
3347
+ {
3348
+ linkId: 'observation-category-vscat-boolean',
3349
+ text: 'Observation Category is VSCat?',
3350
+ type: 'boolean',
3351
+ extension: [
3352
+ {
3353
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3354
+ valueExpression: {
3355
+ language: 'text/fhirpath',
3356
+ expression:
3357
+ "%ObservationRespirationRate.entry[0].resource.category.coding.code = 'vital-signs'"
3358
+ }
3359
+ }
3360
+ ]
3361
+ },
3362
+ {
3363
+ linkId: 'observation-code-loinc',
3364
+ text: 'Observation Code (LOINC)',
3365
+ type: 'choice',
3366
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-vitalsignresult',
3367
+ extension: [
3368
+ {
3369
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3370
+ valueExpression: {
3371
+ language: 'text/fhirpath',
3372
+ expression:
3373
+ "%ObservationRespirationRate.entry[0].resource.code.coding.where(system='http://loinc.org' and code='9279-1')"
3374
+ }
3375
+ }
3376
+ ]
3377
+ },
3378
+ {
3379
+ linkId: 'Observation.effectiveDateTime',
3380
+ text: 'Effective Date Time',
3381
+ type: 'dateTime',
3382
+ extension: [
3383
+ {
3384
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3385
+ valueExpression: {
3386
+ language: 'text/fhirpath',
3387
+ expression: '%ObservationRespirationRate.entry[0].resource.effectiveDateTime'
3388
+ }
3389
+ }
3390
+ ]
3391
+ },
3392
+ {
3393
+ linkId: 'observation-value',
3394
+ text: 'Observation Value',
3395
+ type: 'decimal',
3396
+ extension: [
3397
+ {
3398
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3399
+ valueExpression: {
3400
+ language: 'text/fhirpath',
3401
+ expression: '%ObservationRespirationRate.entry[0].resource.valueQuantity.value'
3402
+ }
3403
+ },
3404
+ {
3405
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
3406
+ valueCoding: {
3407
+ system: 'http://unitsofmeasure.org',
3408
+ code: 'breaths/min',
3409
+ display: 'breaths/min'
3410
+ }
3411
+ }
3412
+ ]
3413
+ }
3414
+ ]
3415
+ }
3416
+ ]
3417
+ };
3418
+
3419
+ export const QAuCoreObservationSmokingStatus: Questionnaire = {
3420
+ resourceType: 'Questionnaire',
3421
+ id: 'SmokingStatusObservation',
3422
+ version: '0.1.0',
3423
+ name: 'SmokingStatusObservation',
3424
+ title: 'Smoking Status Observation',
3425
+ status: 'draft',
3426
+ date: '2024-07-15',
3427
+ extension: [
3428
+ {
3429
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
3430
+ extension: [
3431
+ {
3432
+ url: 'name',
3433
+ valueCoding: {
3434
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
3435
+ code: 'patient'
3436
+ }
3437
+ },
3438
+ {
3439
+ url: 'type',
3440
+ valueCode: 'Patient'
3441
+ },
3442
+ {
3443
+ url: 'description',
3444
+ valueString: 'The patient that is to be used to pre-populate the form'
3445
+ }
3446
+ ]
3447
+ },
3448
+ {
3449
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
3450
+ valueExpression: {
3451
+ name: 'ObservationSmokingStatus',
3452
+ language: 'application/x-fhir-query',
3453
+ expression: 'Observation?code=72166-2&_count=1&_sort=-date&patient={{%patient.id}}'
3454
+ }
3455
+ }
3456
+ ],
3457
+ item: [
3458
+ {
3459
+ linkId: 'observation',
3460
+ text: 'AU Core Observation - Smoking Status',
3461
+ type: 'group',
3462
+ item: [
3463
+ {
3464
+ linkId: 'patient-details',
3465
+ text: 'Patient Details',
3466
+ type: 'group',
3467
+ item: [
3468
+ {
3469
+ extension: [
3470
+ {
3471
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3472
+ valueExpression: {
3473
+ language: 'text/fhirpath',
3474
+ expression: '%patient.id'
3475
+ }
3476
+ }
3477
+ ],
3478
+ linkId: 'patient-id',
3479
+ text: 'Patient ID',
3480
+ type: 'string',
3481
+ required: true,
3482
+ readOnly: true
3483
+ },
3484
+ {
3485
+ extension: [
3486
+ {
3487
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3488
+ valueExpression: {
3489
+ language: 'text/fhirpath',
3490
+ expression:
3491
+ "(%patient.name.where(use='official').select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()"
3492
+ }
3493
+ }
3494
+ ],
3495
+ linkId: 'patient-name',
3496
+ text: 'Patient Name',
3497
+ type: 'string',
3498
+ required: true,
3499
+ readOnly: true
3500
+ }
3501
+ ]
3502
+ },
3503
+ {
3504
+ linkId: 'first-observation-note',
3505
+ text: 'This questionnaire only uses the first Observation resource with LOINC code 72166-2 (Smoking status) of a referenced\npatient.',
3506
+ _text: {
3507
+ extension: [
3508
+ {
3509
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
3510
+ valueString:
3511
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n <b>This questionnaire only uses the first Observation resource with LOINC code 72166-2 (Smoking status) of a referenced\npatient.</b>\r\n</div>'
3512
+ }
3513
+ ]
3514
+ },
3515
+ type: 'display'
3516
+ },
3517
+ {
3518
+ linkId: 'observation-status',
3519
+ text: 'Observation Status',
3520
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-status',
3521
+ type: 'choice',
3522
+ extension: [
3523
+ {
3524
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3525
+ valueExpression: {
3526
+ language: 'text/fhirpath',
3527
+ expression: '%ObservationSmokingStatus.entry[0].resource.status'
3528
+ }
3529
+ }
3530
+ ]
3531
+ },
3532
+ {
3533
+ linkId: 'observation-category',
3534
+ text: 'Observation Category',
3535
+ type: 'choice',
3536
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-category',
3537
+ extension: [
3538
+ {
3539
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3540
+ valueExpression: {
3541
+ language: 'text/fhirpath',
3542
+ expression: '%ObservationSmokingStatus.entry[0].resource.category.coding'
3543
+ }
3544
+ }
3545
+ ]
3546
+ },
3547
+ {
3548
+ linkId: 'observation-code-loinc',
3549
+ text: 'Observation Code (LOINC)',
3550
+ type: 'choice',
3551
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-vitalsignresult',
3552
+ extension: [
3553
+ {
3554
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3555
+ valueExpression: {
3556
+ language: 'text/fhirpath',
3557
+ expression:
3558
+ "%ObservationSmokingStatus.entry[0].resource.code.coding.where(system='http://loinc.org' and code='72166-2')"
3559
+ }
3560
+ }
3561
+ ]
3562
+ },
3563
+ {
3564
+ linkId: 'observation-effective-datetime',
3565
+ text: 'Effective Date Time',
3566
+ type: 'dateTime',
3567
+ extension: [
3568
+ {
3569
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3570
+ valueExpression: {
3571
+ language: 'text/fhirpath',
3572
+ expression: '%ObservationSmokingStatus.entry[0].resource.effectiveDateTime'
3573
+ }
3574
+ }
3575
+ ]
3576
+ },
3577
+ {
3578
+ linkId: 'observation-value',
3579
+ text: 'Observation Value',
3580
+ type: 'choice',
3581
+ answerValueSet: 'https://healthterminologies.gov.au/fhir/ValueSet/smoking-status-1',
3582
+ extension: [
3583
+ {
3584
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3585
+ valueExpression: {
3586
+ language: 'text/fhirpath',
3587
+ expression:
3588
+ '%ObservationSmokingStatus.entry[0].resource.valueCodeableConcept.coding'
3589
+ }
3590
+ }
3591
+ ]
3592
+ }
3593
+ ]
3594
+ }
3595
+ ]
3596
+ };
3597
+
3598
+ export const QAuCoreObservationWaistCircumference: Questionnaire = {
3599
+ resourceType: 'Questionnaire',
3600
+ id: 'WaistCircumferenceObservation',
3601
+ version: '0.1.0',
3602
+ name: 'WaistCircumferenceObservation',
3603
+ title: 'Waist Circumference Observation',
3604
+ status: 'draft',
3605
+ date: '2024-07-15',
3606
+ extension: [
3607
+ {
3608
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
3609
+ extension: [
3610
+ {
3611
+ url: 'name',
3612
+ valueCoding: {
3613
+ system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
3614
+ code: 'patient'
3615
+ }
3616
+ },
3617
+ {
3618
+ url: 'type',
3619
+ valueCode: 'Patient'
3620
+ },
3621
+ {
3622
+ url: 'description',
3623
+ valueString: 'The patient that is to be used to pre-populate the form'
3624
+ }
3625
+ ]
3626
+ },
3627
+ {
3628
+ url: 'http://hl7.org/fhir/StructureDefinition/variable',
3629
+ valueExpression: {
3630
+ name: 'ObservationWaistCircumference',
3631
+ language: 'application/x-fhir-query',
3632
+ expression: 'Observation?code=8280-0&_count=1&_sort=-date&patient={{%patient.id}}'
3633
+ }
3634
+ }
3635
+ ],
3636
+ item: [
3637
+ {
3638
+ linkId: 'observation',
3639
+ text: 'AU Core Observation - Waist Circumference',
3640
+ type: 'group',
3641
+ item: [
3642
+ {
3643
+ linkId: 'patient-details',
3644
+ text: 'Patient Details',
3645
+ type: 'group',
3646
+ item: [
3647
+ {
3648
+ extension: [
3649
+ {
3650
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3651
+ valueExpression: {
3652
+ language: 'text/fhirpath',
3653
+ expression: '%patient.id'
3654
+ }
3655
+ }
3656
+ ],
3657
+ linkId: 'patient-id',
3658
+ text: 'Patient ID',
3659
+ type: 'string',
3660
+ required: true,
3661
+ readOnly: true
3662
+ },
3663
+ {
3664
+ extension: [
3665
+ {
3666
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3667
+ valueExpression: {
3668
+ language: 'text/fhirpath',
3669
+ expression:
3670
+ "(%patient.name.where(use='official').select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()"
3671
+ }
3672
+ }
3673
+ ],
3674
+ linkId: 'patient-name',
3675
+ text: 'Patient Name',
3676
+ type: 'string',
3677
+ required: true,
3678
+ readOnly: true
3679
+ }
3680
+ ]
3681
+ },
3682
+ {
3683
+ linkId: 'first-observation-note',
3684
+ text: 'This questionnaire only uses the first Observation resource with LOINC code 8280-0 (Waist circumference) of a referenced\npatient.',
3685
+ _text: {
3686
+ extension: [
3687
+ {
3688
+ url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
3689
+ valueString:
3690
+ '<div xmlns="http://www.w3.org/1999/xhtml" style="padding-bottom:\n8px;">\r\n <b>This questionnaire only uses the first Observation resource with LOINC code 8280-0 (Waist circumference) of a referenced\npatient.</b>\r\n</div>'
3691
+ }
3692
+ ]
3693
+ },
3694
+ type: 'display'
3695
+ },
3696
+ {
3697
+ linkId: 'observation-status',
3698
+ text: 'Observation Status',
3699
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-status',
3700
+ type: 'choice',
3701
+ extension: [
3702
+ {
3703
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3704
+ valueExpression: {
3705
+ language: 'text/fhirpath',
3706
+ expression: '%ObservationWaistCircumference.entry[0].resource.status'
3707
+ }
3708
+ }
3709
+ ]
3710
+ },
3711
+ {
3712
+ linkId: 'observation-category',
3713
+ text: 'Observation Category',
3714
+ type: 'choice',
3715
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-category',
3716
+ extension: [
3717
+ {
3718
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3719
+ valueExpression: {
3720
+ language: 'text/fhirpath',
3721
+ expression: '%ObservationWaistCircumference.entry[0].resource.category.coding'
3722
+ }
3723
+ }
3724
+ ]
3725
+ },
3726
+ {
3727
+ linkId: 'observation-category-vscat-boolean',
3728
+ text: 'Observation Category is VSCat?',
3729
+ type: 'boolean',
3730
+ extension: [
3731
+ {
3732
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3733
+ valueExpression: {
3734
+ language: 'text/fhirpath',
3735
+ expression:
3736
+ "%ObservationWaistCircumference.entry[0].resource.category.coding.code = 'vital-signs'"
3737
+ }
3738
+ }
3739
+ ]
3740
+ },
3741
+ {
3742
+ linkId: 'observation-code-loinc',
3743
+ text: 'Observation Code (LOINC)',
3744
+ type: 'choice',
3745
+ answerValueSet: 'http://hl7.org/fhir/ValueSet/observation-vitalsignresult',
3746
+ extension: [
3747
+ {
3748
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3749
+ valueExpression: {
3750
+ language: 'text/fhirpath',
3751
+ expression:
3752
+ "%ObservationWaistCircumference.entry[0].resource.code.coding.where(system='http://loinc.org' and code='8280-0')"
3753
+ }
3754
+ }
3755
+ ]
3756
+ },
3757
+ {
3758
+ linkId: 'Observation.effectiveDateTime',
3759
+ text: 'Effective Date Time',
3760
+ type: 'dateTime',
3761
+ extension: [
3762
+ {
3763
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3764
+ valueExpression: {
3765
+ language: 'text/fhirpath',
3766
+ expression: '%ObservationWaistCircumference.entry[0].resource.effectiveDateTime'
3767
+ }
3768
+ }
3769
+ ]
3770
+ },
3771
+ {
3772
+ linkId: 'observation-value',
3773
+ text: 'Observation Value',
3774
+ type: 'decimal',
3775
+ extension: [
3776
+ {
3777
+ url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
3778
+ valueExpression: {
3779
+ language: 'text/fhirpath',
3780
+ expression: '%ObservationWaistCircumference.entry[0].resource.valueQuantity.value'
3781
+ }
3782
+ },
3783
+ {
3784
+ url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
3785
+ valueCoding: {
3786
+ system: 'http://unitsofmeasure.org',
3787
+ code: 'cm',
3788
+ display: 'cm'
3789
+ }
3790
+ }
3791
+ ]
3792
+ }
3793
+ ]
3794
+ }
3795
+ ]
3796
+ };