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,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "fn_join",
|
|
3
|
+
"description": "FHIRPath `join` function.",
|
|
4
|
+
"fhirVersion": ["5.0.0", "4.0.1"],
|
|
5
|
+
"resources": [
|
|
6
|
+
{
|
|
7
|
+
"resourceType": "Patient",
|
|
8
|
+
"id": "p1",
|
|
9
|
+
"name": [
|
|
10
|
+
{
|
|
11
|
+
"use": "official",
|
|
12
|
+
"given": ["p1.g1", "p1.g2"]
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"tests": [
|
|
18
|
+
{
|
|
19
|
+
"title": "join with comma",
|
|
20
|
+
"tags": ["experimental"],
|
|
21
|
+
"view": {
|
|
22
|
+
"resource": "Patient",
|
|
23
|
+
"select": [
|
|
24
|
+
{
|
|
25
|
+
"column": [
|
|
26
|
+
{
|
|
27
|
+
"path": "id",
|
|
28
|
+
"name": "id",
|
|
29
|
+
"type": "id"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"path": "name.given.join(',')",
|
|
33
|
+
"name": "given",
|
|
34
|
+
"type": "string"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"expect": [
|
|
41
|
+
{
|
|
42
|
+
"id": "p1",
|
|
43
|
+
"given": "p1.g1,p1.g2"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"title": "join with empty value",
|
|
49
|
+
"tags": ["experimental"],
|
|
50
|
+
"view": {
|
|
51
|
+
"resource": "Patient",
|
|
52
|
+
"select": [
|
|
53
|
+
{
|
|
54
|
+
"column": [
|
|
55
|
+
{
|
|
56
|
+
"path": "id",
|
|
57
|
+
"name": "id",
|
|
58
|
+
"type": "id"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"path": "name.given.join('')",
|
|
62
|
+
"name": "given",
|
|
63
|
+
"type": "string"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"expect": [
|
|
70
|
+
{
|
|
71
|
+
"id": "p1",
|
|
72
|
+
"given": "p1.g1p1.g2"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"title": "join with no value - default to no separator",
|
|
78
|
+
"tags": ["experimental"],
|
|
79
|
+
"view": {
|
|
80
|
+
"resource": "Patient",
|
|
81
|
+
"select": [
|
|
82
|
+
{
|
|
83
|
+
"column": [
|
|
84
|
+
{
|
|
85
|
+
"path": "id",
|
|
86
|
+
"name": "id",
|
|
87
|
+
"type": "id"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"path": "name.given.join()",
|
|
91
|
+
"name": "given",
|
|
92
|
+
"type": "string"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"expect": [
|
|
99
|
+
{
|
|
100
|
+
"id": "p1",
|
|
101
|
+
"given": "p1.g1p1.g2"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "fn_oftype",
|
|
3
|
+
"description": "TBD",
|
|
4
|
+
"fhirVersion": ["5.0.0", "4.0.1"],
|
|
5
|
+
"resources": [
|
|
6
|
+
{
|
|
7
|
+
"resourceType": "Observation",
|
|
8
|
+
"id": "o1",
|
|
9
|
+
"code": {
|
|
10
|
+
"text": "code"
|
|
11
|
+
},
|
|
12
|
+
"status": "final",
|
|
13
|
+
"valueString": "foo"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"resourceType": "Observation",
|
|
17
|
+
"id": "o2",
|
|
18
|
+
"code": {
|
|
19
|
+
"text": "code"
|
|
20
|
+
},
|
|
21
|
+
"status": "final",
|
|
22
|
+
"valueInteger": 42
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"resourceType": "Observation",
|
|
26
|
+
"id": "o3",
|
|
27
|
+
"code": {
|
|
28
|
+
"text": "code"
|
|
29
|
+
},
|
|
30
|
+
"status": "final"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"tests": [
|
|
34
|
+
{
|
|
35
|
+
"title": "select string values",
|
|
36
|
+
"tags": ["shareable"],
|
|
37
|
+
"view": {
|
|
38
|
+
"resource": "Observation",
|
|
39
|
+
"status": "active",
|
|
40
|
+
"select": [
|
|
41
|
+
{
|
|
42
|
+
"column": [
|
|
43
|
+
{
|
|
44
|
+
"path": "id",
|
|
45
|
+
"name": "id",
|
|
46
|
+
"type": "id"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"path": "value.ofType(string)",
|
|
50
|
+
"name": "string_value",
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"expect": [
|
|
58
|
+
{
|
|
59
|
+
"id": "o1",
|
|
60
|
+
"string_value": "foo"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "o2",
|
|
64
|
+
"string_value": null
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "o3",
|
|
68
|
+
"string_value": null
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"title": "select integer values",
|
|
74
|
+
"tags": ["shareable"],
|
|
75
|
+
"view": {
|
|
76
|
+
"resource": "Observation",
|
|
77
|
+
"status": "active",
|
|
78
|
+
"select": [
|
|
79
|
+
{
|
|
80
|
+
"column": [
|
|
81
|
+
{
|
|
82
|
+
"path": "id",
|
|
83
|
+
"name": "id",
|
|
84
|
+
"type": "id"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"path": "value.ofType(integer)",
|
|
88
|
+
"name": "integer_value",
|
|
89
|
+
"type": "integer"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"expect": [
|
|
96
|
+
{
|
|
97
|
+
"id": "o1",
|
|
98
|
+
"integer_value": null
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "o2",
|
|
102
|
+
"integer_value": 42
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "o3",
|
|
106
|
+
"integer_value": null
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "fn_reference_keys",
|
|
3
|
+
"description": "TBD",
|
|
4
|
+
"fhirVersion": ["5.0.0", "4.0.1", "3.0.2"],
|
|
5
|
+
"resources": [
|
|
6
|
+
{
|
|
7
|
+
"resourceType": "Patient",
|
|
8
|
+
"id": "p1",
|
|
9
|
+
"link": [
|
|
10
|
+
{
|
|
11
|
+
"other": {
|
|
12
|
+
"reference": "Patient/p1"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"resourceType": "Patient",
|
|
19
|
+
"id": "p2",
|
|
20
|
+
"link": [
|
|
21
|
+
{
|
|
22
|
+
"other": {
|
|
23
|
+
"reference": "Patient/p3"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"tests": [
|
|
30
|
+
{
|
|
31
|
+
"title": "getReferenceKey result matches getResourceKey without type specifier",
|
|
32
|
+
"tags": ["shareable"],
|
|
33
|
+
"view": {
|
|
34
|
+
"resource": "Patient",
|
|
35
|
+
"select": [
|
|
36
|
+
{
|
|
37
|
+
"column": [
|
|
38
|
+
{
|
|
39
|
+
"path": "getResourceKey() = link.other.getReferenceKey()",
|
|
40
|
+
"name": "key_equal_ref",
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"expect": [
|
|
48
|
+
{
|
|
49
|
+
"key_equal_ref": true
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"key_equal_ref": false
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"title": "getReferenceKey result matches getResourceKey with right type specifier",
|
|
58
|
+
"tags": ["shareable"],
|
|
59
|
+
"view": {
|
|
60
|
+
"resource": "Patient",
|
|
61
|
+
"select": [
|
|
62
|
+
{
|
|
63
|
+
"column": [
|
|
64
|
+
{
|
|
65
|
+
"path": "getResourceKey() = link.other.getReferenceKey(Patient)",
|
|
66
|
+
"name": "key_equal_ref",
|
|
67
|
+
"type": "boolean"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"expect": [
|
|
74
|
+
{
|
|
75
|
+
"key_equal_ref": true
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"key_equal_ref": false
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"title": "getReferenceKey result matches getResourceKey with wrong type specifier",
|
|
84
|
+
"tags": ["shareable"],
|
|
85
|
+
"view": {
|
|
86
|
+
"resource": "Patient",
|
|
87
|
+
"select": [
|
|
88
|
+
{
|
|
89
|
+
"column": [
|
|
90
|
+
{
|
|
91
|
+
"path": "getResourceKey() = link.other.getReferenceKey(Observation)",
|
|
92
|
+
"name": "key_equal_ref",
|
|
93
|
+
"type": "boolean"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"expect": [
|
|
100
|
+
{
|
|
101
|
+
"key_equal_ref": null
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"key_equal_ref": null
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|