@aehrc/smart-forms-renderer 0.36.1 → 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.
- package/CHANGELOG.md +40 -0
- package/lib/components/FormComponents/Button.styles.d.ts +4 -0
- package/lib/components/FormComponents/Button.styles.js +10 -0
- package/lib/components/FormComponents/Button.styles.js.map +1 -0
- package/lib/components/FormComponents/GroupItem/GroupHeading.d.ts +1 -0
- package/lib/components/FormComponents/GroupItem/GroupHeading.js +3 -2
- package/lib/components/FormComponents/GroupItem/GroupHeading.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItem.d.ts +4 -0
- package/lib/components/FormComponents/GroupItem/GroupItem.js +3 -3
- package/lib/components/FormComponents/GroupItem/GroupItem.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemView.d.ts +4 -0
- package/lib/components/FormComponents/GroupItem/GroupItemView.js +8 -5
- package/lib/components/FormComponents/GroupItem/GroupItemView.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/NextPageButton.d.ts +7 -0
- package/lib/{hooks/useQueryClient.js → components/FormComponents/GroupItem/NextPageButton.js} +9 -12
- package/lib/components/FormComponents/GroupItem/NextPageButton.js.map +1 -0
- package/lib/components/FormComponents/GroupItem/PageButtonWrapper.d.ts +8 -0
- package/lib/components/FormComponents/GroupItem/PageButtonWrapper.js +46 -0
- package/lib/components/FormComponents/GroupItem/PageButtonWrapper.js.map +1 -0
- package/lib/components/FormComponents/GroupItem/PreviousPageButton.d.ts +7 -0
- package/lib/components/FormComponents/GroupItem/PreviousPageButton.js +26 -0
- package/lib/components/FormComponents/GroupItem/PreviousPageButton.js.map +1 -0
- package/lib/components/Renderer/BaseRenderer.js +8 -0
- package/lib/components/Renderer/BaseRenderer.js.map +1 -1
- package/lib/components/Renderer/FormBodyPage.d.ts +9 -0
- package/lib/components/Renderer/FormBodyPage.js +43 -0
- package/lib/components/Renderer/FormBodyPage.js.map +1 -0
- package/lib/components/Renderer/FormTopLevelItem.js +7 -0
- package/lib/components/Renderer/FormTopLevelItem.js.map +1 -1
- package/lib/components/Renderer/FormTopLevelPage.d.ts +9 -0
- package/lib/components/Renderer/FormTopLevelPage.js +29 -0
- package/lib/components/Renderer/FormTopLevelPage.js.map +1 -0
- package/lib/hooks/useNextAndPreviousVisiblePages.d.ts +7 -0
- package/lib/hooks/useNextAndPreviousVisiblePages.js +47 -0
- package/lib/hooks/useNextAndPreviousVisiblePages.js.map +1 -0
- package/lib/interfaces/page.interface.d.ts +16 -0
- package/lib/interfaces/page.interface.js +2 -0
- package/lib/interfaces/page.interface.js.map +1 -0
- package/lib/interfaces/questionnaireStore.interface.d.ts +2 -0
- package/lib/stores/questionnaireStore.d.ts +13 -0
- package/lib/stores/questionnaireStore.js +19 -3
- package/lib/stores/questionnaireStore.js.map +1 -1
- package/lib/utils/initialise.d.ts +3 -0
- package/lib/utils/initialise.js +6 -1
- package/lib/utils/initialise.js.map +1 -1
- package/lib/utils/page.d.ts +43 -0
- package/lib/utils/page.js +101 -0
- package/lib/utils/page.js.map +1 -0
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js +4 -0
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +1 -1
- package/lib/utils/questionnaireStoreUtils/extractPages.d.ts +3 -0
- package/lib/utils/questionnaireStoreUtils/extractPages.js +18 -0
- package/lib/utils/questionnaireStoreUtils/extractPages.js.map +1 -0
- package/package.json +4 -4
- package/src/components/FormComponents/Button.styles.ts +10 -0
- package/src/components/FormComponents/GroupItem/GroupHeading.tsx +5 -3
- package/src/components/FormComponents/GroupItem/GroupItem.tsx +11 -1
- package/src/components/FormComponents/GroupItem/GroupItemView.tsx +12 -0
- package/src/components/FormComponents/GroupItem/NextPageButton.tsx +37 -0
- package/src/components/FormComponents/GroupItem/PageButtonWrapper.tsx +78 -0
- package/src/components/FormComponents/GroupItem/PreviousPageButton.tsx +41 -0
- package/src/components/Renderer/BaseRenderer.tsx +21 -0
- package/src/components/Renderer/FormBodyPage.tsx +93 -0
- package/src/components/Renderer/FormTopLevelItem.tsx +17 -0
- package/src/components/Renderer/FormTopLevelPage.tsx +70 -0
- package/src/hooks/useNextAndPreviousVisiblePages.ts +69 -0
- package/src/interfaces/page.interface.ts +13 -0
- package/src/interfaces/questionnaireStore.interface.ts +2 -0
- package/src/stores/questionnaireStore.ts +33 -2
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreAllergyIntolerance.json +1 -1
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreCondition.json +1 -1
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreEncounter.json +137 -58
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreImmunization.json +175 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreMedicationRequest.json +229 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBP.json +359 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBodyHeight.json +195 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBodyWeight.json +195 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationHeartRate.json +195 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationSmokingStatus.json +174 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePatient.json +495 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePractitioner.json +139 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePractitionerRole.json +216 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreProcedure.json +199 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreRespirationRate.json +195 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreWaistCircumference.json +195 -0
- package/src/stories/assets/questionnaires/QAuCoreTesting.ts +3342 -1
- package/src/stories/assets/questionnaires/QItemControlGroup.ts +673 -0
- package/src/stories/sdc/ItemControlGroup.stories.tsx +22 -1
- package/src/stories/testing/AuCoreTester.stories.tsx +140 -1
- package/src/utils/initialise.ts +11 -0
- package/src/utils/page.ts +134 -0
- package/src/utils/questionnaireStoreUtils/createQuestionaireModel.ts +5 -0
- package/src/utils/questionnaireStoreUtils/extractPages.ts +24 -0
- package/lib/components/FormComponents/DateTimeItem/DateTimeField.d.ts +0 -12
- package/lib/components/FormComponents/DateTimeItem/DateTimeField.js +0 -34
- package/lib/components/FormComponents/DateTimeItem/DateTimeField.js.map +0 -1
- package/lib/components/FormComponents/DateTimeItem/DateTimeItem.d.ts +0 -9
- package/lib/components/FormComponents/DateTimeItem/DateTimeItem.js +0 -60
- package/lib/components/FormComponents/DateTimeItem/DateTimeItem.js.map +0 -1
- package/lib/hooks/useDisplayCalculatedExpression.d.ts +0 -3
- package/lib/hooks/useDisplayCalculatedExpression.js +0 -40
- package/lib/hooks/useDisplayCalculatedExpression.js.map +0 -1
- package/lib/hooks/useInitialiseRenderer.d.ts +0 -4
- package/lib/hooks/useInitialiseRenderer.js +0 -85
- package/lib/hooks/useInitialiseRenderer.js.map +0 -1
- package/lib/hooks/useQueryClient.d.ts +0 -3
- package/lib/hooks/useQueryClient.js.map +0 -1
- package/lib/utils/buildForm.d.ts +0 -8
- package/lib/utils/buildForm.js +0 -26
- package/lib/utils/buildForm.js.map +0 -1
- package/stats.html +0 -4842
- package/stats1.html +0 -4842
- package/stats3.html +0 -4842
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { Tabs } from './tab.interface';
|
|
19
|
+
import type { Pages } from './page.interface';
|
|
19
20
|
import type { Variables } from './variables.interface';
|
|
20
21
|
import type { LaunchContext } from './populate.interface';
|
|
21
22
|
import type { EnableWhenExpressions, EnableWhenItems } from './enableWhen.interface';
|
|
@@ -27,6 +28,7 @@ import type { InitialExpression } from './initialExpression.interface';
|
|
|
27
28
|
export interface QuestionnaireModel {
|
|
28
29
|
itemTypes: Record<string, string>;
|
|
29
30
|
tabs: Tabs;
|
|
31
|
+
pages: Pages;
|
|
30
32
|
variables: Variables;
|
|
31
33
|
launchContexts: Record<string, LaunchContext>;
|
|
32
34
|
enableWhenItems: EnableWhenItems;
|
|
@@ -28,6 +28,7 @@ import type { CalculatedExpression } from '../interfaces/calculatedExpression.in
|
|
|
28
28
|
import type { EnableWhenExpressions, EnableWhenItems } from '../interfaces/enableWhen.interface';
|
|
29
29
|
import type { AnswerExpression } from '../interfaces/answerExpression.interface';
|
|
30
30
|
import type { Tabs } from '../interfaces/tab.interface';
|
|
31
|
+
import type { Pages } from '../interfaces/page.interface';
|
|
31
32
|
import {
|
|
32
33
|
mutateRepeatEnableWhenItemInstances,
|
|
33
34
|
updateEnableWhenItemAnswer
|
|
@@ -58,6 +59,8 @@ import type { InitialExpression } from '../interfaces/initialExpression.interfac
|
|
|
58
59
|
* @property itemTypes - Key-value pair of item types `Record<linkId, item.type>`
|
|
59
60
|
* @property tabs - Key-value pair of tabs `Record<linkId, Tab>`
|
|
60
61
|
* @property currentTabIndex - Index of the current tab
|
|
62
|
+
* @property pages - Key-value pair of pages `Record<linkId, Page>`
|
|
63
|
+
* @property currentPageIndex - Index of the current page
|
|
61
64
|
* @property variables - Questionnaire variables object containing FHIRPath and x-fhir-query variables
|
|
62
65
|
* @property launchContexts - Key-value pair of launch contexts `Record<launch context name, launch context properties>`
|
|
63
66
|
* @property enableWhenItems - EnableWhenItems object containing enableWhen items and their linked questions
|
|
@@ -76,7 +79,9 @@ import type { InitialExpression } from '../interfaces/initialExpression.interfac
|
|
|
76
79
|
* @property buildSourceQuestionnaire - Used to build the source questionnaire with the provided questionnaire and optionally questionnaire response, additional variables, terminology server url and readyOnly flag
|
|
77
80
|
* @property destroySourceQuestionnaire - Used to destroy the source questionnaire and reset all properties
|
|
78
81
|
* @property switchTab - Used to switch the current tab index
|
|
82
|
+
* @property switchPage - Used to switch the current page index
|
|
79
83
|
* @property markTabAsComplete - Used to mark a tab index as complete
|
|
84
|
+
* @property markPageAsComplete - Used to mark a page index as complete
|
|
80
85
|
* @property updateEnableWhenItem - Used to update linked enableWhen items by updating a question with a new answer
|
|
81
86
|
* @property mutateRepeatEnableWhenItems - Used to add or remove instances of repeating enableWhen items
|
|
82
87
|
* @property toggleEnableWhenActivation - Used to toggle enableWhen checks on/off
|
|
@@ -94,6 +99,8 @@ export interface QuestionnaireStoreType {
|
|
|
94
99
|
itemTypes: Record<string, string>;
|
|
95
100
|
tabs: Tabs;
|
|
96
101
|
currentTabIndex: number;
|
|
102
|
+
pages: Pages;
|
|
103
|
+
currentPageIndex: number;
|
|
97
104
|
variables: Variables;
|
|
98
105
|
launchContexts: Record<string, LaunchContext>;
|
|
99
106
|
enableWhenItems: EnableWhenItems;
|
|
@@ -119,7 +126,9 @@ export interface QuestionnaireStoreType {
|
|
|
119
126
|
) => Promise<void>;
|
|
120
127
|
destroySourceQuestionnaire: () => void;
|
|
121
128
|
switchTab: (newTabIndex: number) => void;
|
|
129
|
+
switchPage: (newPageIndex: number) => void;
|
|
122
130
|
markTabAsComplete: (tabLinkId: string) => void;
|
|
131
|
+
markPageAsComplete: (pageLinkId: string) => void;
|
|
123
132
|
updateEnableWhenItem: (
|
|
124
133
|
linkId: string,
|
|
125
134
|
newAnswer: QuestionnaireResponseItemAnswer[] | undefined,
|
|
@@ -155,6 +164,8 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
155
164
|
itemTypes: {},
|
|
156
165
|
tabs: {},
|
|
157
166
|
currentTabIndex: 0,
|
|
167
|
+
pages: {},
|
|
168
|
+
currentPageIndex: 0,
|
|
158
169
|
variables: { fhirPathVariables: {}, xFhirQueryVariables: {} },
|
|
159
170
|
launchContexts: {},
|
|
160
171
|
calculatedExpressions: {},
|
|
@@ -197,6 +208,7 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
197
208
|
initialEnableWhenExpressions,
|
|
198
209
|
initialCalculatedExpressions,
|
|
199
210
|
firstVisibleTab,
|
|
211
|
+
firstVisiblePage,
|
|
200
212
|
updatedFhirPathContext
|
|
201
213
|
} = initialiseFormFromResponse({
|
|
202
214
|
questionnaireResponse,
|
|
@@ -205,6 +217,7 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
205
217
|
calculatedExpressions: questionnaireModel.calculatedExpressions,
|
|
206
218
|
variablesFhirPath: questionnaireModel.variables.fhirPathVariables,
|
|
207
219
|
tabs: questionnaireModel.tabs,
|
|
220
|
+
pages: questionnaireModel.pages,
|
|
208
221
|
fhirPathContext: questionnaireModel.fhirPathContext
|
|
209
222
|
});
|
|
210
223
|
|
|
@@ -213,6 +226,8 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
213
226
|
itemTypes: questionnaireModel.itemTypes,
|
|
214
227
|
tabs: questionnaireModel.tabs,
|
|
215
228
|
currentTabIndex: firstVisibleTab,
|
|
229
|
+
pages: questionnaireModel.pages,
|
|
230
|
+
currentPageIndex: firstVisiblePage,
|
|
216
231
|
variables: questionnaireModel.variables,
|
|
217
232
|
launchContexts: questionnaireModel.launchContexts,
|
|
218
233
|
enableWhenItems: initialEnableWhenItems,
|
|
@@ -233,6 +248,8 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
233
248
|
itemTypes: {},
|
|
234
249
|
tabs: {},
|
|
235
250
|
currentTabIndex: 0,
|
|
251
|
+
pages: {},
|
|
252
|
+
currentPageIndex: 0,
|
|
236
253
|
variables: { fhirPathVariables: {}, xFhirQueryVariables: {} },
|
|
237
254
|
launchContexts: {},
|
|
238
255
|
enableWhenItems: { singleItems: {}, repeatItems: {} },
|
|
@@ -246,6 +263,7 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
246
263
|
fhirPathContext: {}
|
|
247
264
|
}),
|
|
248
265
|
switchTab: (newTabIndex: number) => set(() => ({ currentTabIndex: newTabIndex })),
|
|
266
|
+
switchPage: (newPageIndex: number) => set(() => ({ currentPageIndex: newPageIndex })),
|
|
249
267
|
markTabAsComplete: (tabLinkId: string) => {
|
|
250
268
|
const tabs = get().tabs;
|
|
251
269
|
set(() => ({
|
|
@@ -255,6 +273,15 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
255
273
|
}
|
|
256
274
|
}));
|
|
257
275
|
},
|
|
276
|
+
markPageAsComplete: (pageLinkId: string) => {
|
|
277
|
+
const pages = get().pages;
|
|
278
|
+
set(() => ({
|
|
279
|
+
pages: {
|
|
280
|
+
...pages,
|
|
281
|
+
[pageLinkId]: { ...pages[pageLinkId], isComplete: !pages[pageLinkId].isComplete }
|
|
282
|
+
}
|
|
283
|
+
}));
|
|
284
|
+
},
|
|
258
285
|
updateEnableWhenItem: (
|
|
259
286
|
linkId: string,
|
|
260
287
|
newAnswer: QuestionnaireResponseItemAnswer[] | undefined,
|
|
@@ -355,7 +382,8 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
355
382
|
updatePopulatedProperties: (
|
|
356
383
|
populatedResponse: QuestionnaireResponse,
|
|
357
384
|
populatedContext?: Record<string, any>,
|
|
358
|
-
persistTabIndex?: boolean
|
|
385
|
+
persistTabIndex?: boolean,
|
|
386
|
+
persistPageIndex?: boolean
|
|
359
387
|
) => {
|
|
360
388
|
const initialResponseItemMap = createQuestionnaireResponseItemMap(populatedResponse);
|
|
361
389
|
|
|
@@ -379,7 +407,8 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
379
407
|
initialEnableWhenItems,
|
|
380
408
|
initialEnableWhenLinkedQuestions,
|
|
381
409
|
initialEnableWhenExpressions,
|
|
382
|
-
firstVisibleTab
|
|
410
|
+
firstVisibleTab,
|
|
411
|
+
firstVisiblePage
|
|
383
412
|
} = initialiseFormFromResponse({
|
|
384
413
|
questionnaireResponse: updatedResponse,
|
|
385
414
|
enableWhenItems: get().enableWhenItems,
|
|
@@ -387,6 +416,7 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
387
416
|
calculatedExpressions: initialCalculatedExpressions,
|
|
388
417
|
variablesFhirPath: get().variables.fhirPathVariables,
|
|
389
418
|
tabs: get().tabs,
|
|
419
|
+
pages: get().pages,
|
|
390
420
|
fhirPathContext: updatedFhirPathContext
|
|
391
421
|
});
|
|
392
422
|
updatedFhirPathContext = evaluateInitialCalculatedExpressionsResult.updatedFhirPathContext;
|
|
@@ -397,6 +427,7 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
|
|
|
397
427
|
enableWhenExpressions: initialEnableWhenExpressions,
|
|
398
428
|
calculatedExpressions: initialCalculatedExpressions,
|
|
399
429
|
currentTabIndex: persistTabIndex ? get().currentTabIndex : firstVisibleTab,
|
|
430
|
+
currentPageIndex: persistPageIndex ? get().currentPageIndex : firstVisiblePage,
|
|
400
431
|
fhirPathContext: updatedFhirPathContext,
|
|
401
432
|
populatedContext: populatedContext ?? get().populatedContext
|
|
402
433
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"resourceType": "Questionnaire",
|
|
3
|
-
"id": "
|
|
3
|
+
"id": "AuCoreEncounter",
|
|
4
4
|
"extension": [
|
|
5
5
|
{
|
|
6
6
|
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
{
|
|
26
26
|
"url": "http://hl7.org/fhir/StructureDefinition/variable",
|
|
27
27
|
"valueExpression": {
|
|
28
|
-
"name": "
|
|
28
|
+
"name": "Encounter",
|
|
29
29
|
"language": "application/x-fhir-query",
|
|
30
|
-
"expression": "
|
|
30
|
+
"expression": "Encounter?patient={{%patient.id}}"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
],
|
|
34
|
-
"version": "0.
|
|
35
|
-
"name": "AU Core
|
|
36
|
-
"title": "AU Core
|
|
34
|
+
"version": "0.5.0-ci-build",
|
|
35
|
+
"name": "AU Core Encounter",
|
|
36
|
+
"title": "AU Core Encounter",
|
|
37
37
|
"status": "draft",
|
|
38
38
|
"date": "2024-07-15",
|
|
39
39
|
"item": [
|
|
40
40
|
{
|
|
41
|
-
"linkId": "
|
|
42
|
-
"text": "AU Core
|
|
41
|
+
"linkId": "encounter",
|
|
42
|
+
"text": "AU Core Encounter",
|
|
43
43
|
"type": "group",
|
|
44
44
|
"repeats": false,
|
|
45
45
|
"item": [
|
|
@@ -83,133 +83,212 @@
|
|
|
83
83
|
]
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
|
-
"linkId": "first-
|
|
87
|
-
"text": "This questionnaire only uses the first
|
|
86
|
+
"linkId": "first-encounter-note",
|
|
87
|
+
"text": "This questionnaire only uses the first Encounter resource of a referenced\npatient.",
|
|
88
88
|
"_text": {
|
|
89
89
|
"extension": [
|
|
90
90
|
{
|
|
91
91
|
"url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml",
|
|
92
|
-
"valueString": "<div xmlns=\"http://www.w3.org/1999/xhtml\" style=\"padding-bottom:\n8px;\">\r\n
|
|
92
|
+
"valueString": "<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>"
|
|
93
93
|
}
|
|
94
94
|
]
|
|
95
95
|
},
|
|
96
96
|
"type": "display"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
|
-
"linkId": "
|
|
100
|
-
"text": "
|
|
99
|
+
"linkId": "status",
|
|
100
|
+
"text": "Status",
|
|
101
101
|
"type": "choice",
|
|
102
|
-
"
|
|
102
|
+
"required": "true",
|
|
103
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/encounter-status",
|
|
103
104
|
"extension": [
|
|
104
105
|
{
|
|
105
106
|
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
106
107
|
"valueExpression": {
|
|
107
108
|
"language": "text/fhirpath",
|
|
108
|
-
"expression": "%
|
|
109
|
+
"expression": "%Encounter.entry[0].resource.status"
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
]
|
|
112
113
|
},
|
|
113
114
|
{
|
|
114
|
-
"linkId": "
|
|
115
|
-
"text": "
|
|
115
|
+
"linkId": "class",
|
|
116
|
+
"text": "Class",
|
|
116
117
|
"type": "choice",
|
|
117
|
-
"
|
|
118
|
+
"required": "true",
|
|
119
|
+
"answerValueSet": "http://terminology.hl7.org.au/ValueSet/v3-ActEncounterCode-extended",
|
|
118
120
|
"extension": [
|
|
119
121
|
{
|
|
120
122
|
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
121
123
|
"valueExpression": {
|
|
122
124
|
"language": "text/fhirpath",
|
|
123
|
-
"expression": "%
|
|
125
|
+
"expression": "%Encounter.entry[0].resource.class"
|
|
124
126
|
}
|
|
125
127
|
}
|
|
126
128
|
]
|
|
127
129
|
},
|
|
128
130
|
{
|
|
129
|
-
"linkId": "
|
|
130
|
-
"text": "
|
|
131
|
+
"linkId": "service-type",
|
|
132
|
+
"text": "Service Type",
|
|
131
133
|
"type": "choice",
|
|
132
|
-
"
|
|
133
|
-
"answerValueSet": "http://hl7.org/fhir/ValueSet/condition-category",
|
|
134
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/service-type",
|
|
134
135
|
"extension": [
|
|
135
136
|
{
|
|
136
137
|
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
137
138
|
"valueExpression": {
|
|
138
139
|
"language": "text/fhirpath",
|
|
139
|
-
"expression": "%
|
|
140
|
+
"expression": "%Encounter.entry[0].resource.serviceType.coding"
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
143
|
]
|
|
143
144
|
},
|
|
144
145
|
{
|
|
145
|
-
"linkId": "
|
|
146
|
-
"text": "
|
|
147
|
-
"type": "
|
|
148
|
-
"
|
|
149
|
-
"extension": [
|
|
146
|
+
"linkId": "participant",
|
|
147
|
+
"text": "Participant",
|
|
148
|
+
"type": "group",
|
|
149
|
+
"item": [
|
|
150
150
|
{
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
"linkId": "participant-type",
|
|
152
|
+
"text": "Participant Type",
|
|
153
|
+
"type": "choice",
|
|
154
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/encounter-participant-type",
|
|
155
|
+
"extension": [
|
|
156
|
+
{
|
|
157
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
158
|
+
"valueExpression": {
|
|
159
|
+
"language": "text/fhirpath",
|
|
160
|
+
"expression": "%Encounter.entry[0].resource.participant.type.coding"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"linkId": "participant-individual",
|
|
167
|
+
"text": "Participant Individual",
|
|
168
|
+
"type": "reference",
|
|
169
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/participant-individual",
|
|
170
|
+
"extension": [
|
|
171
|
+
{
|
|
172
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
173
|
+
"valueExpression": {
|
|
174
|
+
"language": "text/fhirpath",
|
|
175
|
+
"expression": "%Encounter.entry[0].resource.participant.individual.reference"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
]
|
|
156
179
|
}
|
|
157
180
|
]
|
|
158
181
|
},
|
|
159
182
|
{
|
|
160
|
-
"linkId": "
|
|
161
|
-
"text": "
|
|
183
|
+
"linkId": "period",
|
|
184
|
+
"text": "Period",
|
|
185
|
+
"type": "group",
|
|
186
|
+
"item": [
|
|
187
|
+
{
|
|
188
|
+
"linkId": "period-start",
|
|
189
|
+
"text": "Period Start",
|
|
190
|
+
"type": "dateTime",
|
|
191
|
+
"extension": [
|
|
192
|
+
{
|
|
193
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
194
|
+
"valueExpression": {
|
|
195
|
+
"language": "text/fhirpath",
|
|
196
|
+
"expression": "%Encounter.entry[0].resource.period.start"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"linkId": "period-end",
|
|
203
|
+
"text": "Period End",
|
|
204
|
+
"type": "dateTime",
|
|
205
|
+
"extension": [
|
|
206
|
+
{
|
|
207
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
208
|
+
"valueExpression": {
|
|
209
|
+
"language": "text/fhirpath",
|
|
210
|
+
"expression": "%Encounter.entry[0].resource.period.end"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
{
|
|
219
|
+
"linkId": "reason-code",
|
|
220
|
+
"text": "Reason Code",
|
|
162
221
|
"type": "choice",
|
|
163
|
-
"
|
|
164
|
-
"answerValueSet": "http://hl7.org/fhir/ValueSet/condition-code",
|
|
222
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/encounter-reason",
|
|
165
223
|
"extension": [
|
|
166
224
|
{
|
|
167
225
|
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
168
226
|
"valueExpression": {
|
|
169
227
|
"language": "text/fhirpath",
|
|
170
|
-
"expression": "%
|
|
228
|
+
"expression": "%Encounter.entry[0].resource.reasonCode.coding"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
|
|
233
|
+
"valueCodeableConcept": {
|
|
234
|
+
"coding": [
|
|
235
|
+
{
|
|
236
|
+
"system": "http://hl7.org/fhir/questionnaire-item-control",
|
|
237
|
+
"code": "autocomplete"
|
|
238
|
+
}
|
|
239
|
+
]
|
|
171
240
|
}
|
|
172
241
|
}
|
|
173
242
|
]
|
|
174
243
|
},
|
|
175
244
|
{
|
|
245
|
+
"linkId": "reason-reference",
|
|
246
|
+
"text": "Reason Reference",
|
|
247
|
+
"type": "reference",
|
|
248
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/reason-reference",
|
|
176
249
|
"extension": [
|
|
177
250
|
{
|
|
178
251
|
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
179
252
|
"valueExpression": {
|
|
180
253
|
"language": "text/fhirpath",
|
|
181
|
-
"expression": "%
|
|
254
|
+
"expression": "%Encounter.entry[0].resource.reasonReference.reference"
|
|
182
255
|
}
|
|
183
256
|
}
|
|
184
|
-
]
|
|
185
|
-
"linkId": "onset",
|
|
186
|
-
"text": "Onset[x]",
|
|
187
|
-
"type": "string"
|
|
257
|
+
]
|
|
188
258
|
},
|
|
189
259
|
{
|
|
190
|
-
"
|
|
260
|
+
"linkId": "location",
|
|
261
|
+
"text": "Location",
|
|
262
|
+
"type": "group",
|
|
263
|
+
"item": [
|
|
191
264
|
{
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
265
|
+
"linkId": "location-location",
|
|
266
|
+
"text": "Location",
|
|
267
|
+
"type": "reference",
|
|
268
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/location",
|
|
269
|
+
"extension": [
|
|
270
|
+
{
|
|
271
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
272
|
+
"valueExpression": {
|
|
273
|
+
"language": "text/fhirpath",
|
|
274
|
+
"expression": "%Encounter.entry[0].resource.location.location.reference"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
]
|
|
197
278
|
}
|
|
198
|
-
]
|
|
199
|
-
"linkId": "abatement",
|
|
200
|
-
"text": "Abatement[x]",
|
|
201
|
-
"type": "string"
|
|
279
|
+
]
|
|
202
280
|
},
|
|
203
281
|
{
|
|
204
|
-
"linkId": "
|
|
205
|
-
"text": "
|
|
206
|
-
"type": "
|
|
282
|
+
"linkId": "service-provider",
|
|
283
|
+
"text": "Service Provider",
|
|
284
|
+
"type": "reference",
|
|
285
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/service-provider",
|
|
207
286
|
"extension": [
|
|
208
287
|
{
|
|
209
288
|
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
210
289
|
"valueExpression": {
|
|
211
290
|
"language": "text/fhirpath",
|
|
212
|
-
"expression": "%
|
|
291
|
+
"expression": "%Encounter.entry[0].resource.serviceProvider.reference"
|
|
213
292
|
}
|
|
214
293
|
}
|
|
215
294
|
]
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
"resourceType": "Questionnaire",
|
|
3
|
+
"id": "AuCoreImmunization",
|
|
4
|
+
"extension": [
|
|
5
|
+
{
|
|
6
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
|
|
7
|
+
"extension": [
|
|
8
|
+
{
|
|
9
|
+
"url": "name",
|
|
10
|
+
"valueCoding": {
|
|
11
|
+
"system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
|
|
12
|
+
"code": "patient"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"url": "type",
|
|
17
|
+
"valueCode": "Patient"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"url": "description",
|
|
21
|
+
"valueString": "The patient that is to be used to pre-populate the form"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"url": "http://hl7.org/fhir/StructureDefinition/variable",
|
|
27
|
+
"valueExpression": {
|
|
28
|
+
"name": "Immunization",
|
|
29
|
+
"language": "application/x-fhir-query",
|
|
30
|
+
"expression": "Immunization?patient={{%patient.id}}"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"version": "0.5.0-ci-build",
|
|
35
|
+
"name": "AU Core Immunization",
|
|
36
|
+
"title": "AU Core Immunization",
|
|
37
|
+
"status": "draft",
|
|
38
|
+
"date": "2024-07-24",
|
|
39
|
+
"item": [
|
|
40
|
+
{
|
|
41
|
+
"linkId": "immunization",
|
|
42
|
+
"text": "AU Core Immunization",
|
|
43
|
+
"type": "group",
|
|
44
|
+
"repeats": false,
|
|
45
|
+
"item": [
|
|
46
|
+
{
|
|
47
|
+
"linkId": "patient-details",
|
|
48
|
+
"text": "Patient Details",
|
|
49
|
+
"type": "group",
|
|
50
|
+
"item": [
|
|
51
|
+
{
|
|
52
|
+
"extension": [
|
|
53
|
+
{
|
|
54
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
55
|
+
"valueExpression": {
|
|
56
|
+
"language": "text/fhirpath",
|
|
57
|
+
"expression": "%patient.id"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"linkId": "patient-id",
|
|
62
|
+
"text": "Patient ID",
|
|
63
|
+
"type": "string",
|
|
64
|
+
"required": true,
|
|
65
|
+
"readOnly": true
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"extension": [
|
|
69
|
+
{
|
|
70
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
71
|
+
"valueExpression": {
|
|
72
|
+
"language": "text/fhirpath",
|
|
73
|
+
"expression": "(%patient.name.where(use='official').select((family | (given\n| prefix).join(' ')).join(', ').where($this != '') | text)).first()"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"linkId": "patient-name",
|
|
78
|
+
"text": "Patient Name",
|
|
79
|
+
"type": "string",
|
|
80
|
+
"required": true,
|
|
81
|
+
"readOnly": true
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"linkId": "first-immunization-note",
|
|
87
|
+
"text": "This questionnaire only uses the first Immunization resource of a referenced\npatient.",
|
|
88
|
+
"_text": {
|
|
89
|
+
"extension": [
|
|
90
|
+
{
|
|
91
|
+
"url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml",
|
|
92
|
+
"valueString": "<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>"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"type": "display"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"linkId": "status",
|
|
100
|
+
"text": "Status",
|
|
101
|
+
"type": "choice",
|
|
102
|
+
"required": true,
|
|
103
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/immunization-status",
|
|
104
|
+
"extension": [
|
|
105
|
+
{
|
|
106
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
107
|
+
"valueExpression": {
|
|
108
|
+
"language": "text/fhirpath",
|
|
109
|
+
"expression": "%Immunization.entry[0].resource.status"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"linkId": "vaccineCode",
|
|
116
|
+
"text": "Vaccine Code",
|
|
117
|
+
"type": "choice",
|
|
118
|
+
"required": true,
|
|
119
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/vaccine-code",
|
|
120
|
+
"extension": [
|
|
121
|
+
{
|
|
122
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
123
|
+
"valueExpression": {
|
|
124
|
+
"language": "text/fhirpath",
|
|
125
|
+
"expression": "%Immunization.entry[0].resource.vaccineCode.coding"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"linkId": "occurrenceDateTime",
|
|
132
|
+
"text": "Occurrence DateTime",
|
|
133
|
+
"type": "dateTime",
|
|
134
|
+
"extension": [
|
|
135
|
+
{
|
|
136
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
137
|
+
"valueExpression": {
|
|
138
|
+
"language": "text/fhirpath",
|
|
139
|
+
"expression": "%Immunization.entry[0].resource.occurrenceDateTime"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"linkId": "primarySource",
|
|
146
|
+
"text": "Primary Source",
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"extension": [
|
|
149
|
+
{
|
|
150
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
151
|
+
"valueExpression": {
|
|
152
|
+
"language": "text/fhirpath",
|
|
153
|
+
"expression": "%Immunization.entry[0].resource.primarySource"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"linkId": "note",
|
|
160
|
+
"text": "Note",
|
|
161
|
+
"type": "text",
|
|
162
|
+
"extension": [
|
|
163
|
+
{
|
|
164
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
165
|
+
"valueExpression": {
|
|
166
|
+
"language": "text/fhirpath",
|
|
167
|
+
"expression": "%Immunization.entry[0].resource.note.text"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
}
|