sdc-qrf 0.3.17 → 0.3.18

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 (60) hide show
  1. package/dist/converter/fceToFhir/questionnaire/processExtensions.d.ts.map +1 -1
  2. package/dist/converter/fceToFhir/questionnaire/processExtensions.js +7 -1
  3. package/dist/converter/fceToFhir/questionnaire/processExtensions.js.map +1 -1
  4. package/dist/converter/fhirToFce/questionnaire/processExtensions.d.ts +1 -0
  5. package/dist/converter/fhirToFce/questionnaire/processExtensions.d.ts.map +1 -1
  6. package/dist/converter/fhirToFce/questionnaire/processExtensions.js +12 -6
  7. package/dist/converter/fhirToFce/questionnaire/processExtensions.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/converter/__tests__/resources/questionnaire_fce/allergies.json +1 -0
  10. package/src/converter/__tests__/resources/questionnaire_fce/beverages.json +67 -66
  11. package/src/converter/__tests__/resources/questionnaire_fce/choice_answer_option.json +49 -48
  12. package/src/converter/__tests__/resources/questionnaire_fce/consent.json +1 -0
  13. package/src/converter/__tests__/resources/questionnaire_fce/constraint.json +2 -2
  14. package/src/converter/__tests__/resources/questionnaire_fce/cqf-examples.json +59 -63
  15. package/src/converter/__tests__/resources/questionnaire_fce/enable_when.json +1 -0
  16. package/src/converter/__tests__/resources/questionnaire_fce/encounter_create.json +1 -0
  17. package/src/converter/__tests__/resources/questionnaire_fce/gad_7.json +6 -14
  18. package/src/converter/__tests__/resources/questionnaire_fce/immunization.json +6 -14
  19. package/src/converter/__tests__/resources/questionnaire_fce/medication.json +165 -164
  20. package/src/converter/__tests__/resources/questionnaire_fce/multiple_type_launch_context.json +5 -12
  21. package/src/converter/__tests__/resources/questionnaire_fce/patient_create.json +78 -77
  22. package/src/converter/__tests__/resources/questionnaire_fce/patient_edit.json +1 -0
  23. package/src/converter/__tests__/resources/questionnaire_fce/phq_2_phq_9.json +1 -0
  24. package/src/converter/__tests__/resources/questionnaire_fce/physicalexam.json +381 -380
  25. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_create.json +79 -78
  26. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_create_structure_map.json +1 -0
  27. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_edit.json +127 -126
  28. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_role_create.json +35 -34
  29. package/src/converter/__tests__/resources/questionnaire_fce/public_appointment.json +3 -4
  30. package/src/converter/__tests__/resources/questionnaire_fce/review_of_systems.json +384 -383
  31. package/src/converter/__tests__/resources/questionnaire_fce/source_queries.json +31 -30
  32. package/src/converter/__tests__/resources/questionnaire_fce/unit-option.json +1 -0
  33. package/src/converter/__tests__/resources/questionnaire_fce/vitals.json +1 -0
  34. package/src/converter/__tests__/resources/questionnaire_fhir/allergies.json +7 -8
  35. package/src/converter/__tests__/resources/questionnaire_fhir/beverages.json +96 -90
  36. package/src/converter/__tests__/resources/questionnaire_fhir/choice_answer_option.json +49 -43
  37. package/src/converter/__tests__/resources/questionnaire_fhir/consent.json +4 -0
  38. package/src/converter/__tests__/resources/questionnaire_fhir/constraint.json +6 -0
  39. package/src/converter/__tests__/resources/questionnaire_fhir/cqf-examples.json +87 -86
  40. package/src/converter/__tests__/resources/questionnaire_fhir/enable_when.json +6 -0
  41. package/src/converter/__tests__/resources/questionnaire_fhir/encounter_create.json +4 -0
  42. package/src/converter/__tests__/resources/questionnaire_fhir/gad_7.json +7 -8
  43. package/src/converter/__tests__/resources/questionnaire_fhir/immunization.json +7 -8
  44. package/src/converter/__tests__/resources/questionnaire_fhir/medication.json +203 -199
  45. package/src/converter/__tests__/resources/questionnaire_fhir/multiple_type_launch_context.json +387 -383
  46. package/src/converter/__tests__/resources/questionnaire_fhir/patient_create.json +92 -88
  47. package/src/converter/__tests__/resources/questionnaire_fhir/patient_edit.json +6 -4
  48. package/src/converter/__tests__/resources/questionnaire_fhir/phq_2_phq_9.json +565 -561
  49. package/src/converter/__tests__/resources/questionnaire_fhir/physicalexam.json +540 -536
  50. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_create.json +78 -74
  51. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_create_structure_map.json +4 -0
  52. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_edit.json +176 -172
  53. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_role_create.json +45 -41
  54. package/src/converter/__tests__/resources/questionnaire_fhir/public_appointment.json +6 -4
  55. package/src/converter/__tests__/resources/questionnaire_fhir/review_of_systems.json +364 -358
  56. package/src/converter/__tests__/resources/questionnaire_fhir/source_queries.json +37 -33
  57. package/src/converter/__tests__/resources/questionnaire_fhir/unit-option.json +6 -0
  58. package/src/converter/__tests__/resources/questionnaire_fhir/vitals.json +4 -0
  59. package/src/converter/fceToFhir/questionnaire/processExtensions.ts +8 -1
  60. package/src/converter/fhirToFce/questionnaire/processExtensions.ts +21 -15
@@ -1,580 +1,584 @@
1
1
  {
2
- "subjectType": ["Encounter", "Patient"],
3
- "meta": {
4
- "profile": ["https://beda.software/beda-emr-questionnaire"],
5
- "lastUpdated": "2023-04-10T03:43:34.792167Z",
6
- "versionId": "694",
7
- "extension": [
8
- {
9
- "url": "ex:createdAt",
10
- "valueInstant": "2023-04-05T05:22:35.752466Z"
11
- }
12
- ]
13
- },
14
- "name": "PHQ-2/PHQ-9 Depression Screening",
15
- "item": [
16
- {
17
- "text": "DateTime",
18
- "type": "dateTime",
19
- "extension": [
20
- {
21
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
22
- "valueBoolean": true
23
- },
24
- {
25
- "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
26
- "valueExpression": {
27
- "language": "text/fhirpath",
28
- "expression": "now()"
29
- }
30
- }
31
- ],
32
- "linkId": "dateTime"
33
- },
34
- {
35
- "text": "PatientId",
36
- "type": "string",
37
- "extension": [
38
- {
39
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
40
- "valueBoolean": true
41
- },
42
- {
43
- "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
44
- "valueExpression": {
45
- "language": "text/fhirpath",
46
- "expression": "%Patient.id"
47
- }
48
- }
49
- ],
50
- "linkId": "patientId"
51
- },
52
- {
53
- "text": "PatientName",
54
- "type": "string",
55
- "extension": [
56
- {
57
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
58
- "valueBoolean": true
59
- },
60
- {
61
- "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
62
- "valueExpression": {
63
- "language": "text/fhirpath",
64
- "expression": "%Patient.name.given[0] + ' ' + %Patient.name.family"
65
- }
66
- }
67
- ],
68
- "linkId": "patientName"
69
- },
70
- {
71
- "item": [
72
- {
73
- "text": "Little interest or pleasure in doing things",
74
- "type": "choice",
75
- "linkId": "44250-9",
76
- "required": true,
77
- "answerOption": [
78
- {
79
- "valueCoding": {
80
- "code": "LA6568-5",
81
- "system": "http://loinc.org",
82
- "display": "Not at all"
83
- }
84
- },
85
- {
86
- "valueCoding": {
87
- "code": "LA6569-3",
88
- "system": "http://loinc.org",
89
- "display": "Several days"
90
- }
91
- },
92
- {
93
- "valueCoding": {
94
- "code": "LA6570-1",
95
- "system": "http://loinc.org",
96
- "display": "More than half the days"
97
- }
98
- },
99
- {
100
- "valueCoding": {
101
- "code": "LA6571-9",
102
- "system": "http://loinc.org",
103
- "display": "Nearly every day"
104
- }
105
- }
106
- ],
107
- "extension": [
108
- {
109
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
110
- "valueCodeableConcept": {
111
- "coding": [
112
- {
113
- "code": "inline-choice"
114
- }
115
- ]
116
- }
2
+ "subjectType": ["Encounter", "Patient"],
3
+ "meta": {
4
+ "profile": ["https://beda.software/beda-emr-questionnaire"],
5
+ "lastUpdated": "2023-04-10T03:43:34.792167Z",
6
+ "versionId": "694",
7
+ "extension": [
8
+ {
9
+ "url": "ex:createdAt",
10
+ "valueInstant": "2023-04-05T05:22:35.752466Z"
117
11
  }
118
- ]
119
- },
120
- {
121
- "text": "Feeling down, depressed, or hopeless",
122
- "type": "choice",
123
- "linkId": "44255-8",
124
- "required": true,
125
- "answerOption": [
126
- {
127
- "valueCoding": {
128
- "code": "LA6568-5",
129
- "system": "http://loinc.org",
130
- "display": "Not at all"
131
- }
132
- },
133
- {
134
- "valueCoding": {
135
- "code": "LA6569-3",
136
- "system": "http://loinc.org",
137
- "display": "Several days"
138
- }
139
- },
140
- {
141
- "valueCoding": {
142
- "code": "LA6570-1",
143
- "system": "http://loinc.org",
144
- "display": "More than half the days"
145
- }
146
- },
147
- {
148
- "valueCoding": {
149
- "code": "LA6571-9",
150
- "system": "http://loinc.org",
151
- "display": "Nearly every day"
152
- }
153
- }
154
- ],
155
- "extension": [
156
- {
157
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
158
- "valueCodeableConcept": {
159
- "coding": [
160
- {
161
- "code": "inline-choice"
162
- }
163
- ]
164
- }
165
- }
166
- ]
167
- },
168
- {
169
- "text": "Trouble falling or staying asleep, or sleeping too much",
170
- "type": "choice",
171
- "linkId": "44259-0",
172
- "required": true,
173
- "answerOption": [
174
- {
175
- "valueCoding": {
176
- "code": "LA6568-5",
177
- "system": "http://loinc.org",
178
- "display": "Not at all"
179
- }
180
- },
181
- {
182
- "valueCoding": {
183
- "code": "LA6569-3",
184
- "system": "http://loinc.org",
185
- "display": "Several days"
186
- }
187
- },
188
- {
189
- "valueCoding": {
190
- "code": "LA6570-1",
191
- "system": "http://loinc.org",
192
- "display": "More than half the days"
193
- }
194
- },
195
- {
196
- "valueCoding": {
197
- "code": "LA6571-9",
198
- "system": "http://loinc.org",
199
- "display": "Nearly every day"
200
- }
201
- }
202
- ],
203
- "extension": [
204
- {
205
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
206
- "valueCodeableConcept": {
207
- "coding": [
208
- {
209
- "code": "inline-choice"
210
- }
211
- ]
212
- }
213
- }
214
- ]
215
- },
12
+ ]
13
+ },
14
+ "name": "PHQ-2/PHQ-9 Depression Screening",
15
+ "item": [
216
16
  {
217
- "text": "Feeling tired or having little energy",
218
- "type": "choice",
219
- "linkId": "44254-1",
220
- "required": true,
221
- "answerOption": [
222
- {
223
- "valueCoding": {
224
- "code": "LA6568-5",
225
- "system": "http://loinc.org",
226
- "display": "Not at all"
227
- }
228
- },
229
- {
230
- "valueCoding": {
231
- "code": "LA6569-3",
232
- "system": "http://loinc.org",
233
- "display": "Several days"
234
- }
235
- },
236
- {
237
- "valueCoding": {
238
- "code": "LA6570-1",
239
- "system": "http://loinc.org",
240
- "display": "More than half the days"
241
- }
242
- },
243
- {
244
- "valueCoding": {
245
- "code": "LA6571-9",
246
- "system": "http://loinc.org",
247
- "display": "Nearly every day"
248
- }
249
- }
250
- ],
251
- "extension": [
252
- {
253
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
254
- "valueCodeableConcept": {
255
- "coding": [
256
- {
257
- "code": "inline-choice"
258
- }
259
- ]
260
- }
261
- }
262
- ]
17
+ "text": "DateTime",
18
+ "type": "dateTime",
19
+ "extension": [
20
+ {
21
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
22
+ "valueBoolean": true
23
+ },
24
+ {
25
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
26
+ "valueExpression": {
27
+ "language": "text/fhirpath",
28
+ "expression": "now()"
29
+ }
30
+ }
31
+ ],
32
+ "linkId": "dateTime"
263
33
  },
264
34
  {
265
- "text": "Poor appetite or overeating",
266
- "type": "choice",
267
- "linkId": "44251-7",
268
- "required": true,
269
- "answerOption": [
270
- {
271
- "valueCoding": {
272
- "code": "LA6568-5",
273
- "system": "http://loinc.org",
274
- "display": "Not at all"
275
- }
276
- },
277
- {
278
- "valueCoding": {
279
- "code": "LA6569-3",
280
- "system": "http://loinc.org",
281
- "display": "Several days"
282
- }
283
- },
284
- {
285
- "valueCoding": {
286
- "code": "LA6570-1",
287
- "system": "http://loinc.org",
288
- "display": "More than half the days"
289
- }
290
- },
291
- {
292
- "valueCoding": {
293
- "code": "LA6571-9",
294
- "system": "http://loinc.org",
295
- "display": "Nearly every day"
296
- }
297
- }
298
- ],
299
- "extension": [
300
- {
301
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
302
- "valueCodeableConcept": {
303
- "coding": [
304
- {
305
- "code": "inline-choice"
306
- }
307
- ]
308
- }
309
- }
310
- ]
35
+ "text": "PatientId",
36
+ "type": "string",
37
+ "extension": [
38
+ {
39
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
40
+ "valueBoolean": true
41
+ },
42
+ {
43
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
44
+ "valueExpression": {
45
+ "language": "text/fhirpath",
46
+ "expression": "%Patient.id"
47
+ }
48
+ }
49
+ ],
50
+ "linkId": "patientId"
311
51
  },
312
52
  {
313
- "text": "Feeling bad about yourself-or that you are a failure or have let yourself or your family down",
314
- "type": "choice",
315
- "linkId": "44258-2",
316
- "required": true,
317
- "answerOption": [
318
- {
319
- "valueCoding": {
320
- "code": "LA6568-5",
321
- "system": "http://loinc.org",
322
- "display": "Not at all"
323
- }
324
- },
325
- {
326
- "valueCoding": {
327
- "code": "LA6569-3",
328
- "system": "http://loinc.org",
329
- "display": "Several days"
330
- }
331
- },
332
- {
333
- "valueCoding": {
334
- "code": "LA6570-1",
335
- "system": "http://loinc.org",
336
- "display": "More than half the days"
337
- }
338
- },
339
- {
340
- "valueCoding": {
341
- "code": "LA6571-9",
342
- "system": "http://loinc.org",
343
- "display": "Nearly every day"
344
- }
345
- }
346
- ],
347
- "extension": [
348
- {
349
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
350
- "valueCodeableConcept": {
351
- "coding": [
352
- {
353
- "code": "inline-choice"
354
- }
355
- ]
356
- }
357
- }
358
- ]
53
+ "text": "PatientName",
54
+ "type": "string",
55
+ "extension": [
56
+ {
57
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
58
+ "valueBoolean": true
59
+ },
60
+ {
61
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
62
+ "valueExpression": {
63
+ "language": "text/fhirpath",
64
+ "expression": "%Patient.name.given[0] + ' ' + %Patient.name.family"
65
+ }
66
+ }
67
+ ],
68
+ "linkId": "patientName"
359
69
  },
360
70
  {
361
- "text": "Trouble concentrating on things, such as reading the newspaper or watching television",
362
- "type": "choice",
363
- "linkId": "44252-5",
364
- "required": true,
365
- "answerOption": [
366
- {
367
- "valueCoding": {
368
- "code": "LA6568-5",
369
- "system": "http://loinc.org",
370
- "display": "Not at all"
371
- }
372
- },
373
- {
374
- "valueCoding": {
375
- "code": "LA6569-3",
376
- "system": "http://loinc.org",
377
- "display": "Several days"
378
- }
379
- },
380
- {
381
- "valueCoding": {
382
- "code": "LA6570-1",
383
- "system": "http://loinc.org",
384
- "display": "More than half the days"
385
- }
386
- },
387
- {
388
- "valueCoding": {
389
- "code": "LA6571-9",
390
- "system": "http://loinc.org",
391
- "display": "Nearly every day"
392
- }
393
- }
394
- ],
395
- "extension": [
396
- {
397
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
398
- "valueCodeableConcept": {
399
- "coding": [
400
- {
401
- "code": "inline-choice"
402
- }
403
- ]
404
- }
405
- }
406
- ]
407
- },
71
+ "item": [
72
+ {
73
+ "text": "Little interest or pleasure in doing things",
74
+ "type": "choice",
75
+ "linkId": "44250-9",
76
+ "required": true,
77
+ "answerOption": [
78
+ {
79
+ "valueCoding": {
80
+ "code": "LA6568-5",
81
+ "system": "http://loinc.org",
82
+ "display": "Not at all"
83
+ }
84
+ },
85
+ {
86
+ "valueCoding": {
87
+ "code": "LA6569-3",
88
+ "system": "http://loinc.org",
89
+ "display": "Several days"
90
+ }
91
+ },
92
+ {
93
+ "valueCoding": {
94
+ "code": "LA6570-1",
95
+ "system": "http://loinc.org",
96
+ "display": "More than half the days"
97
+ }
98
+ },
99
+ {
100
+ "valueCoding": {
101
+ "code": "LA6571-9",
102
+ "system": "http://loinc.org",
103
+ "display": "Nearly every day"
104
+ }
105
+ }
106
+ ],
107
+ "extension": [
108
+ {
109
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
110
+ "valueCodeableConcept": {
111
+ "coding": [
112
+ {
113
+ "code": "inline-choice"
114
+ }
115
+ ]
116
+ }
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "text": "Feeling down, depressed, or hopeless",
122
+ "type": "choice",
123
+ "linkId": "44255-8",
124
+ "required": true,
125
+ "answerOption": [
126
+ {
127
+ "valueCoding": {
128
+ "code": "LA6568-5",
129
+ "system": "http://loinc.org",
130
+ "display": "Not at all"
131
+ }
132
+ },
133
+ {
134
+ "valueCoding": {
135
+ "code": "LA6569-3",
136
+ "system": "http://loinc.org",
137
+ "display": "Several days"
138
+ }
139
+ },
140
+ {
141
+ "valueCoding": {
142
+ "code": "LA6570-1",
143
+ "system": "http://loinc.org",
144
+ "display": "More than half the days"
145
+ }
146
+ },
147
+ {
148
+ "valueCoding": {
149
+ "code": "LA6571-9",
150
+ "system": "http://loinc.org",
151
+ "display": "Nearly every day"
152
+ }
153
+ }
154
+ ],
155
+ "extension": [
156
+ {
157
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
158
+ "valueCodeableConcept": {
159
+ "coding": [
160
+ {
161
+ "code": "inline-choice"
162
+ }
163
+ ]
164
+ }
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "text": "Trouble falling or staying asleep, or sleeping too much",
170
+ "type": "choice",
171
+ "linkId": "44259-0",
172
+ "required": true,
173
+ "answerOption": [
174
+ {
175
+ "valueCoding": {
176
+ "code": "LA6568-5",
177
+ "system": "http://loinc.org",
178
+ "display": "Not at all"
179
+ }
180
+ },
181
+ {
182
+ "valueCoding": {
183
+ "code": "LA6569-3",
184
+ "system": "http://loinc.org",
185
+ "display": "Several days"
186
+ }
187
+ },
188
+ {
189
+ "valueCoding": {
190
+ "code": "LA6570-1",
191
+ "system": "http://loinc.org",
192
+ "display": "More than half the days"
193
+ }
194
+ },
195
+ {
196
+ "valueCoding": {
197
+ "code": "LA6571-9",
198
+ "system": "http://loinc.org",
199
+ "display": "Nearly every day"
200
+ }
201
+ }
202
+ ],
203
+ "extension": [
204
+ {
205
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
206
+ "valueCodeableConcept": {
207
+ "coding": [
208
+ {
209
+ "code": "inline-choice"
210
+ }
211
+ ]
212
+ }
213
+ }
214
+ ]
215
+ },
216
+ {
217
+ "text": "Feeling tired or having little energy",
218
+ "type": "choice",
219
+ "linkId": "44254-1",
220
+ "required": true,
221
+ "answerOption": [
222
+ {
223
+ "valueCoding": {
224
+ "code": "LA6568-5",
225
+ "system": "http://loinc.org",
226
+ "display": "Not at all"
227
+ }
228
+ },
229
+ {
230
+ "valueCoding": {
231
+ "code": "LA6569-3",
232
+ "system": "http://loinc.org",
233
+ "display": "Several days"
234
+ }
235
+ },
236
+ {
237
+ "valueCoding": {
238
+ "code": "LA6570-1",
239
+ "system": "http://loinc.org",
240
+ "display": "More than half the days"
241
+ }
242
+ },
243
+ {
244
+ "valueCoding": {
245
+ "code": "LA6571-9",
246
+ "system": "http://loinc.org",
247
+ "display": "Nearly every day"
248
+ }
249
+ }
250
+ ],
251
+ "extension": [
252
+ {
253
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
254
+ "valueCodeableConcept": {
255
+ "coding": [
256
+ {
257
+ "code": "inline-choice"
258
+ }
259
+ ]
260
+ }
261
+ }
262
+ ]
263
+ },
264
+ {
265
+ "text": "Poor appetite or overeating",
266
+ "type": "choice",
267
+ "linkId": "44251-7",
268
+ "required": true,
269
+ "answerOption": [
270
+ {
271
+ "valueCoding": {
272
+ "code": "LA6568-5",
273
+ "system": "http://loinc.org",
274
+ "display": "Not at all"
275
+ }
276
+ },
277
+ {
278
+ "valueCoding": {
279
+ "code": "LA6569-3",
280
+ "system": "http://loinc.org",
281
+ "display": "Several days"
282
+ }
283
+ },
284
+ {
285
+ "valueCoding": {
286
+ "code": "LA6570-1",
287
+ "system": "http://loinc.org",
288
+ "display": "More than half the days"
289
+ }
290
+ },
291
+ {
292
+ "valueCoding": {
293
+ "code": "LA6571-9",
294
+ "system": "http://loinc.org",
295
+ "display": "Nearly every day"
296
+ }
297
+ }
298
+ ],
299
+ "extension": [
300
+ {
301
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
302
+ "valueCodeableConcept": {
303
+ "coding": [
304
+ {
305
+ "code": "inline-choice"
306
+ }
307
+ ]
308
+ }
309
+ }
310
+ ]
311
+ },
312
+ {
313
+ "text": "Feeling bad about yourself-or that you are a failure or have let yourself or your family down",
314
+ "type": "choice",
315
+ "linkId": "44258-2",
316
+ "required": true,
317
+ "answerOption": [
318
+ {
319
+ "valueCoding": {
320
+ "code": "LA6568-5",
321
+ "system": "http://loinc.org",
322
+ "display": "Not at all"
323
+ }
324
+ },
325
+ {
326
+ "valueCoding": {
327
+ "code": "LA6569-3",
328
+ "system": "http://loinc.org",
329
+ "display": "Several days"
330
+ }
331
+ },
332
+ {
333
+ "valueCoding": {
334
+ "code": "LA6570-1",
335
+ "system": "http://loinc.org",
336
+ "display": "More than half the days"
337
+ }
338
+ },
339
+ {
340
+ "valueCoding": {
341
+ "code": "LA6571-9",
342
+ "system": "http://loinc.org",
343
+ "display": "Nearly every day"
344
+ }
345
+ }
346
+ ],
347
+ "extension": [
348
+ {
349
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
350
+ "valueCodeableConcept": {
351
+ "coding": [
352
+ {
353
+ "code": "inline-choice"
354
+ }
355
+ ]
356
+ }
357
+ }
358
+ ]
359
+ },
360
+ {
361
+ "text": "Trouble concentrating on things, such as reading the newspaper or watching television",
362
+ "type": "choice",
363
+ "linkId": "44252-5",
364
+ "required": true,
365
+ "answerOption": [
366
+ {
367
+ "valueCoding": {
368
+ "code": "LA6568-5",
369
+ "system": "http://loinc.org",
370
+ "display": "Not at all"
371
+ }
372
+ },
373
+ {
374
+ "valueCoding": {
375
+ "code": "LA6569-3",
376
+ "system": "http://loinc.org",
377
+ "display": "Several days"
378
+ }
379
+ },
380
+ {
381
+ "valueCoding": {
382
+ "code": "LA6570-1",
383
+ "system": "http://loinc.org",
384
+ "display": "More than half the days"
385
+ }
386
+ },
387
+ {
388
+ "valueCoding": {
389
+ "code": "LA6571-9",
390
+ "system": "http://loinc.org",
391
+ "display": "Nearly every day"
392
+ }
393
+ }
394
+ ],
395
+ "extension": [
396
+ {
397
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
398
+ "valueCodeableConcept": {
399
+ "coding": [
400
+ {
401
+ "code": "inline-choice"
402
+ }
403
+ ]
404
+ }
405
+ }
406
+ ]
407
+ },
408
+ {
409
+ "text": "Moving or speaking so slowly that other people could have noticed. Or the opposite-being so fidgety or restless that you have been moving around a lot more than usual",
410
+ "type": "choice",
411
+ "linkId": "44253-3",
412
+ "required": true,
413
+ "answerOption": [
414
+ {
415
+ "valueCoding": {
416
+ "code": "LA6568-5",
417
+ "system": "http://loinc.org",
418
+ "display": "Not at all"
419
+ }
420
+ },
421
+ {
422
+ "valueCoding": {
423
+ "code": "LA6569-3",
424
+ "system": "http://loinc.org",
425
+ "display": "Several days"
426
+ }
427
+ },
428
+ {
429
+ "valueCoding": {
430
+ "code": "LA6570-1",
431
+ "system": "http://loinc.org",
432
+ "display": "More than half the days"
433
+ }
434
+ },
435
+ {
436
+ "valueCoding": {
437
+ "code": "LA6571-9",
438
+ "system": "http://loinc.org",
439
+ "display": "Nearly every day"
440
+ }
441
+ }
442
+ ],
443
+ "extension": [
444
+ {
445
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
446
+ "valueCodeableConcept": {
447
+ "coding": [
448
+ {
449
+ "code": "inline-choice"
450
+ }
451
+ ]
452
+ }
453
+ }
454
+ ]
455
+ },
456
+ {
457
+ "text": "Thoughts that you would be better off dead, or of hurting yourself in some way",
458
+ "type": "choice",
459
+ "linkId": "44260-8",
460
+ "required": true,
461
+ "answerOption": [
462
+ {
463
+ "valueCoding": {
464
+ "code": "LA6568-5",
465
+ "system": "http://loinc.org",
466
+ "display": "Not at all"
467
+ }
468
+ },
469
+ {
470
+ "valueCoding": {
471
+ "code": "LA6569-3",
472
+ "system": "http://loinc.org",
473
+ "display": "Several days"
474
+ }
475
+ },
476
+ {
477
+ "valueCoding": {
478
+ "code": "LA6570-1",
479
+ "system": "http://loinc.org",
480
+ "display": "More than half the days"
481
+ }
482
+ },
483
+ {
484
+ "valueCoding": {
485
+ "code": "LA6571-9",
486
+ "system": "http://loinc.org",
487
+ "display": "Nearly every day"
488
+ }
489
+ }
490
+ ],
491
+ "extension": [
492
+ {
493
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
494
+ "valueCodeableConcept": {
495
+ "coding": [
496
+ {
497
+ "code": "inline-choice"
498
+ }
499
+ ]
500
+ }
501
+ }
502
+ ]
503
+ },
504
+ {
505
+ "text": "PHQ2/PHQ-9 Depression Severity Score",
506
+ "type": "integer",
507
+ "linkId": "phq9-total-score",
508
+ "readOnly": true,
509
+ "required": true,
510
+ "extension": [
511
+ {
512
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
513
+ "valueCodeableConcept": {
514
+ "coding": [
515
+ {
516
+ "code": "depression-score"
517
+ }
518
+ ]
519
+ }
520
+ },
521
+ {
522
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression",
523
+ "valueExpression": {
524
+ "language": "text/fhirpath",
525
+ "expression": "%QuestionnaireResponse.item.item.answer.children().children().where(code='LA6569-3').count() + %QuestionnaireResponse.item.item.answer.children().children().where(code='LA6570-1').count() * 2 + %QuestionnaireResponse.item.item.answer.children().children().where(code='LA6571-9').count() * 3"
526
+ }
527
+ }
528
+ ]
529
+ }
530
+ ],
531
+ "text": "Over the past 2 weeks, how often have you been bothered by:",
532
+ "type": "group",
533
+ "linkId": "phq2phq9"
534
+ }
535
+ ],
536
+ "resourceType": "Questionnaire",
537
+ "extension": [
408
538
  {
409
- "text": "Moving or speaking so slowly that other people could have noticed. Or the opposite-being so fidgety or restless that you have been moving around a lot more than usual",
410
- "type": "choice",
411
- "linkId": "44253-3",
412
- "required": true,
413
- "answerOption": [
414
- {
415
- "valueCoding": {
416
- "code": "LA6568-5",
417
- "system": "http://loinc.org",
418
- "display": "Not at all"
419
- }
420
- },
421
- {
422
- "valueCoding": {
423
- "code": "LA6569-3",
424
- "system": "http://loinc.org",
425
- "display": "Several days"
426
- }
427
- },
428
- {
429
- "valueCoding": {
430
- "code": "LA6570-1",
431
- "system": "http://loinc.org",
432
- "display": "More than half the days"
433
- }
434
- },
435
- {
436
- "valueCoding": {
437
- "code": "LA6571-9",
438
- "system": "http://loinc.org",
439
- "display": "Nearly every day"
440
- }
441
- }
442
- ],
443
- "extension": [
444
- {
445
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
446
- "valueCodeableConcept": {
447
- "coding": [
448
- {
449
- "code": "inline-choice"
450
- }
451
- ]
452
- }
453
- }
454
- ]
539
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
540
+ "extension": [
541
+ {
542
+ "url": "name",
543
+ "valueCoding": {
544
+ "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
545
+ "code": "Patient"
546
+ }
547
+ },
548
+ {
549
+ "url": "type",
550
+ "valueCode": "Patient"
551
+ }
552
+ ]
455
553
  },
456
554
  {
457
- "text": "Thoughts that you would be better off dead, or of hurting yourself in some way",
458
- "type": "choice",
459
- "linkId": "44260-8",
460
- "required": true,
461
- "answerOption": [
462
- {
463
- "valueCoding": {
464
- "code": "LA6568-5",
465
- "system": "http://loinc.org",
466
- "display": "Not at all"
467
- }
468
- },
469
- {
470
- "valueCoding": {
471
- "code": "LA6569-3",
472
- "system": "http://loinc.org",
473
- "display": "Several days"
474
- }
475
- },
476
- {
477
- "valueCoding": {
478
- "code": "LA6570-1",
479
- "system": "http://loinc.org",
480
- "display": "More than half the days"
481
- }
482
- },
483
- {
484
- "valueCoding": {
485
- "code": "LA6571-9",
486
- "system": "http://loinc.org",
487
- "display": "Nearly every day"
488
- }
489
- }
490
- ],
491
- "extension": [
492
- {
493
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
494
- "valueCodeableConcept": {
495
- "coding": [
496
- {
497
- "code": "inline-choice"
498
- }
499
- ]
500
- }
501
- }
502
- ]
555
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
556
+ "extension": [
557
+ {
558
+ "url": "name",
559
+ "valueCoding": {
560
+ "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
561
+ "code": "Author"
562
+ }
563
+ },
564
+ {
565
+ "url": "type",
566
+ "valueCode": "Resource"
567
+ }
568
+ ]
503
569
  },
504
570
  {
505
- "text": "PHQ2/PHQ-9 Depression Severity Score",
506
- "type": "integer",
507
- "linkId": "phq9-total-score",
508
- "readOnly": true,
509
- "required": true,
510
- "extension": [
511
- {
512
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
513
- "valueCodeableConcept": {
514
- "coding": [
515
- {
516
- "code": "depression-score"
517
- }
518
- ]
519
- }
520
- },
521
- {
522
- "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression",
523
- "valueExpression": {
524
- "language": "text/fhirpath",
525
- "expression": "%QuestionnaireResponse.item.item.answer.children().children().where(code='LA6569-3').count() + %QuestionnaireResponse.item.item.answer.children().children().where(code='LA6570-1').count() * 2 + %QuestionnaireResponse.item.item.answer.children().children().where(code='LA6571-9').count() * 3"
526
- }
571
+ "url": "http://beda.software/fhir-extensions/questionnaire-mapper",
572
+ "valueReference": {
573
+ "reference": "Mapping/phq2phq9-extract"
527
574
  }
528
- ]
529
- }
530
- ],
531
- "text": "Over the past 2 weeks, how often have you been bothered by:",
532
- "type": "group",
533
- "linkId": "phq2phq9"
534
- }
535
- ],
536
- "resourceType": "Questionnaire",
537
- "extension": [
538
- {
539
- "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
540
- "extension": [
541
- {
542
- "url": "name",
543
- "valueCoding": {
544
- "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
545
- "code": "Patient"
546
- }
547
575
  },
548
576
  {
549
- "url": "type",
550
- "valueCode": "Patient"
577
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom",
578
+ "valueCanonical": "phq2phq9"
551
579
  }
552
- ]
553
- },
554
- {
555
- "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
556
- "extension": [
557
- {
558
- "url": "name",
559
- "valueCoding": {
560
- "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
561
- "code": "Author"
562
- }
563
- },
564
- {
565
- "url": "type",
566
- "valueCode": "Resource"
567
- }
568
- ]
569
- },
570
- {
571
- "url": "http://beda.software/fhir-extensions/questionnaire-mapper",
572
- "valueReference": {
573
- "reference": "Mapping/phq2phq9-extract"
574
- }
575
- }
576
- ],
577
- "status": "active",
578
- "id": "phq2phq9",
579
- "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/phq2phq9"
580
+ ],
581
+ "status": "active",
582
+ "id": "phq2phq9",
583
+ "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/phq2phq9"
580
584
  }