@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.
- 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/components/FormComponents/GroupItem/NextPageButton.js +26 -0
- 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/useCodingCalculatedExpression.js +11 -0
- package/lib/hooks/useCodingCalculatedExpression.js.map +1 -1
- 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/calculatedExpression.js +1 -1
- package/lib/utils/calculatedExpression.js.map +1 -1
- package/lib/utils/fhirpath.js +0 -4
- package/lib/utils/fhirpath.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/useCodingCalculatedExpression.ts +14 -1
- 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 +209 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreCondition.json +220 -0
- package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreEncounter.json +299 -0
- 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 +3796 -0
- package/src/stories/assets/questionnaires/QItemControlGroup.ts +673 -0
- package/src/stories/assets/questionnaires/QPrePopTester.ts +266 -71
- package/src/stories/sdc/ItemControlGroup.stories.tsx +22 -1
- package/src/stories/testing/AuCoreTester.stories.tsx +196 -0
- package/src/utils/calculatedExpression.ts +1 -1
- package/src/utils/fhirpath.ts +0 -5
- 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/stats.html +0 -4842
- package/stats1.html +0 -4842
- package/stats3.html +0 -4842
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"resourceType": "Questionnaire",
|
|
3
|
+
"id": "AuCorePractitionerRole",
|
|
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": "user"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"url": "type",
|
|
17
|
+
"valueCode": "Practitioner"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"url": "description",
|
|
21
|
+
"valueString": "The practitioner 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": "PractitionerRole",
|
|
29
|
+
"language": "application/x-fhir-query",
|
|
30
|
+
"expression": "PractitionerRole?practitioner={{%user.id}}"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"version": "0.1.0",
|
|
35
|
+
"name": "AU Core PractitionerRole",
|
|
36
|
+
"title": "AU Core PractitionerRole",
|
|
37
|
+
"status": "draft",
|
|
38
|
+
"date": "2024-07-24",
|
|
39
|
+
"item": [
|
|
40
|
+
{
|
|
41
|
+
"linkId": "practitionerRole",
|
|
42
|
+
"text": "AU Core PractitionerRole",
|
|
43
|
+
"type": "group",
|
|
44
|
+
"repeats": false,
|
|
45
|
+
"item": [
|
|
46
|
+
{
|
|
47
|
+
"linkId": "practitioner-details",
|
|
48
|
+
"text": "Practitioner 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": "%user.id"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"linkId": "practitioner-id",
|
|
62
|
+
"text": "Practitioner 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": "(%user.name.select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"linkId": "practitioner-name",
|
|
78
|
+
"text": "Practitioner Name",
|
|
79
|
+
"type": "string",
|
|
80
|
+
"required": true,
|
|
81
|
+
"readOnly": true
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"linkId": "identifiers",
|
|
87
|
+
"text": "Identifiers",
|
|
88
|
+
"type": "group",
|
|
89
|
+
"item": [
|
|
90
|
+
{
|
|
91
|
+
"linkId": "identifier-medicare-provider-number",
|
|
92
|
+
"text": "Medicare Provider Number",
|
|
93
|
+
"type": "string",
|
|
94
|
+
"extension": [
|
|
95
|
+
{
|
|
96
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
97
|
+
"valueExpression": {
|
|
98
|
+
"language": "text/fhirpath",
|
|
99
|
+
"expression": "%PractitionerRole.entry[0].resource.identifier.where(type.coding.exists(system='http://terminology.hl7.org.au/CodeSystem/v2-0203' and code='UPIN')).value"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"linkId": "identifier-national-provider-identifier",
|
|
106
|
+
"text": "National Provider Identifier at Organisation (NPIO)",
|
|
107
|
+
"type": "string",
|
|
108
|
+
"extension": [
|
|
109
|
+
{
|
|
110
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
111
|
+
"valueExpression": {
|
|
112
|
+
"language": "text/fhirpath",
|
|
113
|
+
"expression": "%PractitionerRole.entry[0].resource.identifier.where(type.coding.exists(system='http://terminology.hl7.org.au/CodeSystem/v2-0203' and code='NPIO')).value"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"linkId": "identifier-employee-number",
|
|
120
|
+
"text": "Employee Number",
|
|
121
|
+
"type": "string",
|
|
122
|
+
"extension": [
|
|
123
|
+
{
|
|
124
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
125
|
+
"valueExpression": {
|
|
126
|
+
"language": "text/fhirpath",
|
|
127
|
+
"expression": "%PractitionerRole.entry[0].resource.identifier.where(type.coding.exists(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='EI')).value"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"linkId": "organization",
|
|
136
|
+
"text": "Organization",
|
|
137
|
+
"type": "reference",
|
|
138
|
+
"extension": [
|
|
139
|
+
{
|
|
140
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
141
|
+
"valueExpression": {
|
|
142
|
+
"language": "text/fhirpath",
|
|
143
|
+
"expression": "%PractitionerRole.entry[0].resource.organization.reference"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"linkId": "code",
|
|
150
|
+
"text": "Code",
|
|
151
|
+
"type": "choice",
|
|
152
|
+
"answerValueSet": "https://healthterminologies.gov.au/fhir/ValueSet/practitioner-role-1",
|
|
153
|
+
"extension": [
|
|
154
|
+
{
|
|
155
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
156
|
+
"valueExpression": {
|
|
157
|
+
"language": "text/fhirpath",
|
|
158
|
+
"expression": "%PractitionerRole.entry[0].resource.code.coding"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"linkId": "specialty",
|
|
165
|
+
"text": "Specialty",
|
|
166
|
+
"type": "choice",
|
|
167
|
+
"answerValueSet": "https://healthterminologies.gov.au/fhir/ValueSet/clinical-specialty-1",
|
|
168
|
+
"extension": [
|
|
169
|
+
{
|
|
170
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
171
|
+
"valueExpression": {
|
|
172
|
+
"language": "text/fhirpath",
|
|
173
|
+
"expression": "%PractitionerRole.entry[0].resource.specialty.coding"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"linkId": "telecom",
|
|
180
|
+
"text": "Telecom",
|
|
181
|
+
"type": "group",
|
|
182
|
+
"item": [
|
|
183
|
+
{
|
|
184
|
+
"extension": [
|
|
185
|
+
{
|
|
186
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
187
|
+
"valueExpression": {
|
|
188
|
+
"language": "text/fhirpath",
|
|
189
|
+
"expression": "%PractitionerRole.entry[0].resource.telecom.where(system = 'phone' and use = 'work').value"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"linkId": "9541f0b0-f5ba-4fe7-a8e9-ad003cef897b",
|
|
194
|
+
"text": "Home phone",
|
|
195
|
+
"type": "string"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"extension": [
|
|
199
|
+
{
|
|
200
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
201
|
+
"valueExpression": {
|
|
202
|
+
"language": "text/fhirpath",
|
|
203
|
+
"expression": "%PractitionerRole.entry[0].resource.telecom.where(system = 'email' and use = 'work').value"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"linkId": "4037a02b-4a85-40e0-9be6-5b17df1aac56",
|
|
208
|
+
"text": "Mobile phone",
|
|
209
|
+
"type": "string"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
{
|
|
2
|
+
"resourceType": "Questionnaire",
|
|
3
|
+
"id": "AuCoreProcedure",
|
|
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 procedure 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": "Procedure",
|
|
29
|
+
"language": "application/x-fhir-query",
|
|
30
|
+
"expression": "Procedure?patient={{%patient.id}}"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"version": "0.1.0",
|
|
35
|
+
"name": "AU Core Procedure",
|
|
36
|
+
"title": "AU Core Procedure",
|
|
37
|
+
"status": "draft",
|
|
38
|
+
"date": "2024-07-24",
|
|
39
|
+
"item": [
|
|
40
|
+
{
|
|
41
|
+
"linkId": "procedure",
|
|
42
|
+
"text": "AU Core Procedure",
|
|
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-procedure-note",
|
|
87
|
+
"text": "This questionnaire only uses the first Procedure 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 Procedure 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/event-status",
|
|
104
|
+
"extension": [
|
|
105
|
+
{
|
|
106
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
107
|
+
"valueExpression": {
|
|
108
|
+
"language": "text/fhirpath",
|
|
109
|
+
"expression": "%Procedure.entry[0].resource.status"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"linkId": "code",
|
|
116
|
+
"text": "Code",
|
|
117
|
+
"type": "choice",
|
|
118
|
+
"required": true,
|
|
119
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/procedure-code",
|
|
120
|
+
"extension": [
|
|
121
|
+
{
|
|
122
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
123
|
+
"valueExpression": {
|
|
124
|
+
"language": "text/fhirpath",
|
|
125
|
+
"expression": "%Procedure.entry[0].resource.code.coding"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
|
|
130
|
+
"valueCodeableConcept": {
|
|
131
|
+
"coding": [
|
|
132
|
+
{
|
|
133
|
+
"system": "http://hl7.org/fhir/questionnaire-item-control",
|
|
134
|
+
"code": "autocomplete"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
{
|
|
143
|
+
"linkId": "encounter",
|
|
144
|
+
"text": "Encounter",
|
|
145
|
+
"type": "reference",
|
|
146
|
+
"extension": [
|
|
147
|
+
{
|
|
148
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
149
|
+
"valueExpression": {
|
|
150
|
+
"language": "text/fhirpath",
|
|
151
|
+
"expression": "%Procedure.entry[0].resource.encounter.reference"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"linkId": "performed",
|
|
158
|
+
"text": "Performed[x]",
|
|
159
|
+
"type": "string",
|
|
160
|
+
"extension": [
|
|
161
|
+
{
|
|
162
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
163
|
+
"valueExpression": {
|
|
164
|
+
"language": "text/fhirpath",
|
|
165
|
+
"expression": "%Procedure.entry[0].resource.performed"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"linkId": "reasonCode",
|
|
172
|
+
"text": "Reason Code",
|
|
173
|
+
"type": "choice",
|
|
174
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/procedure-reason",
|
|
175
|
+
"extension": [
|
|
176
|
+
{
|
|
177
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
178
|
+
"valueExpression": {
|
|
179
|
+
"language": "text/fhirpath",
|
|
180
|
+
"expression": "%Procedure.entry[0].resource.reasonCode.coding"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
|
|
185
|
+
"valueCodeableConcept": {
|
|
186
|
+
"coding": [
|
|
187
|
+
{
|
|
188
|
+
"system": "http://hl7.org/fhir/questionnaire-item-control",
|
|
189
|
+
"code": "autocomplete"
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
{
|
|
2
|
+
"resourceType": "Questionnaire",
|
|
3
|
+
"id": "RespirationRateObservation",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"name": "RespirationRateObservation",
|
|
6
|
+
"title": "Respiration Rate Observation",
|
|
7
|
+
"status": "draft",
|
|
8
|
+
"date": "2024-07-15",
|
|
9
|
+
"extension": [
|
|
10
|
+
{
|
|
11
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
|
|
12
|
+
"extension": [
|
|
13
|
+
{
|
|
14
|
+
"url": "name",
|
|
15
|
+
"valueCoding": {
|
|
16
|
+
"system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
|
|
17
|
+
"code": "patient"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"url": "type",
|
|
22
|
+
"valueCode": "Patient"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"url": "description",
|
|
26
|
+
"valueString": "The patient that is to be used to pre-populate the form"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"url": "http://hl7.org/fhir/StructureDefinition/variable",
|
|
32
|
+
"valueExpression": {
|
|
33
|
+
"name": "ObservationRespirationRate",
|
|
34
|
+
"language": "application/x-fhir-query",
|
|
35
|
+
"expression": "Observation?code=9279-1&_count=1&_sort=-date&patient={{%patient.id}}"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"item": [
|
|
40
|
+
{
|
|
41
|
+
"linkId": "observation",
|
|
42
|
+
"text": "AU Core Observation - Respiration Rate",
|
|
43
|
+
"type": "group",
|
|
44
|
+
"item": [
|
|
45
|
+
{
|
|
46
|
+
"linkId": "patient-details",
|
|
47
|
+
"text": "Patient Details",
|
|
48
|
+
"type": "group",
|
|
49
|
+
"item": [
|
|
50
|
+
{
|
|
51
|
+
"extension": [
|
|
52
|
+
{
|
|
53
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
54
|
+
"valueExpression": {
|
|
55
|
+
"language": "text/fhirpath",
|
|
56
|
+
"expression": "%patient.id"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"linkId": "patient-id",
|
|
61
|
+
"text": "Patient ID",
|
|
62
|
+
"type": "string",
|
|
63
|
+
"required": true,
|
|
64
|
+
"readOnly": true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"extension": [
|
|
68
|
+
{
|
|
69
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
70
|
+
"valueExpression": {
|
|
71
|
+
"language": "text/fhirpath",
|
|
72
|
+
"expression": "(%patient.name.where(use='official').select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"linkId": "patient-name",
|
|
77
|
+
"text": "Patient Name",
|
|
78
|
+
"type": "string",
|
|
79
|
+
"required": true,
|
|
80
|
+
"readOnly": true
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"linkId": "first-observation-note",
|
|
86
|
+
"text": "This questionnaire only uses the first Observation resource with LOINC code 9279-1 (Respiration rate) of a referenced\npatient.",
|
|
87
|
+
"_text": {
|
|
88
|
+
"extension": [
|
|
89
|
+
{
|
|
90
|
+
"url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml",
|
|
91
|
+
"valueString": "<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>"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"type": "display"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"linkId": "observation-status",
|
|
99
|
+
"text": "Observation Status",
|
|
100
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/observation-status",
|
|
101
|
+
"type": "choice",
|
|
102
|
+
"extension": [
|
|
103
|
+
{
|
|
104
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
105
|
+
"valueExpression": {
|
|
106
|
+
"language": "text/fhirpath",
|
|
107
|
+
"expression": "%ObservationRespirationRate.entry[0].resource.status"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"linkId": "observation-category",
|
|
114
|
+
"text": "Observation Category",
|
|
115
|
+
"type": "choice",
|
|
116
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/observation-category",
|
|
117
|
+
"extension": [
|
|
118
|
+
{
|
|
119
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
120
|
+
"valueExpression": {
|
|
121
|
+
"language": "text/fhirpath",
|
|
122
|
+
"expression": "%ObservationRespirationRate.entry[0].resource.category.coding"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"linkId": "observation-category-vscat-boolean",
|
|
129
|
+
"text": "Observation Category is VSCat?",
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"extension": [
|
|
132
|
+
{
|
|
133
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
134
|
+
"valueExpression": {
|
|
135
|
+
"language": "text/fhirpath",
|
|
136
|
+
"expression": "%ObservationRespirationRate.entry[0].resource.category.coding.code = 'vital-signs'"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"linkId": "observation-code-loinc",
|
|
143
|
+
"text": "Observation Code (LOINC)",
|
|
144
|
+
"type": "choice",
|
|
145
|
+
"answerValueSet": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult",
|
|
146
|
+
"extension": [
|
|
147
|
+
{
|
|
148
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
149
|
+
"valueExpression": {
|
|
150
|
+
"language": "text/fhirpath",
|
|
151
|
+
"expression": "%ObservationRespirationRate.entry[0].resource.code.coding.where(system='http://loinc.org' and code='9279-1')"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"linkId": "Observation.effectiveDateTime",
|
|
158
|
+
"text": "Effective Date Time",
|
|
159
|
+
"type": "dateTime",
|
|
160
|
+
"extension": [
|
|
161
|
+
{
|
|
162
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
163
|
+
"valueExpression": {
|
|
164
|
+
"language": "text/fhirpath",
|
|
165
|
+
"expression": "%ObservationRespirationRate.entry[0].resource.effectiveDateTime"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"linkId": "observation-value",
|
|
172
|
+
"text": "Observation Value",
|
|
173
|
+
"type": "decimal",
|
|
174
|
+
"extension": [
|
|
175
|
+
{
|
|
176
|
+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
|
|
177
|
+
"valueExpression": {
|
|
178
|
+
"language": "text/fhirpath",
|
|
179
|
+
"expression": "%ObservationRespirationRate.entry[0].resource.valueQuantity.value"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit",
|
|
184
|
+
"valueCoding": {
|
|
185
|
+
"system": "http://unitsofmeasure.org",
|
|
186
|
+
"code": "breaths/min",
|
|
187
|
+
"display": "breaths/min"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
}
|