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.
@@ -0,0 +1,88 @@
1
+ {
2
+ "npm-name" : "org.sql-on-fhir.ig",
3
+ "ig-version" : "5.0.0",
4
+ "tool-version" : "5.0.0",
5
+ "tool-build" : "3",
6
+ "webUrl" : "https://sql-on-fhir.org/ig",
7
+ "date" : "2024-10-09",
8
+ "date-time" : "20241009031818+1000",
9
+ "paths" : {
10
+ "https://sql-on-fhir.org/ig/ImplementationGuide/org.sql-on-fhir.ig|2.0.0" : "index.html",
11
+ "https://sql-on-fhir.org/ig/ImplementationGuide/org.sql-on-fhir.ig" : "index.html",
12
+ "https://sql-on-fhir.org/ig/StructureDefinition/ShareableViewDefinition|2.0.0" : "StructureDefinition-ShareableViewDefinition.html",
13
+ "https://sql-on-fhir.org/ig/StructureDefinition/ShareableViewDefinition" : "StructureDefinition-ShareableViewDefinition.html",
14
+ "https://sql-on-fhir.org/ig/StructureDefinition/TabularViewDefinition|2.0.0" : "StructureDefinition-TabularViewDefinition.html",
15
+ "https://sql-on-fhir.org/ig/StructureDefinition/TabularViewDefinition" : "StructureDefinition-TabularViewDefinition.html",
16
+ "https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition|2.0.0" : "StructureDefinition-ViewDefinition.html",
17
+ "https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition" : "StructureDefinition-ViewDefinition.html",
18
+ "https://sql-on-fhir.org/ig/Binary/PatientAddresses" : "Binary-PatientAddresses.html",
19
+ "https://sql-on-fhir.org/ig/Binary/PatientAndContactAddressUnion" : "Binary-PatientAndContactAddressUnion.html",
20
+ "https://sql-on-fhir.org/ig/Binary/PatientDemographics" : "Binary-PatientDemographics.html",
21
+ "https://sql-on-fhir.org/ig/Binary/ShareablePatientDemographics" : "Binary-ShareablePatientDemographics.html",
22
+ "https://sql-on-fhir.org/ig/Binary/UsCoreBloodPressures" : "Binary-UsCoreBloodPressures.html"
23
+ },
24
+ "pages" : {
25
+ },
26
+ "targets" : [
27
+ "searchform.html",
28
+ "functional-model.html",
29
+ "StructureDefinition-ViewDefinition.profile.history.html",
30
+ "Binary-UsCoreBloodPressures.change.history.html",
31
+ "StructureDefinition-TabularViewDefinition-mappings.html",
32
+ "Binary-PatientDemographics.html",
33
+ "StructureDefinition-TabularViewDefinition.profile.json.html",
34
+ "artifacts.html",
35
+ "StructureDefinition-TabularViewDefinition-definitions.html",
36
+ "index.html",
37
+ "StructureDefinition-ViewDefinition.html",
38
+ "Binary-ShareablePatientDemographics.xml.html",
39
+ "StructureDefinition-TabularViewDefinition-testing.html",
40
+ "StructureDefinition-TabularViewDefinition-examples.html",
41
+ "Binary-ShareablePatientDemographics.ttl.html",
42
+ "toc.html",
43
+ "StructureDefinition-ShareableViewDefinition-testing.html",
44
+ "StructureDefinition-ViewDefinition-testing.html",
45
+ "Binary-PatientAddresses.json.html",
46
+ "StructureDefinition-ViewDefinition.profile.ttl.html",
47
+ "Binary-PatientAddresses.change.history.html",
48
+ "Binary-UsCoreBloodPressures.json.html",
49
+ "Binary-ShareablePatientDemographics.change.history.html",
50
+ "StructureDefinition-ViewDefinition.profile.xml.html",
51
+ "Binary-ShareablePatientDemographics.json.html",
52
+ "StructureDefinition-ShareableViewDefinition.profile.json.html",
53
+ "StructureDefinition-ShareableViewDefinition.profile.xml.html",
54
+ "Binary-PatientAddresses.xml.html",
55
+ "Binary-PatientAddresses.html",
56
+ "StructureDefinition-ShareableViewDefinition.profile.ttl.html",
57
+ "StructureDefinition-TabularViewDefinition.html",
58
+ "Binary-PatientAddresses.ttl.html",
59
+ "Binary-PatientAndContactAddressUnion.change.history.html",
60
+ "StructureDefinition-ViewDefinition-examples.html",
61
+ "Binary-PatientDemographics.json.html",
62
+ "StructureDefinition-ViewDefinition-definitions.html",
63
+ "Binary-PatientAndContactAddressUnion.json.html",
64
+ "StructureDefinition-ShareableViewDefinition-examples.html",
65
+ "glossary.html",
66
+ "StructureDefinition-ShareableViewDefinition.html",
67
+ "StructureDefinition-ViewDefinition.profile.json.html",
68
+ "StructureDefinition-TabularViewDefinition.profile.history.html",
69
+ "Binary-ShareablePatientDemographics.html",
70
+ "StructureDefinition-ShareableViewDefinition-mappings.html",
71
+ "Binary-PatientAndContactAddressUnion.html",
72
+ "StructureDefinition-ViewDefinition-mappings.html",
73
+ "contributing.html",
74
+ "StructureDefinition-ShareableViewDefinition-definitions.html",
75
+ "StructureDefinition-TabularViewDefinition.profile.xml.html",
76
+ "Binary-UsCoreBloodPressures.xml.html",
77
+ "Binary-UsCoreBloodPressures.ttl.html",
78
+ "StructureDefinition-TabularViewDefinition.profile.ttl.html",
79
+ "Binary-PatientAndContactAddressUnion.xml.html",
80
+ "Binary-PatientDemographics.change.history.html",
81
+ "Binary-PatientDemographics.xml.html",
82
+ "Binary-PatientDemographics.ttl.html",
83
+ "StructureDefinition-ShareableViewDefinition.profile.history.html",
84
+ "Binary-UsCoreBloodPressures.html",
85
+ "Binary-PatientAndContactAddressUnion.ttl.html"
86
+ ],
87
+ "images" : []
88
+ }
@@ -0,0 +1 @@
1
+ {"resourceType":"Bundle","type":"collection","timestamp":"2024-10-09T15:18:41.450+10:00","entry":[{"fullUrl":"https://sql-on-fhir.org/ig/OperationOutcome/ImplementationGuide-org.sql-on-fhir.ig","resource":{"resourceType":"OperationOutcome","id":"ImplementationGuide-org.sql-on-fhir.ig"}},{"fullUrl":"https://sql-on-fhir.org/ig/OperationOutcome/StructureDefinition-ShareableViewDefinition","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-ShareableViewDefinition","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueString":"InstanceValidator"}],"severity":"warning","code":"business-rule","details":{"text":"The definition for the element 'ViewDefinition.resource' binds to the value set 'http://hl7.org/fhir/ValueSet/resource-types' which is experimental, but this structure is not labeled as experimental"},"expression":["StructureDefinition/ShareableViewDefinition: StructureDefinition.snapshot.element[13].binding"]}]}},{"fullUrl":"https://sql-on-fhir.org/ig/OperationOutcome/StructureDefinition-TabularViewDefinition","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-TabularViewDefinition","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueString":"InstanceValidator"}],"severity":"warning","code":"business-rule","details":{"text":"The definition for the element 'ViewDefinition.resource' binds to the value set 'http://hl7.org/fhir/ValueSet/resource-types' which is experimental, but this structure is not labeled as experimental"},"expression":["StructureDefinition/TabularViewDefinition: StructureDefinition.snapshot.element[13].binding"]}]}},{"fullUrl":"https://sql-on-fhir.org/ig/OperationOutcome/StructureDefinition-ViewDefinition","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-ViewDefinition","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":103636},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueString":"InstanceValidator"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"TYPE_SPECIFIC_CHECKS_DT_XHTML_MULTIPLE_MATCHES"}],"severity":"warning","code":"invalid","details":{"text":"Hyperlink '#ViewDefinition.select' at 'div/table/tr/td/a' for 'select' resolves to multiple targets ($/differential/element/id, $/snapshot/element/id, $/text/div/table/tr/td/a/@name)"},"expression":["StructureDefinition/ViewDefinition: StructureDefinition.text.div"]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueString":"InstanceValidator"}],"severity":"warning","code":"business-rule","details":{"text":"The definition for the element 'ViewDefinition.resource' binds to the value set 'http://hl7.org/fhir/ValueSet/resource-types' which is experimental, but this structure is not labeled as experimental"},"expression":["StructureDefinition/ViewDefinition: StructureDefinition.differential.element[13].binding"]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueString":"InstanceValidator"}],"severity":"warning","code":"business-rule","details":{"text":"The definition for the element 'ViewDefinition.resource' binds to the value set 'http://hl7.org/fhir/ValueSet/resource-types' which is experimental, but this structure is not labeled as experimental"},"expression":["StructureDefinition/ViewDefinition: StructureDefinition.snapshot.element[13].binding"]}]}},{"fullUrl":"https://sql-on-fhir.org/ig/OperationOutcome/Binary-PatientAddresses","resource":{"resourceType":"OperationOutcome","id":"Binary-PatientAddresses"}},{"fullUrl":"https://sql-on-fhir.org/ig/OperationOutcome/Binary-PatientAndContactAddressUnion","resource":{"resourceType":"OperationOutcome","id":"Binary-PatientAndContactAddressUnion"}},{"fullUrl":"https://sql-on-fhir.org/ig/OperationOutcome/Binary-PatientDemographics","resource":{"resourceType":"OperationOutcome","id":"Binary-PatientDemographics"}},{"fullUrl":"https://sql-on-fhir.org/ig/OperationOutcome/Binary-ShareablePatientDemographics","resource":{"resourceType":"OperationOutcome","id":"Binary-ShareablePatientDemographics"}},{"fullUrl":"https://sql-on-fhir.org/ig/OperationOutcome/Binary-UsCoreBloodPressures","resource":{"resourceType":"OperationOutcome","id":"Binary-UsCoreBloodPressures"}}]}
@@ -0,0 +1 @@
1
+ {"ImplementationGuide/org.sql-on-fhir.ig":{"errors":0,"warnings":0},"StructureDefinition/ShareableViewDefinition":{"errors":0,"warnings":1},"StructureDefinition/TabularViewDefinition":{"errors":0,"warnings":1},"StructureDefinition/ViewDefinition":{"errors":0,"warnings":3},"Binary/PatientAddresses":{"errors":0,"warnings":0},"Binary/PatientAndContactAddressUnion":{"errors":0,"warnings":0},"Binary/PatientDemographics":{"errors":0,"warnings":0},"Binary/ShareablePatientDemographics":{"errors":0,"warnings":0},"Binary/UsCoreBloodPressures":{"errors":0,"warnings":0}}
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name" : "org.sql-on-fhir.ig",
3
+ "version" : "2.0.0",
4
+ "tools-version" : 3,
5
+ "type" : "IG",
6
+ "date" : "20241009151748",
7
+ "license" : "CC0-1.0",
8
+ "canonical" : "https://sql-on-fhir.org/ig",
9
+ "url" : "https://sql-on-fhir.org/ig/2.0.0",
10
+ "title" : "SQL on FHIR",
11
+ "description" : "A specification for defining portable views of FHIR data that can be easily queried using tools such as SQL. (built Wed, Oct 9, 2024 15:17+1000+10:00)",
12
+ "fhirVersions" : ["5.0.0"],
13
+ "dependencies" : {
14
+ "hl7.terminology.r5" : "6.0.2",
15
+ "hl7.fhir.uv.extensions.r5" : "5.1.0"
16
+ },
17
+ "author" : "SQL on FHIR Working Group",
18
+ "maintainers" : [{
19
+ "name" : "SQL on FHIR Working Group",
20
+ "url" : "https://sql-on-fhir.org"
21
+ }],
22
+ "directories" : {
23
+ "lib" : "package",
24
+ "example" : "example"
25
+ },
26
+ "jurisdiction" : "http://unstats.un.org/unsd/methods/m49/m49.htm#001"
27
+ }
@@ -0,0 +1,496 @@
1
+ {
2
+ "title": "basic",
3
+ "description": "basic view definition",
4
+ "fhirVersion": ["5.0.0", "4.0.1", "3.0.2"],
5
+ "resources": [
6
+ {
7
+ "resourceType": "Patient",
8
+ "id": "pt1",
9
+ "name": [
10
+ {
11
+ "family": "F1"
12
+ }
13
+ ],
14
+ "active": true
15
+ },
16
+ {
17
+ "resourceType": "Patient",
18
+ "id": "pt2",
19
+ "name": [
20
+ {
21
+ "family": "F2"
22
+ }
23
+ ],
24
+ "active": false
25
+ },
26
+ {
27
+ "resourceType": "Patient",
28
+ "id": "pt3"
29
+ }
30
+ ],
31
+ "tests": [
32
+ {
33
+ "title": "basic attribute",
34
+ "tags": ["shareable"],
35
+ "view": {
36
+ "resource": "Patient",
37
+ "status": "active",
38
+ "select": [
39
+ {
40
+ "column": [
41
+ {
42
+ "name": "id",
43
+ "path": "id",
44
+ "type": "id"
45
+ }
46
+ ]
47
+ }
48
+ ]
49
+ },
50
+ "expect": [
51
+ {
52
+ "id": "pt1"
53
+ },
54
+ {
55
+ "id": "pt2"
56
+ },
57
+ {
58
+ "id": "pt3"
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "title": "boolean attribute with false",
64
+ "tags": ["shareable"],
65
+ "view": {
66
+ "resource": "Patient",
67
+ "status": "active",
68
+ "select": [
69
+ {
70
+ "column": [
71
+ {
72
+ "name": "id",
73
+ "path": "id",
74
+ "type": "id"
75
+ },
76
+ {
77
+ "name": "active",
78
+ "path": "active",
79
+ "type": "boolean"
80
+ }
81
+ ]
82
+ }
83
+ ]
84
+ },
85
+ "expect": [
86
+ {
87
+ "id": "pt1",
88
+ "active": true
89
+ },
90
+ {
91
+ "id": "pt2",
92
+ "active": false
93
+ },
94
+ {
95
+ "id": "pt3",
96
+ "active": null
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ "title": "two columns",
102
+ "tags": ["shareable"],
103
+ "view": {
104
+ "resource": "Patient",
105
+ "status": "active",
106
+ "select": [
107
+ {
108
+ "column": [
109
+ {
110
+ "name": "id",
111
+ "path": "id",
112
+ "type": "id"
113
+ },
114
+ {
115
+ "name": "last_name",
116
+ "path": "name.family.first()",
117
+ "type": "string"
118
+ }
119
+ ]
120
+ }
121
+ ]
122
+ },
123
+ "expect": [
124
+ {
125
+ "id": "pt1",
126
+ "last_name": "F1"
127
+ },
128
+ {
129
+ "id": "pt2",
130
+ "last_name": "F2"
131
+ },
132
+ {
133
+ "id": "pt3",
134
+ "last_name": null
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ "title": "two selects with columns",
140
+ "tags": ["shareable"],
141
+ "view": {
142
+ "resource": "Patient",
143
+ "status": "active",
144
+ "select": [
145
+ {
146
+ "column": [
147
+ {
148
+ "name": "id",
149
+ "path": "id",
150
+ "type": "id"
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "column": [
156
+ {
157
+ "name": "last_name",
158
+ "path": "name.family.first()",
159
+ "type": "string"
160
+ }
161
+ ]
162
+ }
163
+ ]
164
+ },
165
+ "expect": [
166
+ {
167
+ "id": "pt1",
168
+ "last_name": "F1"
169
+ },
170
+ {
171
+ "id": "pt2",
172
+ "last_name": "F2"
173
+ },
174
+ {
175
+ "id": "pt3",
176
+ "last_name": null
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "title": "where - 1",
182
+ "tags": ["shareable"],
183
+ "view": {
184
+ "resource": "Patient",
185
+ "status": "active",
186
+ "select": [
187
+ {
188
+ "column": [
189
+ {
190
+ "name": "id",
191
+ "path": "id",
192
+ "type": "id"
193
+ }
194
+ ]
195
+ }
196
+ ],
197
+ "where": [
198
+ {
199
+ "path": "active.exists() and active = true"
200
+ }
201
+ ]
202
+ },
203
+ "expect": [
204
+ {
205
+ "id": "pt1"
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ "title": "where - 2",
211
+ "tags": ["shareable"],
212
+ "view": {
213
+ "resource": "Patient",
214
+ "status": "active",
215
+ "select": [
216
+ {
217
+ "column": [
218
+ {
219
+ "name": "id",
220
+ "path": "id",
221
+ "type": "id"
222
+ }
223
+ ]
224
+ }
225
+ ],
226
+ "where": [
227
+ {
228
+ "path": "active.exists() and active = false"
229
+ }
230
+ ]
231
+ },
232
+ "expect": [
233
+ {
234
+ "id": "pt2"
235
+ }
236
+ ]
237
+ },
238
+ {
239
+ "title": "where returns non-boolean for some cases",
240
+ "tags": ["shareable"],
241
+ "view": {
242
+ "resource": "Patient",
243
+ "status": "active",
244
+ "select": [
245
+ {
246
+ "column": [
247
+ {
248
+ "name": "id",
249
+ "path": "id",
250
+ "type": "id"
251
+ }
252
+ ]
253
+ }
254
+ ],
255
+ "where": [
256
+ {
257
+ "path": "active"
258
+ }
259
+ ]
260
+ },
261
+ "expect": [
262
+ {
263
+ "id": "pt1"
264
+ }
265
+ ]
266
+ },
267
+ {
268
+ "title": "where as expr - 1",
269
+ "tags": ["shareable"],
270
+ "view": {
271
+ "resource": "Patient",
272
+ "status": "active",
273
+ "select": [
274
+ {
275
+ "column": [
276
+ {
277
+ "name": "id",
278
+ "path": "id",
279
+ "type": "id"
280
+ }
281
+ ]
282
+ }
283
+ ],
284
+ "where": [
285
+ {
286
+ "path": "name.family.exists() and name.family = 'F2'"
287
+ }
288
+ ]
289
+ },
290
+ "expect": [
291
+ {
292
+ "id": "pt2"
293
+ }
294
+ ]
295
+ },
296
+ {
297
+ "title": "where as expr - 2",
298
+ "tags": ["shareable"],
299
+ "view": {
300
+ "resource": "Patient",
301
+ "status": "active",
302
+ "select": [
303
+ {
304
+ "column": [
305
+ {
306
+ "name": "id",
307
+ "path": "id",
308
+ "type": "id"
309
+ }
310
+ ]
311
+ }
312
+ ],
313
+ "where": [
314
+ {
315
+ "path": "name.family.exists() and name.family = 'F1'"
316
+ }
317
+ ]
318
+ },
319
+ "expect": [
320
+ {
321
+ "id": "pt1"
322
+ }
323
+ ]
324
+ },
325
+ {
326
+ "title": "select & column",
327
+ "tags": ["shareable"],
328
+ "view": {
329
+ "resource": "Patient",
330
+ "select": [
331
+ {
332
+ "column": [
333
+ {
334
+ "path": "id",
335
+ "name": "c_id",
336
+ "type": "id"
337
+ }
338
+ ],
339
+ "select": [
340
+ {
341
+ "column": [
342
+ {
343
+ "path": "id",
344
+ "name": "s_id",
345
+ "type": "id"
346
+ }
347
+ ]
348
+ }
349
+ ]
350
+ }
351
+ ]
352
+ },
353
+ "expect": [
354
+ {
355
+ "c_id": "pt1",
356
+ "s_id": "pt1"
357
+ },
358
+ {
359
+ "c_id": "pt2",
360
+ "s_id": "pt2"
361
+ },
362
+ {
363
+ "c_id": "pt3",
364
+ "s_id": "pt3"
365
+ }
366
+ ]
367
+ },
368
+ {
369
+ "title": "column ordering",
370
+ "tags": ["shareable"],
371
+ "view": {
372
+ "resource": "Patient",
373
+ "select": [
374
+ {
375
+ "column": [
376
+ {
377
+ "path": "'A'",
378
+ "name": "a",
379
+ "type": "string"
380
+ },
381
+ {
382
+ "path": "'B'",
383
+ "name": "b",
384
+ "type": "string"
385
+ }
386
+ ],
387
+ "select": [
388
+ {
389
+ "forEach": "name",
390
+ "column": [
391
+ {
392
+ "path": "'C'",
393
+ "name": "c",
394
+ "type": "string"
395
+ },
396
+ {
397
+ "path": "'D'",
398
+ "name": "d",
399
+ "type": "string"
400
+ }
401
+ ]
402
+ }
403
+ ],
404
+ "unionAll": [
405
+ {
406
+ "column": [
407
+ {
408
+ "path": "'E1'",
409
+ "name": "e",
410
+ "type": "string"
411
+ },
412
+ {
413
+ "path": "'F1'",
414
+ "name": "f",
415
+ "type": "string"
416
+ }
417
+ ]
418
+ },
419
+ {
420
+ "column": [
421
+ {
422
+ "path": "'E2'",
423
+ "name": "e",
424
+ "type": "string"
425
+ },
426
+ {
427
+ "path": "'F2'",
428
+ "name": "f",
429
+ "type": "string"
430
+ }
431
+ ]
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "column": [
437
+ {
438
+ "path": "'G'",
439
+ "name": "g",
440
+ "type": "string"
441
+ },
442
+ {
443
+ "path": "'H'",
444
+ "name": "h",
445
+ "type": "string"
446
+ }
447
+ ]
448
+ }
449
+ ]
450
+ },
451
+ "expectColumns": ["a", "b", "c", "d", "e", "f", "g", "h"],
452
+ "expect": [
453
+ {
454
+ "a": "A",
455
+ "b": "B",
456
+ "c": "C",
457
+ "d": "D",
458
+ "e": "E1",
459
+ "f": "F1",
460
+ "g": "G",
461
+ "h": "H"
462
+ },
463
+ {
464
+ "a": "A",
465
+ "b": "B",
466
+ "c": "C",
467
+ "d": "D",
468
+ "e": "E2",
469
+ "f": "F2",
470
+ "g": "G",
471
+ "h": "H"
472
+ },
473
+ {
474
+ "a": "A",
475
+ "b": "B",
476
+ "c": "C",
477
+ "d": "D",
478
+ "e": "E1",
479
+ "f": "F1",
480
+ "g": "G",
481
+ "h": "H"
482
+ },
483
+ {
484
+ "a": "A",
485
+ "b": "B",
486
+ "c": "C",
487
+ "d": "D",
488
+ "e": "E2",
489
+ "f": "F2",
490
+ "g": "G",
491
+ "h": "H"
492
+ }
493
+ ]
494
+ }
495
+ ]
496
+ }