sdc-qrf 0.1.3 → 0.3.1

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 (176) hide show
  1. package/lib/components.d.ts +3 -3
  2. package/lib/components.js +12 -12
  3. package/lib/components.js.map +1 -1
  4. package/lib/context.d.ts +0 -1
  5. package/lib/converter/extensions.d.ts +35 -0
  6. package/lib/converter/extensions.js +128 -0
  7. package/lib/converter/extensions.js.map +1 -0
  8. package/lib/converter/fceToFhir/index.d.ts +4 -0
  9. package/lib/converter/fceToFhir/index.js +15 -0
  10. package/lib/converter/fceToFhir/index.js.map +1 -0
  11. package/lib/converter/fceToFhir/questionnaire/index.d.ts +3 -0
  12. package/lib/converter/fceToFhir/questionnaire/index.js +17 -0
  13. package/lib/converter/fceToFhir/questionnaire/index.js.map +1 -0
  14. package/lib/converter/fceToFhir/questionnaire/processExtensions.d.ts +3 -0
  15. package/lib/converter/fceToFhir/questionnaire/processExtensions.js +61 -0
  16. package/lib/converter/fceToFhir/questionnaire/processExtensions.js.map +1 -0
  17. package/lib/converter/fceToFhir/questionnaire/processItems.d.ts +3 -0
  18. package/lib/converter/fceToFhir/questionnaire/processItems.js +144 -0
  19. package/lib/converter/fceToFhir/questionnaire/processItems.js.map +1 -0
  20. package/lib/converter/fceToFhir/questionnaire/processMeta.d.ts +3 -0
  21. package/lib/converter/fceToFhir/questionnaire/processMeta.js +20 -0
  22. package/lib/converter/fceToFhir/questionnaire/processMeta.js.map +1 -0
  23. package/lib/converter/fceToFhir/questionnaireResponse/index.d.ts +3 -0
  24. package/lib/converter/fceToFhir/questionnaireResponse/index.js +20 -0
  25. package/lib/converter/fceToFhir/questionnaireResponse/index.js.map +1 -0
  26. package/lib/converter/fceToFhir/questionnaireResponse/processAnswers.d.ts +2 -0
  27. package/lib/converter/fceToFhir/questionnaireResponse/processAnswers.js +48 -0
  28. package/lib/converter/fceToFhir/questionnaireResponse/processAnswers.js.map +1 -0
  29. package/lib/converter/fceToFhir/questionnaireResponse/processMeta.d.ts +3 -0
  30. package/lib/converter/fceToFhir/questionnaireResponse/processMeta.js +18 -0
  31. package/lib/converter/fceToFhir/questionnaireResponse/processMeta.js.map +1 -0
  32. package/lib/converter/fceToFhir/questionnaireResponse/processReference.d.ts +3 -0
  33. package/lib/converter/fceToFhir/questionnaireResponse/processReference.js +19 -0
  34. package/lib/converter/fceToFhir/questionnaireResponse/processReference.js.map +1 -0
  35. package/lib/converter/fhirToFce/index.d.ts +4 -0
  36. package/lib/converter/fhirToFce/index.js +15 -0
  37. package/lib/converter/fhirToFce/index.js.map +1 -0
  38. package/lib/converter/fhirToFce/questionnaire/index.d.ts +3 -0
  39. package/lib/converter/fhirToFce/questionnaire/index.js +21 -0
  40. package/lib/converter/fhirToFce/questionnaire/index.js.map +1 -0
  41. package/lib/converter/fhirToFce/questionnaire/processExtensions.d.ts +8 -0
  42. package/lib/converter/fhirToFce/questionnaire/processExtensions.js +89 -0
  43. package/lib/converter/fhirToFce/questionnaire/processExtensions.js.map +1 -0
  44. package/lib/converter/fhirToFce/questionnaire/processItems.d.ts +3 -0
  45. package/lib/converter/fhirToFce/questionnaire/processItems.js +131 -0
  46. package/lib/converter/fhirToFce/questionnaire/processItems.js.map +1 -0
  47. package/lib/converter/fhirToFce/questionnaire/processMeta.d.ts +32 -0
  48. package/lib/converter/fhirToFce/questionnaire/processMeta.js +14 -0
  49. package/lib/converter/fhirToFce/questionnaire/processMeta.js.map +1 -0
  50. package/lib/converter/fhirToFce/questionnaireResponse/index.d.ts +3 -0
  51. package/lib/converter/fhirToFce/questionnaireResponse/index.js +20 -0
  52. package/lib/converter/fhirToFce/questionnaireResponse/index.js.map +1 -0
  53. package/lib/converter/fhirToFce/questionnaireResponse/processAnswers.d.ts +2 -0
  54. package/lib/converter/fhirToFce/questionnaireResponse/processAnswers.js +46 -0
  55. package/lib/converter/fhirToFce/questionnaireResponse/processAnswers.js.map +1 -0
  56. package/lib/converter/fhirToFce/questionnaireResponse/processMeta.d.ts +3 -0
  57. package/lib/converter/fhirToFce/questionnaireResponse/processMeta.js +15 -0
  58. package/lib/converter/fhirToFce/questionnaireResponse/processMeta.js.map +1 -0
  59. package/lib/converter/fhirToFce/questionnaireResponse/processReference.d.ts +3 -0
  60. package/lib/converter/fhirToFce/questionnaireResponse/processReference.js +18 -0
  61. package/lib/converter/fhirToFce/questionnaireResponse/processReference.js.map +1 -0
  62. package/lib/converter/fhirToFce/utils.d.ts +3 -0
  63. package/lib/converter/fhirToFce/utils.js +37 -0
  64. package/lib/converter/fhirToFce/utils.js.map +1 -0
  65. package/lib/converter/index.d.ts +12 -0
  66. package/lib/converter/index.js +84 -0
  67. package/lib/converter/index.js.map +1 -0
  68. package/lib/index.d.ts +1 -0
  69. package/lib/index.js +1 -0
  70. package/lib/index.js.map +1 -1
  71. package/lib/setupTests.d.ts +1 -0
  72. package/lib/setupTests.js +4 -0
  73. package/lib/setupTests.js.map +1 -0
  74. package/lib/types.d.ts +10 -10
  75. package/lib/utils.d.ts +4 -1
  76. package/lib/utils.js +9 -2
  77. package/lib/utils.js.map +1 -1
  78. package/package.json +4 -5
  79. package/src/components.tsx +12 -12
  80. package/src/converter/__tests__/fce.test.ts +224 -0
  81. package/src/converter/__tests__/resources/questionnaire_fce/allergies.json +405 -0
  82. package/src/converter/__tests__/resources/questionnaire_fce/beverages.json +72 -0
  83. package/src/converter/__tests__/resources/questionnaire_fce/choice_answer_option.json +53 -0
  84. package/src/converter/__tests__/resources/questionnaire_fce/consent.json +86 -0
  85. package/src/converter/__tests__/resources/questionnaire_fce/enable_when.json +103 -0
  86. package/src/converter/__tests__/resources/questionnaire_fce/encounter_create.json +126 -0
  87. package/src/converter/__tests__/resources/questionnaire_fce/gad_7.json +459 -0
  88. package/src/converter/__tests__/resources/questionnaire_fce/immunization.json +182 -0
  89. package/src/converter/__tests__/resources/questionnaire_fce/medication.json +189 -0
  90. package/src/converter/__tests__/resources/questionnaire_fce/multiple_type_launch_context.json +406 -0
  91. package/src/converter/__tests__/resources/questionnaire_fce/patient_create.json +84 -0
  92. package/src/converter/__tests__/resources/questionnaire_fce/patient_edit.json +125 -0
  93. package/src/converter/__tests__/resources/questionnaire_fce/phq_2_phq_9.json +552 -0
  94. package/src/converter/__tests__/resources/questionnaire_fce/physicalexam.json +385 -0
  95. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_create.json +90 -0
  96. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_create_structure_map.json +91 -0
  97. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_edit.json +144 -0
  98. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_role_create.json +37 -0
  99. package/src/converter/__tests__/resources/questionnaire_fce/public_appointment.json +91 -0
  100. package/src/converter/__tests__/resources/questionnaire_fce/review_of_systems.json +389 -0
  101. package/src/converter/__tests__/resources/questionnaire_fce/source_queries.json +34 -0
  102. package/src/converter/__tests__/resources/questionnaire_fce/vitals.json +234 -0
  103. package/src/converter/__tests__/resources/questionnaire_fhir/allergies.json +433 -0
  104. package/src/converter/__tests__/resources/questionnaire_fhir/beverages.json +99 -0
  105. package/src/converter/__tests__/resources/questionnaire_fhir/choice_answer_option.json +49 -0
  106. package/src/converter/__tests__/resources/questionnaire_fhir/consent.json +119 -0
  107. package/src/converter/__tests__/resources/questionnaire_fhir/enable_when.json +87 -0
  108. package/src/converter/__tests__/resources/questionnaire_fhir/encounter_create.json +171 -0
  109. package/src/converter/__tests__/resources/questionnaire_fhir/gad_7.json +489 -0
  110. package/src/converter/__tests__/resources/questionnaire_fhir/immunization.json +215 -0
  111. package/src/converter/__tests__/resources/questionnaire_fhir/medication.json +226 -0
  112. package/src/converter/__tests__/resources/questionnaire_fhir/multiple_type_launch_context.json +416 -0
  113. package/src/converter/__tests__/resources/questionnaire_fhir/patient_create.json +97 -0
  114. package/src/converter/__tests__/resources/questionnaire_fhir/patient_edit.json +183 -0
  115. package/src/converter/__tests__/resources/questionnaire_fhir/phq_2_phq_9.json +580 -0
  116. package/src/converter/__tests__/resources/questionnaire_fhir/physicalexam.json +544 -0
  117. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_create.json +87 -0
  118. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_create_structure_map.json +91 -0
  119. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_edit.json +193 -0
  120. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_role_create.json +44 -0
  121. package/src/converter/__tests__/resources/questionnaire_fhir/public_appointment.json +116 -0
  122. package/src/converter/__tests__/resources/questionnaire_fhir/review_of_systems.json +368 -0
  123. package/src/converter/__tests__/resources/questionnaire_fhir/source_queries.json +37 -0
  124. package/src/converter/__tests__/resources/questionnaire_fhir/vitals.json +317 -0
  125. package/src/converter/__tests__/resources/questionnaire_response_fce/allergies_inprogress.json +78 -0
  126. package/src/converter/__tests__/resources/questionnaire_response_fce/cardiology.json +96 -0
  127. package/src/converter/__tests__/resources/questionnaire_response_fce/few_answers.json +48 -0
  128. package/src/converter/__tests__/resources/questionnaire_response_fce/gad_7.json +165 -0
  129. package/src/converter/__tests__/resources/questionnaire_response_fce/immunization.json +86 -0
  130. package/src/converter/__tests__/resources/questionnaire_response_fce/medication.json +116 -0
  131. package/src/converter/__tests__/resources/questionnaire_response_fce/new_appointment.json +96 -0
  132. package/src/converter/__tests__/resources/questionnaire_response_fce/patient.json +87 -0
  133. package/src/converter/__tests__/resources/questionnaire_response_fce/phq_2_phq_9.json +193 -0
  134. package/src/converter/__tests__/resources/questionnaire_response_fce/physicalexam.json +187 -0
  135. package/src/converter/__tests__/resources/questionnaire_response_fce/practitioner.json +57 -0
  136. package/src/converter/__tests__/resources/questionnaire_response_fce/reference_answer_with_assoc.json +147 -0
  137. package/src/converter/__tests__/resources/questionnaire_response_fce/review_of_systems.json +129 -0
  138. package/src/converter/__tests__/resources/questionnaire_response_fce/vitals.json +168 -0
  139. package/src/converter/__tests__/resources/questionnaire_response_fhir/allergies_inprogress.json +73 -0
  140. package/src/converter/__tests__/resources/questionnaire_response_fhir/cardiology.json +87 -0
  141. package/src/converter/__tests__/resources/questionnaire_response_fhir/few_answers.json +46 -0
  142. package/src/converter/__tests__/resources/questionnaire_response_fhir/gad_7.json +146 -0
  143. package/src/converter/__tests__/resources/questionnaire_response_fhir/immunization.json +77 -0
  144. package/src/converter/__tests__/resources/questionnaire_response_fhir/medication.json +101 -0
  145. package/src/converter/__tests__/resources/questionnaire_response_fhir/new_appointment.json +86 -0
  146. package/src/converter/__tests__/resources/questionnaire_response_fhir/patient.json +78 -0
  147. package/src/converter/__tests__/resources/questionnaire_response_fhir/phq_2_phq_9.json +170 -0
  148. package/src/converter/__tests__/resources/questionnaire_response_fhir/physicalexam.json +158 -0
  149. package/src/converter/__tests__/resources/questionnaire_response_fhir/practitioner.json +54 -0
  150. package/src/converter/__tests__/resources/questionnaire_response_fhir/reference_answer_with_assoc.json +86 -0
  151. package/src/converter/__tests__/resources/questionnaire_response_fhir/review_of_systems.json +118 -0
  152. package/src/converter/__tests__/resources/questionnaire_response_fhir/vitals.json +145 -0
  153. package/src/converter/extensions.ts +149 -0
  154. package/src/converter/fceToFhir/index.ts +27 -0
  155. package/src/converter/fceToFhir/questionnaire/index.ts +15 -0
  156. package/src/converter/fceToFhir/questionnaire/processExtensions.ts +75 -0
  157. package/src/converter/fceToFhir/questionnaire/processItems.ts +194 -0
  158. package/src/converter/fceToFhir/questionnaire/processMeta.ts +19 -0
  159. package/src/converter/fceToFhir/questionnaireResponse/index.ts +21 -0
  160. package/src/converter/fceToFhir/questionnaireResponse/processAnswers.ts +53 -0
  161. package/src/converter/fceToFhir/questionnaireResponse/processMeta.ts +16 -0
  162. package/src/converter/fceToFhir/questionnaireResponse/processReference.ts +24 -0
  163. package/src/converter/fhirToFce/index.ts +27 -0
  164. package/src/converter/fhirToFce/questionnaire/index.ts +25 -0
  165. package/src/converter/fhirToFce/questionnaire/processExtensions.ts +113 -0
  166. package/src/converter/fhirToFce/questionnaire/processItems.ts +159 -0
  167. package/src/converter/fhirToFce/questionnaire/processMeta.ts +17 -0
  168. package/src/converter/fhirToFce/questionnaireResponse/index.ts +21 -0
  169. package/src/converter/fhirToFce/questionnaireResponse/processAnswers.ts +53 -0
  170. package/src/converter/fhirToFce/questionnaireResponse/processMeta.ts +14 -0
  171. package/src/converter/fhirToFce/questionnaireResponse/processReference.ts +20 -0
  172. package/src/converter/fhirToFce/utils.ts +36 -0
  173. package/src/converter/index.ts +106 -0
  174. package/src/index.ts +1 -0
  175. package/src/setupTests.ts +1 -0
  176. package/src/utils.ts +13 -2
@@ -0,0 +1,234 @@
1
+ {
2
+ "subjectType": ["Encounter", "Patient"],
3
+ "meta": {
4
+ "profile": ["https://beda.software/beda-emr-questionnaire"],
5
+ "lastUpdated": "2023-05-04T01:00:51.328418Z",
6
+ "createdAt": "2023-05-04T01:00:51.328418Z",
7
+ "versionId": "2"
8
+ },
9
+ "launchContext": [
10
+ {
11
+ "name": {
12
+ "code": "Patient"
13
+ },
14
+ "type": ["Patient"]
15
+ }
16
+ ],
17
+ "name": "Vitals",
18
+ "item": [
19
+ {
20
+ "text": "PatientId",
21
+ "type": "string",
22
+ "hidden": true,
23
+ "linkId": "patientId",
24
+ "initialExpression": {
25
+ "language": "text/fhirpath",
26
+ "expression": "%Patient.id"
27
+ }
28
+ },
29
+ {
30
+ "text": "PatientName",
31
+ "type": "string",
32
+ "hidden": true,
33
+ "linkId": "patientName",
34
+ "initialExpression": {
35
+ "language": "text/fhirpath",
36
+ "expression": "%Patient.name.given[0] + ' ' + %Patient.name.family"
37
+ }
38
+ },
39
+ {
40
+ "text": "Height",
41
+ "type": "integer",
42
+ "unit": {
43
+ "code": "cm",
44
+ "system": "http://unitsofmeasure.org",
45
+ "display": "cm"
46
+ },
47
+ "linkId": "height"
48
+ },
49
+ {
50
+ "text": "Weight",
51
+ "type": "integer",
52
+ "unit": {
53
+ "code": "kg",
54
+ "system": "http://unitsofmeasure.org",
55
+ "display": "kg"
56
+ },
57
+ "linkId": "weight"
58
+ },
59
+ {
60
+ "text": "Temperature",
61
+ "type": "integer",
62
+ "unit": {
63
+ "code": "Celsius",
64
+ "system": "http://unitsofmeasure.org",
65
+ "display": "Celsius"
66
+ },
67
+ "linkId": "temperature"
68
+ },
69
+ {
70
+ "text": "Oxygen saturation",
71
+ "type": "integer",
72
+ "unit": {
73
+ "code": "%",
74
+ "system": "http://unitsofmeasure.org",
75
+ "display": "%"
76
+ },
77
+ "linkId": "oxygen-saturation"
78
+ },
79
+ {
80
+ "text": "Pulse rate",
81
+ "type": "integer",
82
+ "unit": {
83
+ "code": "bpm",
84
+ "system": "http://unitsofmeasure.org",
85
+ "display": "bpm"
86
+ },
87
+ "linkId": "pulse-rate"
88
+ },
89
+ {
90
+ "text": "Respiratory Rate",
91
+ "type": "integer",
92
+ "unit": {
93
+ "code": "bpm",
94
+ "system": "http://unitsofmeasure.org",
95
+ "display": "bpm"
96
+ },
97
+ "linkId": "respiratory-rate"
98
+ },
99
+ {
100
+ "item": [
101
+ {
102
+ "item": [
103
+ {
104
+ "text": "BP systolic",
105
+ "type": "integer",
106
+ "unit": {
107
+ "code": "mmHg",
108
+ "system": "http://unitsofmeasure.org",
109
+ "display": "mmHg"
110
+ },
111
+ "linkId": "blood-pressure-systolic"
112
+ },
113
+ {
114
+ "text": "BP diastolic",
115
+ "type": "integer",
116
+ "unit": {
117
+ "code": "mmHg",
118
+ "system": "http://unitsofmeasure.org",
119
+ "display": "mmHg"
120
+ },
121
+ "linkId": "blood-pressure-diastolic"
122
+ }
123
+ ],
124
+ "type": "group",
125
+ "linkId": "blood-pressure-systolic-diastolic",
126
+ "itemControl": {
127
+ "coding": [
128
+ {
129
+ "code": "blood-pressure"
130
+ }
131
+ ]
132
+ }
133
+ },
134
+ {
135
+ "text": "Positions",
136
+ "type": "choice",
137
+ "linkId": "blood-pressure-positions",
138
+ "itemControl": {
139
+ "coding": [
140
+ {
141
+ "code": "inline-choice"
142
+ }
143
+ ]
144
+ },
145
+ "answerOption": [
146
+ {
147
+ "value": {
148
+ "Coding": {
149
+ "code": "sitting",
150
+ "display": "Sitting"
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "value": {
156
+ "Coding": {
157
+ "code": "lying",
158
+ "display": "Lying"
159
+ }
160
+ }
161
+ },
162
+ {
163
+ "value": {
164
+ "Coding": {
165
+ "code": "standing",
166
+ "display": "Standing"
167
+ }
168
+ }
169
+ }
170
+ ]
171
+ },
172
+ {
173
+ "text": "Arm",
174
+ "type": "choice",
175
+ "linkId": "blood-pressure-arm",
176
+ "itemControl": {
177
+ "coding": [
178
+ {
179
+ "code": "inline-choice"
180
+ }
181
+ ]
182
+ },
183
+ "answerOption": [
184
+ {
185
+ "value": {
186
+ "Coding": {
187
+ "code": "biceps-left",
188
+ "display": "Biceps left"
189
+ }
190
+ }
191
+ },
192
+ {
193
+ "value": {
194
+ "Coding": {
195
+ "code": "biceps-right",
196
+ "display": "Biceps right"
197
+ }
198
+ }
199
+ }
200
+ ]
201
+ }
202
+ ],
203
+ "text": "Blood Pressure",
204
+ "type": "group",
205
+ "linkId": "blood-pressure"
206
+ },
207
+ {
208
+ "text": "BMI",
209
+ "type": "integer",
210
+ "unit": {
211
+ "code": "kg/m2",
212
+ "system": "http://unitsofmeasure.org",
213
+ "display": "kg/m2"
214
+ },
215
+ "linkId": "bmi",
216
+ "readOnly": true,
217
+ "required": true,
218
+ "calculatedExpression": {
219
+ "language": "text/fhirpath",
220
+ "expression": "(%QuestionnaireResponse.item.where(linkId='weight').answer.value.integer / ((%QuestionnaireResponse.item.where(linkId='height').answer.value.integer / 100) * (%QuestionnaireResponse.item.where(linkId='height').answer.value.integer / 100))).round(2)"
221
+ }
222
+ }
223
+ ],
224
+ "mapping": [
225
+ {
226
+ "id": "vitals",
227
+ "resourceType": "Mapping"
228
+ }
229
+ ],
230
+ "resourceType": "Questionnaire",
231
+ "status": "active",
232
+ "id": "vitals",
233
+ "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/vitals"
234
+ }
@@ -0,0 +1,433 @@
1
+ {
2
+ "subjectType": [
3
+ "Encounter",
4
+ "Patient"
5
+ ],
6
+ "meta": {
7
+ "profile": [
8
+ "https://beda.software/beda-emr-questionnaire"
9
+ ],
10
+ "lastUpdated": "2023-04-10T03:43:34.792167Z",
11
+ "versionId": "694",
12
+ "extension": [
13
+ {
14
+ "url": "ex:createdAt",
15
+ "valueInstant": "2023-04-05T05:22:35.752466Z"
16
+ }
17
+ ]
18
+ },
19
+ "name": "Allergies",
20
+ "item": [
21
+ {
22
+ "text": "DateTime",
23
+ "type": "dateTime",
24
+ "extension": [
25
+ {
26
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
27
+ "valueBoolean": true
28
+ },
29
+ {
30
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
31
+ "valueExpression": {
32
+ "language": "text/fhirpath",
33
+ "expression": "now()"
34
+ }
35
+ }
36
+ ],
37
+ "linkId": "dateTime"
38
+ },
39
+ {
40
+ "text": "PatientId",
41
+ "type": "string",
42
+ "extension": [
43
+ {
44
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
45
+ "valueBoolean": true
46
+ },
47
+ {
48
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
49
+ "valueExpression": {
50
+ "language": "text/fhirpath",
51
+ "expression": "%Patient.id"
52
+ }
53
+ }
54
+ ],
55
+ "linkId": "patientId"
56
+ },
57
+ {
58
+ "text": "PatientName",
59
+ "type": "string",
60
+ "extension": [
61
+ {
62
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
63
+ "valueBoolean": true
64
+ },
65
+ {
66
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
67
+ "valueExpression": {
68
+ "language": "text/fhirpath",
69
+ "expression": "%Patient.name.given[0] + ' ' + %Patient.name.family"
70
+ }
71
+ }
72
+ ],
73
+ "linkId": "patientName"
74
+ },
75
+ {
76
+ "text": "Type",
77
+ "type": "choice",
78
+ "linkId": "type",
79
+ "required": true,
80
+ "answerOption": [
81
+ {
82
+ "valueCoding": {
83
+ "code": "418634005",
84
+ "system": "http://hl7.org/fhir/allergy-intolerance-category",
85
+ "display": "Drug"
86
+ }
87
+ },
88
+ {
89
+ "valueCoding": {
90
+ "code": "414285001",
91
+ "system": "http://hl7.org/fhir/allergy-intolerance-category",
92
+ "display": "Food"
93
+ }
94
+ },
95
+ {
96
+ "valueCoding": {
97
+ "code": "426232007",
98
+ "system": "http://hl7.org/fhir/allergy-intolerance-category",
99
+ "display": "Environmental"
100
+ }
101
+ }
102
+ ],
103
+ "extension": [
104
+ {
105
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
106
+ "valueCodeableConcept": {
107
+ "coding": [
108
+ {
109
+ "code": "inline-choice"
110
+ }
111
+ ]
112
+ }
113
+ }
114
+ ]
115
+ },
116
+ {
117
+ "text": "Reaction",
118
+ "type": "choice",
119
+ "linkId": "reaction",
120
+ "repeats": true,
121
+ "answerOption": [
122
+ {
123
+ "valueCoding": {
124
+ "code": "39579001",
125
+ "system": "http://snomed.ct",
126
+ "display": "Anaphylaxis"
127
+ }
128
+ },
129
+ {
130
+ "valueCoding": {
131
+ "code": "25064002",
132
+ "system": "http://snomed.ct",
133
+ "display": "Headache"
134
+ }
135
+ },
136
+ {
137
+ "valueCoding": {
138
+ "code": "247472004",
139
+ "system": "http://snomed.ct",
140
+ "display": "Hives (Wheal)"
141
+ }
142
+ },
143
+ {
144
+ "valueCoding": {
145
+ "code": "422587007",
146
+ "system": "http://snomed.ct",
147
+ "display": "Nausea"
148
+ }
149
+ },
150
+ {
151
+ "valueCoding": {
152
+ "code": "422400008",
153
+ "system": "http://snomed.ct",
154
+ "display": "Vomiting"
155
+ }
156
+ }
157
+ ],
158
+ "extension": [
159
+ {
160
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
161
+ "valueCodeableConcept": {
162
+ "coding": [
163
+ {
164
+ "code": "inline-choice"
165
+ }
166
+ ]
167
+ }
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "text": "Substance",
173
+ "type": "choice",
174
+ "linkId": "substance-drug",
175
+ "enableWhen": [
176
+ {
177
+ "question": "type",
178
+ "operator": "=",
179
+ "answerCoding": {
180
+ "code": "418634005",
181
+ "system": "http://snomed.ct"
182
+ }
183
+ }
184
+ ],
185
+ "answerOption": [
186
+ {
187
+ "valueCoding": {
188
+ "code": "LA26702-3",
189
+ "system": "http://loinc.org",
190
+ "display": "Aspirin"
191
+ }
192
+ },
193
+ {
194
+ "valueCoding": {
195
+ "code": "LA30119-4",
196
+ "system": "http://loinc.org",
197
+ "display": "Iodine"
198
+ }
199
+ },
200
+ {
201
+ "valueCoding": {
202
+ "code": "LA14348-9",
203
+ "system": "http://loinc.org",
204
+ "display": "Naproxen, ketoprofen or other non-steroidal"
205
+ }
206
+ },
207
+ {
208
+ "valueCoding": {
209
+ "code": "LA28487-9",
210
+ "system": "http://loinc.org",
211
+ "display": "Penicillin"
212
+ }
213
+ },
214
+ {
215
+ "valueCoding": {
216
+ "code": "LA30118-6",
217
+ "system": "http://loinc.org",
218
+ "display": "Sulfa drugs"
219
+ }
220
+ }
221
+ ],
222
+ "extension": [
223
+ {
224
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
225
+ "valueCodeableConcept": {
226
+ "coding": [
227
+ {
228
+ "code": "inline-choice"
229
+ }
230
+ ]
231
+ }
232
+ }
233
+ ]
234
+ },
235
+ {
236
+ "text": "Substance",
237
+ "type": "choice",
238
+ "linkId": "substance-food",
239
+ "enableWhen": [
240
+ {
241
+ "question": "type",
242
+ "operator": "=",
243
+ "answerCoding": {
244
+ "code": "414285001",
245
+ "system": "http://snomed.ct"
246
+ }
247
+ }
248
+ ],
249
+ "answerOption": [
250
+ {
251
+ "valueCoding": {
252
+ "code": "102259006",
253
+ "system": "http://snomed.ct",
254
+ "display": "Citrus fruit"
255
+ }
256
+ },
257
+ {
258
+ "valueCoding": {
259
+ "code": "102260001",
260
+ "system": "http://snomed.ct",
261
+ "display": "Peanut butter"
262
+ }
263
+ },
264
+ {
265
+ "valueCoding": {
266
+ "code": "102261002",
267
+ "system": "http://snomed.ct",
268
+ "display": "Strawberry"
269
+ }
270
+ },
271
+ {
272
+ "valueCoding": {
273
+ "code": "102262009",
274
+ "system": "http://snomed.ct",
275
+ "display": "Chocolate"
276
+ }
277
+ },
278
+ {
279
+ "valueCoding": {
280
+ "code": "102263004",
281
+ "system": "http://snomed.ct",
282
+ "display": "Eggs"
283
+ }
284
+ },
285
+ {
286
+ "valueCoding": {
287
+ "code": "102264005",
288
+ "system": "http://snomed.ct",
289
+ "display": "Cheese"
290
+ }
291
+ }
292
+ ],
293
+ "extension": [
294
+ {
295
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
296
+ "valueCodeableConcept": {
297
+ "coding": [
298
+ {
299
+ "code": "inline-choice"
300
+ }
301
+ ]
302
+ }
303
+ }
304
+ ]
305
+ },
306
+ {
307
+ "text": "Substance",
308
+ "type": "choice",
309
+ "linkId": "substance-environmental",
310
+ "enableWhen": [
311
+ {
312
+ "question": "type",
313
+ "operator": "=",
314
+ "answerCoding": {
315
+ "code": "426232007",
316
+ "system": "http://snomed.ct"
317
+ }
318
+ }
319
+ ],
320
+ "answerOption": [
321
+ {
322
+ "valueCoding": {
323
+ "code": "111088007",
324
+ "system": "http://snomed.ct",
325
+ "display": "Latex"
326
+ }
327
+ },
328
+ {
329
+ "valueCoding": {
330
+ "code": "256259004",
331
+ "system": "http://snomed.ct",
332
+ "display": "Pollen"
333
+ }
334
+ },
335
+ {
336
+ "valueCoding": {
337
+ "code": "256277009",
338
+ "system": "http://snomed.ct",
339
+ "display": "Grass pollen"
340
+ }
341
+ },
342
+ {
343
+ "valueCoding": {
344
+ "code": "256417003",
345
+ "system": "http://snomed.ct",
346
+ "display": "Horse dander"
347
+ }
348
+ }
349
+ ],
350
+ "extension": [
351
+ {
352
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
353
+ "valueCodeableConcept": {
354
+ "coding": [
355
+ {
356
+ "code": "inline-choice"
357
+ }
358
+ ]
359
+ }
360
+ }
361
+ ]
362
+ },
363
+ {
364
+ "text": "Notes",
365
+ "type": "string",
366
+ "linkId": "notes"
367
+ },
368
+ {
369
+ "text": "Active",
370
+ "type": "string",
371
+ "initial": [
372
+ {
373
+ "valueCoding": {
374
+ "code": "active",
375
+ "system": "http://terminology.hl7.org/ValueSet/allergyintolerance-clinical",
376
+ "display": "Active"
377
+ }
378
+ }
379
+ ],
380
+ "linkId": "status",
381
+ "extension": [
382
+ {
383
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
384
+ "valueBoolean": true
385
+ }
386
+ ]
387
+ }
388
+ ],
389
+ "resourceType": "Questionnaire",
390
+ "extension": [
391
+ {
392
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
393
+ "extension": [
394
+ {
395
+ "url": "name",
396
+ "valueCoding": {
397
+ "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
398
+ "code": "LaunchPatient"
399
+ }
400
+ },
401
+ {
402
+ "url": "type",
403
+ "valueCode": "Patient"
404
+ }
405
+ ]
406
+ },
407
+ {
408
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
409
+ "extension": [
410
+ {
411
+ "url": "name",
412
+ "valueCoding": {
413
+ "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
414
+ "code": "Author"
415
+ }
416
+ },
417
+ {
418
+ "url": "type",
419
+ "valueCode": "Resource"
420
+ }
421
+ ]
422
+ },
423
+ {
424
+ "url": "http://beda.software/fhir-extensions/questionnaire-mapper",
425
+ "valueReference": {
426
+ "reference": "Mapping/allergy-extract"
427
+ }
428
+ }
429
+ ],
430
+ "status": "active",
431
+ "id": "allergies",
432
+ "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/allergies"
433
+ }