org.sql-on-fhir.ig 2.0.0
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/ImplementationGuide-org.sql-on-fhir.ig.json +1 -0
- package/StructureDefinition-ShareableViewDefinition.json +1 -0
- package/StructureDefinition-TabularViewDefinition.json +1 -0
- package/StructureDefinition-ViewDefinition.json +1 -0
- package/example/Binary-PatientAddresses.json +1 -0
- package/example/Binary-PatientAndContactAddressUnion.json +1 -0
- package/example/Binary-PatientDemographics.json +1 -0
- package/example/Binary-ShareablePatientDemographics.json +1 -0
- package/example/Binary-UsCoreBloodPressures.json +1 -0
- package/other/ig-r4.jsonX +1 -0
- package/other/spec.internals +88 -0
- package/other/validation-oo.json +1 -0
- package/other/validation-summary.json +1 -0
- package/package.json +27 -0
- package/tests/basic.json +496 -0
- package/tests/collection.json +244 -0
- package/tests/combinations.json +256 -0
- package/tests/constant.json +331 -0
- package/tests/constant_types.json +1032 -0
- package/tests/fhirpath.json +412 -0
- package/tests/fhirpath_numbers.json +103 -0
- package/tests/fn_boundary.json +362 -0
- package/tests/fn_empty.json +57 -0
- package/tests/fn_extension.json +173 -0
- package/tests/fn_first.json +77 -0
- package/tests/fn_join.json +106 -0
- package/tests/fn_oftype.json +111 -0
- package/tests/fn_reference_keys.json +109 -0
- package/tests/foreach.json +832 -0
- package/tests/logic.json +125 -0
- package/tests/union.json +842 -0
- package/tests/validate.json +99 -0
- package/tests/view_resource.json +95 -0
- package/tests/where.json +279 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "collection",
|
|
3
|
+
"tags": ["shareable"],
|
|
4
|
+
"description": "TBD",
|
|
5
|
+
"fhirVersion": ["5.0.0", "4.0.1", "3.0.2"],
|
|
6
|
+
"resources": [
|
|
7
|
+
{
|
|
8
|
+
"resourceType": "Patient",
|
|
9
|
+
"id": "pt1",
|
|
10
|
+
"name": [
|
|
11
|
+
{
|
|
12
|
+
"use": "official",
|
|
13
|
+
"family": "f1.1",
|
|
14
|
+
"given": ["g1.1"]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"family": "f1.2",
|
|
18
|
+
"given": ["g1.2", "g1.3"]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"gender": "male",
|
|
22
|
+
"birthDate": "1950-01-01",
|
|
23
|
+
"address": [
|
|
24
|
+
{
|
|
25
|
+
"city": "c1"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"resourceType": "Patient",
|
|
31
|
+
"id": "pt2",
|
|
32
|
+
"name": [
|
|
33
|
+
{
|
|
34
|
+
"family": "f2.1",
|
|
35
|
+
"given": ["g2.1"]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"use": "official",
|
|
39
|
+
"family": "f2.2",
|
|
40
|
+
"given": ["g2.2", "g2.3"]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"gender": "female",
|
|
44
|
+
"birthDate": "1950-01-01"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"tests": [
|
|
48
|
+
{
|
|
49
|
+
"title": "fail when 'collection' is not true",
|
|
50
|
+
"tags": ["shareable"],
|
|
51
|
+
"view": {
|
|
52
|
+
"resource": "Patient",
|
|
53
|
+
"status": "active",
|
|
54
|
+
"select": [
|
|
55
|
+
{
|
|
56
|
+
"column": [
|
|
57
|
+
{
|
|
58
|
+
"name": "id",
|
|
59
|
+
"path": "id",
|
|
60
|
+
"type": "id"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "last_name",
|
|
64
|
+
"path": "name.family",
|
|
65
|
+
"type": "string",
|
|
66
|
+
"collection": false
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "first_name",
|
|
70
|
+
"path": "name.given",
|
|
71
|
+
"type": "string",
|
|
72
|
+
"collection": true
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"expectError": true
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"title": "collection = true",
|
|
82
|
+
"tags": ["shareable"],
|
|
83
|
+
"view": {
|
|
84
|
+
"resource": "Patient",
|
|
85
|
+
"status": "active",
|
|
86
|
+
"select": [
|
|
87
|
+
{
|
|
88
|
+
"column": [
|
|
89
|
+
{
|
|
90
|
+
"name": "id",
|
|
91
|
+
"path": "id",
|
|
92
|
+
"type": "id"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "last_name",
|
|
96
|
+
"path": "name.family",
|
|
97
|
+
"type": "string",
|
|
98
|
+
"collection": true
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "first_name",
|
|
102
|
+
"path": "name.given",
|
|
103
|
+
"type": "string",
|
|
104
|
+
"collection": true
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"expect": [
|
|
111
|
+
{
|
|
112
|
+
"id": "pt1",
|
|
113
|
+
"last_name": ["f1.1", "f1.2"],
|
|
114
|
+
"first_name": ["g1.1", "g1.2", "g1.3"]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "pt2",
|
|
118
|
+
"last_name": ["f2.1", "f2.2"],
|
|
119
|
+
"first_name": ["g2.1", "g2.2", "g2.3"]
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"title": "collection = false relative to forEach parent",
|
|
125
|
+
"tags": ["shareable"],
|
|
126
|
+
"view": {
|
|
127
|
+
"resource": "Patient",
|
|
128
|
+
"status": "active",
|
|
129
|
+
"select": [
|
|
130
|
+
{
|
|
131
|
+
"column": [
|
|
132
|
+
{
|
|
133
|
+
"name": "id",
|
|
134
|
+
"path": "id",
|
|
135
|
+
"type": "id"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"select": [
|
|
139
|
+
{
|
|
140
|
+
"forEach": "name",
|
|
141
|
+
"column": [
|
|
142
|
+
{
|
|
143
|
+
"name": "last_name",
|
|
144
|
+
"path": "family",
|
|
145
|
+
"type": "string",
|
|
146
|
+
"collection": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "first_name",
|
|
150
|
+
"path": "given",
|
|
151
|
+
"type": "string",
|
|
152
|
+
"collection": true
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"expect": [
|
|
161
|
+
{
|
|
162
|
+
"id": "pt1",
|
|
163
|
+
"last_name": "f1.1",
|
|
164
|
+
"first_name": ["g1.1"]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "pt1",
|
|
168
|
+
"last_name": "f1.2",
|
|
169
|
+
"first_name": ["g1.2", "g1.3"]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "pt2",
|
|
173
|
+
"last_name": "f2.1",
|
|
174
|
+
"first_name": ["g2.1"]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"id": "pt2",
|
|
178
|
+
"last_name": "f2.2",
|
|
179
|
+
"first_name": ["g2.2", "g2.3"]
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"title": "collection = false relative to forEachOrNull parent",
|
|
185
|
+
"tags": ["shareable"],
|
|
186
|
+
"view": {
|
|
187
|
+
"resource": "Patient",
|
|
188
|
+
"status": "active",
|
|
189
|
+
"select": [
|
|
190
|
+
{
|
|
191
|
+
"column": [
|
|
192
|
+
{
|
|
193
|
+
"name": "id",
|
|
194
|
+
"path": "id",
|
|
195
|
+
"type": "id"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"select": [
|
|
199
|
+
{
|
|
200
|
+
"forEach": "name",
|
|
201
|
+
"column": [
|
|
202
|
+
{
|
|
203
|
+
"name": "last_name",
|
|
204
|
+
"path": "family",
|
|
205
|
+
"type": "string",
|
|
206
|
+
"collection": false
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "first_name",
|
|
210
|
+
"path": "given",
|
|
211
|
+
"type": "string",
|
|
212
|
+
"collection": true
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
"expect": [
|
|
221
|
+
{
|
|
222
|
+
"id": "pt1",
|
|
223
|
+
"last_name": "f1.1",
|
|
224
|
+
"first_name": ["g1.1"]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"id": "pt1",
|
|
228
|
+
"last_name": "f1.2",
|
|
229
|
+
"first_name": ["g1.2", "g1.3"]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "pt2",
|
|
233
|
+
"last_name": "f2.1",
|
|
234
|
+
"first_name": ["g2.1"]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"id": "pt2",
|
|
238
|
+
"last_name": "f2.2",
|
|
239
|
+
"first_name": ["g2.2", "g2.3"]
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "combinations",
|
|
3
|
+
"description": "TBD",
|
|
4
|
+
"fhirVersion": ["5.0.0", "4.0.1"],
|
|
5
|
+
"resources": [
|
|
6
|
+
{
|
|
7
|
+
"id": "pt1",
|
|
8
|
+
"resourceType": "Patient"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "pt2",
|
|
12
|
+
"resourceType": "Patient"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "pt3",
|
|
16
|
+
"resourceType": "Patient"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"tests": [
|
|
20
|
+
{
|
|
21
|
+
"title": "select",
|
|
22
|
+
"tags": ["shareable"],
|
|
23
|
+
"view": {
|
|
24
|
+
"resource": "Patient",
|
|
25
|
+
"select": [
|
|
26
|
+
{
|
|
27
|
+
"select": [
|
|
28
|
+
{
|
|
29
|
+
"column": [
|
|
30
|
+
{
|
|
31
|
+
"path": "id",
|
|
32
|
+
"name": "id",
|
|
33
|
+
"type": "id"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"expect": [
|
|
42
|
+
{
|
|
43
|
+
"id": "pt1"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "pt2"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "pt3"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"title": "column + select",
|
|
55
|
+
"tags": ["shareable"],
|
|
56
|
+
"view": {
|
|
57
|
+
"resource": "Patient",
|
|
58
|
+
"select": [
|
|
59
|
+
{
|
|
60
|
+
"column": [
|
|
61
|
+
{
|
|
62
|
+
"path": "id",
|
|
63
|
+
"name": "column_id",
|
|
64
|
+
"type": "id"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"select": [
|
|
68
|
+
{
|
|
69
|
+
"column": [
|
|
70
|
+
{
|
|
71
|
+
"path": "id",
|
|
72
|
+
"name": "select_id",
|
|
73
|
+
"type": "id"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"expect": [
|
|
82
|
+
{
|
|
83
|
+
"column_id": "pt1",
|
|
84
|
+
"select_id": "pt1"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"column_id": "pt2",
|
|
88
|
+
"select_id": "pt2"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"column_id": "pt3",
|
|
92
|
+
"select_id": "pt3"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"title": "sibling select",
|
|
98
|
+
"tags": ["shareable"],
|
|
99
|
+
"view": {
|
|
100
|
+
"resource": "Patient",
|
|
101
|
+
"select": [
|
|
102
|
+
{
|
|
103
|
+
"column": [
|
|
104
|
+
{
|
|
105
|
+
"path": "id",
|
|
106
|
+
"name": "id_1",
|
|
107
|
+
"type": "id"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"column": [
|
|
113
|
+
{
|
|
114
|
+
"path": "id",
|
|
115
|
+
"name": "id_2",
|
|
116
|
+
"type": "id"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"expect": [
|
|
123
|
+
{
|
|
124
|
+
"id_1": "pt1",
|
|
125
|
+
"id_2": "pt1"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id_1": "pt2",
|
|
129
|
+
"id_2": "pt2"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id_1": "pt3",
|
|
133
|
+
"id_2": "pt3"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"title": "sibling select inside a select",
|
|
139
|
+
"tags": ["shareable"],
|
|
140
|
+
"view": {
|
|
141
|
+
"resource": "Patient",
|
|
142
|
+
"select": [
|
|
143
|
+
{
|
|
144
|
+
"select": [
|
|
145
|
+
{
|
|
146
|
+
"column": [
|
|
147
|
+
{
|
|
148
|
+
"path": "id",
|
|
149
|
+
"name": "id_1",
|
|
150
|
+
"type": "id"
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"column": [
|
|
156
|
+
{
|
|
157
|
+
"path": "id",
|
|
158
|
+
"name": "id_2",
|
|
159
|
+
"type": "id"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"expect": [
|
|
168
|
+
{
|
|
169
|
+
"id_1": "pt1",
|
|
170
|
+
"id_2": "pt1"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"id_1": "pt2",
|
|
174
|
+
"id_2": "pt2"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"id_1": "pt3",
|
|
178
|
+
"id_2": "pt3"
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"title": "column + select, with where",
|
|
184
|
+
"tags": ["shareable"],
|
|
185
|
+
"view": {
|
|
186
|
+
"resource": "Patient",
|
|
187
|
+
"select": [
|
|
188
|
+
{
|
|
189
|
+
"column": [
|
|
190
|
+
{
|
|
191
|
+
"path": "id",
|
|
192
|
+
"name": "column_id",
|
|
193
|
+
"type": "id"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"select": [
|
|
197
|
+
{
|
|
198
|
+
"column": [
|
|
199
|
+
{
|
|
200
|
+
"path": "id",
|
|
201
|
+
"name": "select_id",
|
|
202
|
+
"type": "id"
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"where": [
|
|
210
|
+
{
|
|
211
|
+
"path": "id = 'pt1'"
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"expect": [
|
|
216
|
+
{
|
|
217
|
+
"column_id": "pt1",
|
|
218
|
+
"select_id": "pt1"
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"title": "unionAll + forEach + column + select",
|
|
224
|
+
"tags": ["shareable"],
|
|
225
|
+
"view": {
|
|
226
|
+
"resource": "Patient",
|
|
227
|
+
"select": [
|
|
228
|
+
{
|
|
229
|
+
"select": [
|
|
230
|
+
{
|
|
231
|
+
"column": [
|
|
232
|
+
{
|
|
233
|
+
"path": "id",
|
|
234
|
+
"name": "id",
|
|
235
|
+
"type": "id"
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"expect": [
|
|
244
|
+
{
|
|
245
|
+
"id": "pt1"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"id": "pt2"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"id": "pt3"
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
}
|