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,12 +1,7 @@
1
1
  {
2
- "subjectType": [
3
- "Encounter",
4
- "Patient"
5
- ],
2
+ "subjectType": ["Encounter", "Patient"],
6
3
  "meta": {
7
- "profile": [
8
- "https://beda.software/beda-emr-questionnaire"
9
- ],
4
+ "profile": ["https://beda.software/beda-emr-questionnaire"],
10
5
  "lastUpdated": "2023-04-10T03:43:34.792167Z",
11
6
  "versionId": "694",
12
7
  "extension": [
@@ -481,9 +476,13 @@
481
476
  "valueReference": {
482
477
  "reference": "Mapping/gad-7-extract"
483
478
  }
479
+ },
480
+ {
481
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom",
482
+ "valueCanonical": "gad-7"
484
483
  }
485
484
  ],
486
485
  "status": "active",
487
486
  "id": "gad-7",
488
487
  "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/gad7"
489
- }
488
+ }
@@ -1,12 +1,7 @@
1
1
  {
2
- "subjectType": [
3
- "Encounter",
4
- "Patient"
5
- ],
2
+ "subjectType": ["Encounter", "Patient"],
6
3
  "meta": {
7
- "profile": [
8
- "https://beda.software/beda-emr-questionnaire"
9
- ],
4
+ "profile": ["https://beda.software/beda-emr-questionnaire"],
10
5
  "lastUpdated": "2023-04-10T03:43:34.792167Z",
11
6
  "versionId": "694",
12
7
  "extension": [
@@ -207,9 +202,13 @@
207
202
  "valueReference": {
208
203
  "reference": "Mapping/immunization-extract"
209
204
  }
205
+ },
206
+ {
207
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom",
208
+ "valueCanonical": "immunization"
210
209
  }
211
210
  ],
212
211
  "status": "active",
213
212
  "id": "immunization",
214
213
  "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/immunization"
215
- }
214
+ }
@@ -1,226 +1,230 @@
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": "Medication",
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": "EncounterId",
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": "%Encounter.id"
47
- }
48
- }
49
- ],
50
- "linkId": "encounterId"
51
- },
52
- {
53
- "text": "PatientId",
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.id"
65
- }
66
- }
67
- ],
68
- "linkId": "patientId",
69
- "required": true
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
+ ]
70
13
  },
71
- {
72
- "text": "PatientName",
73
- "type": "string",
74
- "extension": [
75
- {
76
- "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
77
- "valueBoolean": true
78
- },
79
- {
80
- "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
81
- "valueExpression": {
82
- "language": "text/fhirpath",
83
- "expression": "%Patient.name.given[0] + ' ' + %Patient.name.family"
84
- }
85
- }
86
- ],
87
- "linkId": "patientName"
88
- },
89
- {
90
- "text": "Medication name",
91
- "type": "choice",
92
- "linkId": "medication",
93
- "required": true,
94
- "answerOption": [
95
- {
96
- "valueCoding": {
97
- "code": "261000",
98
- "system": "http://snomed.info/sct",
99
- "display": "Codeine phosphate"
100
- }
14
+ "name": "Medication",
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"
101
33
  },
102
34
  {
103
- "valueCoding": {
104
- "code": "2336001",
105
- "system": "http://snomed.info/sct",
106
- "display": "Fibrinogen Tokyo II"
107
- }
35
+ "text": "EncounterId",
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": "%Encounter.id"
47
+ }
48
+ }
49
+ ],
50
+ "linkId": "encounterId"
108
51
  },
109
52
  {
110
- "valueCoding": {
111
- "code": "363000",
112
- "system": "http://snomed.info/sct",
113
- "display": "Fibrinogen San Juan"
114
- }
53
+ "text": "PatientId",
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.id"
65
+ }
66
+ }
67
+ ],
68
+ "linkId": "patientId",
69
+ "required": true
115
70
  },
116
71
  {
117
- "valueCoding": {
118
- "code": "519005",
119
- "system": "http://snomed.info/sct",
120
- "display": "Free protein S"
121
- }
72
+ "text": "PatientName",
73
+ "type": "string",
74
+ "extension": [
75
+ {
76
+ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",
77
+ "valueBoolean": true
78
+ },
79
+ {
80
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
81
+ "valueExpression": {
82
+ "language": "text/fhirpath",
83
+ "expression": "%Patient.name.given[0] + ' ' + %Patient.name.family"
84
+ }
85
+ }
86
+ ],
87
+ "linkId": "patientName"
122
88
  },
123
89
  {
124
- "valueCoding": {
125
- "code": "585007",
126
- "system": "http://snomed.info/sct",
127
- "display": "SP - Substance P"
128
- }
90
+ "text": "Medication name",
91
+ "type": "choice",
92
+ "linkId": "medication",
93
+ "required": true,
94
+ "answerOption": [
95
+ {
96
+ "valueCoding": {
97
+ "code": "261000",
98
+ "system": "http://snomed.info/sct",
99
+ "display": "Codeine phosphate"
100
+ }
101
+ },
102
+ {
103
+ "valueCoding": {
104
+ "code": "2336001",
105
+ "system": "http://snomed.info/sct",
106
+ "display": "Fibrinogen Tokyo II"
107
+ }
108
+ },
109
+ {
110
+ "valueCoding": {
111
+ "code": "363000",
112
+ "system": "http://snomed.info/sct",
113
+ "display": "Fibrinogen San Juan"
114
+ }
115
+ },
116
+ {
117
+ "valueCoding": {
118
+ "code": "519005",
119
+ "system": "http://snomed.info/sct",
120
+ "display": "Free protein S"
121
+ }
122
+ },
123
+ {
124
+ "valueCoding": {
125
+ "code": "585007",
126
+ "system": "http://snomed.info/sct",
127
+ "display": "SP - Substance P"
128
+ }
129
+ },
130
+ {
131
+ "valueCoding": {
132
+ "code": "693002",
133
+ "system": "http://snomed.info/sct",
134
+ "display": "Trichothecene"
135
+ }
136
+ },
137
+ {
138
+ "valueCoding": {
139
+ "code": "698006",
140
+ "system": "http://snomed.info/sct",
141
+ "display": "Erythromycin lactobionate"
142
+ }
143
+ },
144
+ {
145
+ "valueCoding": {
146
+ "code": "699003",
147
+ "system": "http://snomed.info/sct",
148
+ "display": "Coal tar extract"
149
+ }
150
+ },
151
+ {
152
+ "valueCoding": {
153
+ "code": "747006",
154
+ "system": "http://snomed.info/sct",
155
+ "display": "Oxamniquine"
156
+ }
157
+ }
158
+ ]
129
159
  },
130
160
  {
131
- "valueCoding": {
132
- "code": "693002",
133
- "system": "http://snomed.info/sct",
134
- "display": "Trichothecene"
135
- }
161
+ "text": "Dosage",
162
+ "type": "string",
163
+ "linkId": "dosage",
164
+ "required": true
136
165
  },
137
166
  {
138
- "valueCoding": {
139
- "code": "698006",
140
- "system": "http://snomed.info/sct",
141
- "display": "Erythromycin lactobionate"
142
- }
167
+ "text": "Start Date",
168
+ "type": "date",
169
+ "linkId": "start-date"
143
170
  },
144
171
  {
145
- "valueCoding": {
146
- "code": "699003",
147
- "system": "http://snomed.info/sct",
148
- "display": "Coal tar extract"
149
- }
172
+ "text": "Stop Date",
173
+ "type": "date",
174
+ "linkId": "stop-date"
150
175
  },
151
176
  {
152
- "valueCoding": {
153
- "code": "747006",
154
- "system": "http://snomed.info/sct",
155
- "display": "Oxamniquine"
156
- }
177
+ "text": "Notes",
178
+ "type": "string",
179
+ "linkId": "notes"
157
180
  }
158
- ]
159
- },
160
- {
161
- "text": "Dosage",
162
- "type": "string",
163
- "linkId": "dosage",
164
- "required": true
165
- },
166
- {
167
- "text": "Start Date",
168
- "type": "date",
169
- "linkId": "start-date"
170
- },
171
- {
172
- "text": "Stop Date",
173
- "type": "date",
174
- "linkId": "stop-date"
175
- },
176
- {
177
- "text": "Notes",
178
- "type": "string",
179
- "linkId": "notes"
180
- }
181
- ],
182
- "resourceType": "Questionnaire",
183
- "extension": [
184
- {
185
- "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
186
- "extension": [
181
+ ],
182
+ "resourceType": "Questionnaire",
183
+ "extension": [
187
184
  {
188
- "url": "name",
189
- "valueCoding": {
190
- "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
191
- "code": "Patient"
192
- }
185
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
186
+ "extension": [
187
+ {
188
+ "url": "name",
189
+ "valueCoding": {
190
+ "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
191
+ "code": "Patient"
192
+ }
193
+ },
194
+ {
195
+ "url": "type",
196
+ "valueCode": "Patient"
197
+ }
198
+ ]
193
199
  },
194
200
  {
195
- "url": "type",
196
- "valueCode": "Patient"
197
- }
198
- ]
199
- },
200
- {
201
- "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
202
- "extension": [
201
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext",
202
+ "extension": [
203
+ {
204
+ "url": "name",
205
+ "valueCoding": {
206
+ "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
207
+ "code": "Author"
208
+ }
209
+ },
210
+ {
211
+ "url": "type",
212
+ "valueCode": "Resource"
213
+ }
214
+ ]
215
+ },
203
216
  {
204
- "url": "name",
205
- "valueCoding": {
206
- "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext",
207
- "code": "Author"
208
- }
217
+ "url": "http://beda.software/fhir-extensions/questionnaire-mapper",
218
+ "valueReference": {
219
+ "reference": "Mapping/medication-statement-extract"
220
+ }
209
221
  },
210
222
  {
211
- "url": "type",
212
- "valueCode": "Resource"
223
+ "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom",
224
+ "valueCanonical": "medication"
213
225
  }
214
- ]
215
- },
216
- {
217
- "url": "http://beda.software/fhir-extensions/questionnaire-mapper",
218
- "valueReference": {
219
- "reference": "Mapping/medication-statement-extract"
220
- }
221
- }
222
- ],
223
- "status": "active",
224
- "id": "medication",
225
- "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/medication"
226
+ ],
227
+ "status": "active",
228
+ "id": "medication",
229
+ "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/medication"
226
230
  }