conceptql 0.6.0 → 0.7.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +176 -0
- data/README.md +4 -2
- data/assets/diagram/diagram.css +331 -0
- data/assets/diagram/fonts/OFL.txt +93 -0
- data/assets/diagram/fonts/Roboto-400.ttf +0 -0
- data/assets/diagram/fonts/Roboto-700.ttf +0 -0
- data/assets/diagram/fonts/Roboto-Italic-400.ttf +0 -0
- data/assets/diagram/fonts/Roboto-Italic-Latin.woff2 +0 -0
- data/assets/diagram/fonts/Roboto-Normal-Latin.woff2 +0 -0
- data/assets/diagram/operators.svg +224 -0
- data/config/vocabularies.csv +85 -85
- data/docs/spec/README.md +2624 -0
- data/docs/spec/examples/after-operator.json +562 -0
- data/docs/spec/examples/any-overlap-operator.json +106 -0
- data/docs/spec/examples/before-operator.json +437 -0
- data/docs/spec/examples/co-reported-operator.json +168 -0
- data/docs/spec/examples/contains-operator.json +97 -0
- data/docs/spec/examples/date-range-operator.json +275 -0
- data/docs/spec/examples/death-operator.json +103 -0
- data/docs/spec/examples/during-operator.json +178 -0
- data/docs/spec/examples/episode-operator.json +80 -0
- data/docs/spec/examples/equal-operator.json +79 -0
- data/docs/spec/examples/ethnicity-operator.json +86 -0
- data/docs/spec/examples/except-operator.json +536 -0
- data/docs/spec/examples/filter-operator.json +218 -0
- data/docs/spec/examples/first-operator.json +148 -0
- data/docs/spec/examples/gender-operator.json +257 -0
- data/docs/spec/examples/hospice-operator.json +40 -0
- data/docs/spec/examples/hospitalization-operator.json +131 -0
- data/docs/spec/examples/information-periods-operator.json +131 -0
- data/docs/spec/examples/last-operator.json +148 -0
- data/docs/spec/examples/match-operator.json +186 -0
- data/docs/spec/examples/nth-occurrence-operator.json +300 -0
- data/docs/spec/examples/numeric-filter-operator.json +77 -0
- data/docs/spec/examples/one-in-two-out-operator.json +158 -0
- data/docs/spec/examples/person-filter-operator.json +919 -0
- data/docs/spec/examples/person-operator.json +274 -0
- data/docs/spec/examples/place-of-service-filter-operator.json +57 -0
- data/docs/spec/examples/provenance-operator.json +148 -0
- data/docs/spec/examples/provider-filter-operator.json +77 -0
- data/docs/spec/examples/race-operator.json +131 -0
- data/docs/spec/examples/recall-operator.json +289 -0
- data/docs/spec/examples/snf-operator.json +40 -0
- data/docs/spec/examples/time-window-operator.json +736 -0
- data/docs/spec/examples/trim-date-end-operator.json +201 -0
- data/docs/spec/examples/trim-date-start-operator.json +201 -0
- data/docs/spec/examples/union-operator.json +547 -0
- data/docs/spec/examples/vocabulary-operator.json +232 -0
- data/lib/conceptql/behaviors/metadatable.rb +68 -2
- data/lib/conceptql/behaviors/provenanceable.rb +4 -1
- data/lib/conceptql/behaviors/utilizable.rb +3 -0
- data/lib/conceptql/code_case_mismatch_error.rb +50 -0
- data/lib/conceptql/data_model/gdm.rb +23 -2
- data/lib/conceptql/diagram_renderer/app.rb +59 -0
- data/lib/conceptql/diagram_renderer/configuration.rb +87 -0
- data/lib/conceptql/diagram_renderer/diagram_data.rb +80 -0
- data/lib/conceptql/diagram_renderer/drawing.rb +255 -0
- data/lib/conceptql/diagram_renderer/geometry.rb +380 -0
- data/lib/conceptql/diagram_renderer/input_error.rb +11 -0
- data/lib/conceptql/diagram_renderer/js_format.rb +112 -0
- data/lib/conceptql/diagram_renderer/resvg.rb +120 -0
- data/lib/conceptql/diagram_renderer/sprite.rb +73 -0
- data/lib/conceptql/diagram_renderer/static.rb +70 -0
- data/lib/conceptql/diagram_renderer/svg.rb +73 -0
- data/lib/conceptql/diagram_renderer/tree_layout.rb +287 -0
- data/lib/conceptql/diagram_renderer.rb +82 -0
- data/lib/conceptql/lexicon/lexicon_strategy.rb +16 -0
- data/lib/conceptql/lexicon.rb +63 -11
- data/lib/conceptql/nodifier.rb +5 -3
- data/lib/conceptql/operators/after.rb +15 -1
- data/lib/conceptql/operators/any_overlap.rb +6 -1
- data/lib/conceptql/operators/before.rb +11 -1
- data/lib/conceptql/operators/binary_operator_operator.rb +12 -2
- data/lib/conceptql/operators/co_reported.rb +9 -4
- data/lib/conceptql/operators/contains.rb +6 -1
- data/lib/conceptql/operators/count.rb +2 -0
- data/lib/conceptql/operators/date_range.rb +15 -3
- data/lib/conceptql/operators/death.rb +5 -1
- data/lib/conceptql/operators/dedup.rb +2 -0
- data/lib/conceptql/operators/during.rb +6 -1
- data/lib/conceptql/operators/episode.rb +13 -2
- data/lib/conceptql/operators/equal.rb +11 -1
- data/lib/conceptql/operators/ethnicity.rb +19 -7
- data/lib/conceptql/operators/except.rb +10 -1
- data/lib/conceptql/operators/filter.rb +6 -1
- data/lib/conceptql/operators/first.rb +19 -9
- data/lib/conceptql/operators/from.rb +3 -0
- data/lib/conceptql/operators/gender.rb +10 -2
- data/lib/conceptql/operators/hospice.rb +7 -1
- data/lib/conceptql/operators/hospitalization.rb +6 -1
- data/lib/conceptql/operators/information_periods.rb +26 -7
- data/lib/conceptql/operators/invalid.rb +4 -0
- data/lib/conceptql/operators/last.rb +19 -9
- data/lib/conceptql/operators/match.rb +6 -1
- data/lib/conceptql/operators/multiple_vocabularies.rb +17 -3
- data/lib/conceptql/operators/numeric.rb +4 -0
- data/lib/conceptql/operators/numeric_filter.rb +13 -3
- data/lib/conceptql/operators/occurrence.rb +33 -12
- data/lib/conceptql/operators/one_in_two_out.rb +22 -5
- data/lib/conceptql/operators/operator.rb +8 -4
- data/lib/conceptql/operators/person.rb +5 -1
- data/lib/conceptql/operators/person_filter.rb +14 -1
- data/lib/conceptql/operators/place_of_service_filter.rb +14 -3
- data/lib/conceptql/operators/provenance.rb +17 -8
- data/lib/conceptql/operators/provider_filter.rb +18 -6
- data/lib/conceptql/operators/race.rb +14 -9
- data/lib/conceptql/operators/read.rb +11 -1
- data/lib/conceptql/operators/recall.rb +34 -2
- data/lib/conceptql/operators/snf.rb +7 -1
- data/lib/conceptql/operators/sum.rb +4 -0
- data/lib/conceptql/operators/temporal_operator.rb +4 -2
- data/lib/conceptql/operators/time_window.rb +27 -4
- data/lib/conceptql/operators/trim_date.rb +6 -14
- data/lib/conceptql/operators/trim_date_end.rb +9 -3
- data/lib/conceptql/operators/trim_date_start.rb +9 -3
- data/lib/conceptql/operators/union.rb +13 -1
- data/lib/conceptql/operators/vocabulary.rb +80 -6
- data/lib/conceptql/paths.rb +9 -1
- data/lib/conceptql/version.rb +1 -1
- data/lib/conceptql/vocabularies/drg_systems.rb +3 -2
- data/lib/conceptql/vocabularies/entry.rb +14 -11
- data/lib/conceptql/vocabularies/vocabulary_class_factory.rb +2 -1
- data/lib/conceptql.rb +3 -0
- metadata +75 -2
- data/doc/spec.md +0 -2091
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "filter-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "MIs that are a patient's first diagnosis of MI or diabetes",
|
|
6
|
+
"statement": [
|
|
7
|
+
"filter",
|
|
8
|
+
{
|
|
9
|
+
"left": ["icd9", "412"],
|
|
10
|
+
"right": ["first", ["union", ["icd9", "412"], ["icd9", "250.01"]]]
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"help": true,
|
|
14
|
+
"columns": [
|
|
15
|
+
"person_id",
|
|
16
|
+
"criterion_id",
|
|
17
|
+
"criterion_table",
|
|
18
|
+
"criterion_domain",
|
|
19
|
+
"start_date",
|
|
20
|
+
"end_date",
|
|
21
|
+
"source_value"
|
|
22
|
+
],
|
|
23
|
+
"rows": [
|
|
24
|
+
[
|
|
25
|
+
11,
|
|
26
|
+
82614,
|
|
27
|
+
"observations",
|
|
28
|
+
"condition_occurrence",
|
|
29
|
+
"2008-10-29",
|
|
30
|
+
"2008-10-29",
|
|
31
|
+
"412"
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
17,
|
|
35
|
+
27269,
|
|
36
|
+
"observations",
|
|
37
|
+
"condition_occurrence",
|
|
38
|
+
"2008-08-25",
|
|
39
|
+
"2008-08-25",
|
|
40
|
+
"412"
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
38,
|
|
44
|
+
40556,
|
|
45
|
+
"observations",
|
|
46
|
+
"condition_occurrence",
|
|
47
|
+
"2010-02-12",
|
|
48
|
+
"2010-02-12",
|
|
49
|
+
"412"
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
54,
|
|
53
|
+
74606,
|
|
54
|
+
"observations",
|
|
55
|
+
"condition_occurrence",
|
|
56
|
+
"2008-06-05",
|
|
57
|
+
"2008-06-05",
|
|
58
|
+
"412"
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
60,
|
|
62
|
+
986,
|
|
63
|
+
"observations",
|
|
64
|
+
"condition_occurrence",
|
|
65
|
+
"2009-07-19",
|
|
66
|
+
"2009-07-22",
|
|
67
|
+
"412"
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
66,
|
|
71
|
+
16171,
|
|
72
|
+
"observations",
|
|
73
|
+
"condition_occurrence",
|
|
74
|
+
"2009-07-25",
|
|
75
|
+
"2009-07-25",
|
|
76
|
+
"412"
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
73,
|
|
80
|
+
52843,
|
|
81
|
+
"observations",
|
|
82
|
+
"condition_occurrence",
|
|
83
|
+
"2008-11-16",
|
|
84
|
+
"2008-11-16",
|
|
85
|
+
"412"
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
81,
|
|
89
|
+
1405,
|
|
90
|
+
"observations",
|
|
91
|
+
"condition_occurrence",
|
|
92
|
+
"2009-01-28",
|
|
93
|
+
"2009-01-30",
|
|
94
|
+
"412"
|
|
95
|
+
],
|
|
96
|
+
[
|
|
97
|
+
88,
|
|
98
|
+
1572,
|
|
99
|
+
"observations",
|
|
100
|
+
"condition_occurrence",
|
|
101
|
+
"2009-01-03",
|
|
102
|
+
"2009-01-09",
|
|
103
|
+
"412"
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
90,
|
|
107
|
+
33940,
|
|
108
|
+
"observations",
|
|
109
|
+
"condition_occurrence",
|
|
110
|
+
"2010-05-26",
|
|
111
|
+
"2010-05-26",
|
|
112
|
+
"412"
|
|
113
|
+
]
|
|
114
|
+
],
|
|
115
|
+
"tree": {
|
|
116
|
+
"format": "conceptql-diagram/v1",
|
|
117
|
+
"statements": [
|
|
118
|
+
{
|
|
119
|
+
"name": "filter",
|
|
120
|
+
"base": "filter",
|
|
121
|
+
"humanName": "Filter",
|
|
122
|
+
"outputTypes": ["condition_occurrence"],
|
|
123
|
+
"parameters": {},
|
|
124
|
+
"values": [],
|
|
125
|
+
"children": [
|
|
126
|
+
{
|
|
127
|
+
"name": "icd9",
|
|
128
|
+
"base": "selection",
|
|
129
|
+
"humanName": "ICD-9 CM",
|
|
130
|
+
"vocabularyId": "ICD9CM",
|
|
131
|
+
"outputTypes": ["condition_occurrence"],
|
|
132
|
+
"parameters": {},
|
|
133
|
+
"values": ["412"],
|
|
134
|
+
"children": [],
|
|
135
|
+
"counts": {
|
|
136
|
+
"condition_occurrence": {
|
|
137
|
+
"rows": 48,
|
|
138
|
+
"n": 37
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "first",
|
|
144
|
+
"base": "temporal",
|
|
145
|
+
"humanName": "First",
|
|
146
|
+
"outputTypes": ["condition_occurrence"],
|
|
147
|
+
"parameters": {},
|
|
148
|
+
"values": [],
|
|
149
|
+
"children": [
|
|
150
|
+
{
|
|
151
|
+
"name": "union",
|
|
152
|
+
"base": "set",
|
|
153
|
+
"humanName": "Union",
|
|
154
|
+
"outputTypes": ["condition_occurrence"],
|
|
155
|
+
"parameters": {},
|
|
156
|
+
"values": [],
|
|
157
|
+
"children": [
|
|
158
|
+
{
|
|
159
|
+
"name": "icd9",
|
|
160
|
+
"base": "selection",
|
|
161
|
+
"humanName": "ICD-9 CM",
|
|
162
|
+
"vocabularyId": "ICD9CM",
|
|
163
|
+
"outputTypes": ["condition_occurrence"],
|
|
164
|
+
"parameters": {},
|
|
165
|
+
"values": ["412"],
|
|
166
|
+
"children": [],
|
|
167
|
+
"counts": {
|
|
168
|
+
"condition_occurrence": {
|
|
169
|
+
"rows": 48,
|
|
170
|
+
"n": 37
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "icd9",
|
|
176
|
+
"base": "selection",
|
|
177
|
+
"humanName": "ICD-9 CM",
|
|
178
|
+
"vocabularyId": "ICD9CM",
|
|
179
|
+
"outputTypes": ["condition_occurrence"],
|
|
180
|
+
"parameters": {},
|
|
181
|
+
"values": ["250.01"],
|
|
182
|
+
"children": [],
|
|
183
|
+
"counts": {
|
|
184
|
+
"condition_occurrence": {
|
|
185
|
+
"rows": 82,
|
|
186
|
+
"n": 45
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"counts": {
|
|
192
|
+
"condition_occurrence": {
|
|
193
|
+
"rows": 130,
|
|
194
|
+
"n": 68
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"counts": {
|
|
200
|
+
"condition_occurrence": {
|
|
201
|
+
"rows": 68,
|
|
202
|
+
"n": 68
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"counts": {
|
|
208
|
+
"condition_occurrence": {
|
|
209
|
+
"rows": 32,
|
|
210
|
+
"n": 32
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "first-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "For each patient, select the Condition that represents the first occurrence of an MI",
|
|
6
|
+
"statement": ["first", ["icd9", "412"]],
|
|
7
|
+
"help": true,
|
|
8
|
+
"columns": [
|
|
9
|
+
"person_id",
|
|
10
|
+
"criterion_id",
|
|
11
|
+
"criterion_table",
|
|
12
|
+
"criterion_domain",
|
|
13
|
+
"start_date",
|
|
14
|
+
"end_date",
|
|
15
|
+
"source_value"
|
|
16
|
+
],
|
|
17
|
+
"rows": [
|
|
18
|
+
[
|
|
19
|
+
11,
|
|
20
|
+
82614,
|
|
21
|
+
"observations",
|
|
22
|
+
"condition_occurrence",
|
|
23
|
+
"2008-10-29",
|
|
24
|
+
"2008-10-29",
|
|
25
|
+
"412"
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
17,
|
|
29
|
+
27269,
|
|
30
|
+
"observations",
|
|
31
|
+
"condition_occurrence",
|
|
32
|
+
"2008-08-25",
|
|
33
|
+
"2008-08-25",
|
|
34
|
+
"412"
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
38,
|
|
38
|
+
40556,
|
|
39
|
+
"observations",
|
|
40
|
+
"condition_occurrence",
|
|
41
|
+
"2010-02-12",
|
|
42
|
+
"2010-02-12",
|
|
43
|
+
"412"
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
54,
|
|
47
|
+
74606,
|
|
48
|
+
"observations",
|
|
49
|
+
"condition_occurrence",
|
|
50
|
+
"2008-06-05",
|
|
51
|
+
"2008-06-05",
|
|
52
|
+
"412"
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
60,
|
|
56
|
+
986,
|
|
57
|
+
"observations",
|
|
58
|
+
"condition_occurrence",
|
|
59
|
+
"2009-07-19",
|
|
60
|
+
"2009-07-22",
|
|
61
|
+
"412"
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
66,
|
|
65
|
+
16171,
|
|
66
|
+
"observations",
|
|
67
|
+
"condition_occurrence",
|
|
68
|
+
"2009-07-25",
|
|
69
|
+
"2009-07-25",
|
|
70
|
+
"412"
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
73,
|
|
74
|
+
52843,
|
|
75
|
+
"observations",
|
|
76
|
+
"condition_occurrence",
|
|
77
|
+
"2008-11-16",
|
|
78
|
+
"2008-11-16",
|
|
79
|
+
"412"
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
77,
|
|
83
|
+
58165,
|
|
84
|
+
"observations",
|
|
85
|
+
"condition_occurrence",
|
|
86
|
+
"2010-10-06",
|
|
87
|
+
"2010-10-06",
|
|
88
|
+
"412"
|
|
89
|
+
],
|
|
90
|
+
[
|
|
91
|
+
81,
|
|
92
|
+
1405,
|
|
93
|
+
"observations",
|
|
94
|
+
"condition_occurrence",
|
|
95
|
+
"2009-01-28",
|
|
96
|
+
"2009-01-30",
|
|
97
|
+
"412"
|
|
98
|
+
],
|
|
99
|
+
[
|
|
100
|
+
88,
|
|
101
|
+
1572,
|
|
102
|
+
"observations",
|
|
103
|
+
"condition_occurrence",
|
|
104
|
+
"2009-01-03",
|
|
105
|
+
"2009-01-09",
|
|
106
|
+
"412"
|
|
107
|
+
]
|
|
108
|
+
],
|
|
109
|
+
"tree": {
|
|
110
|
+
"format": "conceptql-diagram/v1",
|
|
111
|
+
"statements": [
|
|
112
|
+
{
|
|
113
|
+
"name": "first",
|
|
114
|
+
"base": "temporal",
|
|
115
|
+
"humanName": "First",
|
|
116
|
+
"outputTypes": ["condition_occurrence"],
|
|
117
|
+
"parameters": {},
|
|
118
|
+
"values": [],
|
|
119
|
+
"children": [
|
|
120
|
+
{
|
|
121
|
+
"name": "icd9",
|
|
122
|
+
"base": "selection",
|
|
123
|
+
"humanName": "ICD-9 CM",
|
|
124
|
+
"vocabularyId": "ICD9CM",
|
|
125
|
+
"outputTypes": ["condition_occurrence"],
|
|
126
|
+
"parameters": {},
|
|
127
|
+
"values": ["412"],
|
|
128
|
+
"children": [],
|
|
129
|
+
"counts": {
|
|
130
|
+
"condition_occurrence": {
|
|
131
|
+
"rows": 48,
|
|
132
|
+
"n": 37
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"counts": {
|
|
138
|
+
"condition_occurrence": {
|
|
139
|
+
"rows": 37,
|
|
140
|
+
"n": 37
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "gender-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "All female patients",
|
|
6
|
+
"statement": ["gender", "Female"],
|
|
7
|
+
"help": true,
|
|
8
|
+
"columns": [
|
|
9
|
+
"person_id",
|
|
10
|
+
"criterion_id",
|
|
11
|
+
"criterion_table",
|
|
12
|
+
"criterion_domain",
|
|
13
|
+
"start_date",
|
|
14
|
+
"end_date",
|
|
15
|
+
"source_value"
|
|
16
|
+
],
|
|
17
|
+
"rows": [
|
|
18
|
+
[
|
|
19
|
+
3,
|
|
20
|
+
3,
|
|
21
|
+
"patients",
|
|
22
|
+
"person",
|
|
23
|
+
"1936-09-01",
|
|
24
|
+
"1936-09-01",
|
|
25
|
+
"0001FDD721E223DC"
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
9,
|
|
29
|
+
9,
|
|
30
|
+
"patients",
|
|
31
|
+
"person",
|
|
32
|
+
"1976-09-01",
|
|
33
|
+
"1976-09-01",
|
|
34
|
+
"000345A39D4157C9"
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
10,
|
|
38
|
+
10,
|
|
39
|
+
"patients",
|
|
40
|
+
"person",
|
|
41
|
+
"1938-10-01",
|
|
42
|
+
"1938-10-01",
|
|
43
|
+
"00036A21B65B0206"
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
11,
|
|
47
|
+
11,
|
|
48
|
+
"patients",
|
|
49
|
+
"person",
|
|
50
|
+
"1934-02-01",
|
|
51
|
+
"1934-02-01",
|
|
52
|
+
"000489E7EAAD463F"
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
13,
|
|
56
|
+
13,
|
|
57
|
+
"patients",
|
|
58
|
+
"person",
|
|
59
|
+
"1936-07-01",
|
|
60
|
+
"1936-07-01",
|
|
61
|
+
"0004F0ABD505251D"
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
15,
|
|
65
|
+
15,
|
|
66
|
+
"patients",
|
|
67
|
+
"person",
|
|
68
|
+
"1936-03-01",
|
|
69
|
+
"1936-03-01",
|
|
70
|
+
"00070B63745BE497"
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
17,
|
|
74
|
+
17,
|
|
75
|
+
"patients",
|
|
76
|
+
"person",
|
|
77
|
+
"1919-09-01",
|
|
78
|
+
"1919-09-01",
|
|
79
|
+
"0007F12A492FD25D"
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
18,
|
|
83
|
+
18,
|
|
84
|
+
"patients",
|
|
85
|
+
"person",
|
|
86
|
+
"1919-10-01",
|
|
87
|
+
"1919-10-01",
|
|
88
|
+
"000A005BA0BED3EA"
|
|
89
|
+
],
|
|
90
|
+
[
|
|
91
|
+
19,
|
|
92
|
+
19,
|
|
93
|
+
"patients",
|
|
94
|
+
"person",
|
|
95
|
+
"1942-07-01",
|
|
96
|
+
"1942-07-01",
|
|
97
|
+
"000B4662348C35B4"
|
|
98
|
+
],
|
|
99
|
+
[
|
|
100
|
+
26,
|
|
101
|
+
26,
|
|
102
|
+
"patients",
|
|
103
|
+
"person",
|
|
104
|
+
"1939-12-01",
|
|
105
|
+
"1939-12-01",
|
|
106
|
+
"0010D6F80D245D62"
|
|
107
|
+
]
|
|
108
|
+
],
|
|
109
|
+
"tree": {
|
|
110
|
+
"format": "conceptql-diagram/v1",
|
|
111
|
+
"statements": [
|
|
112
|
+
{
|
|
113
|
+
"name": "gender",
|
|
114
|
+
"base": "selection",
|
|
115
|
+
"humanName": "Gender",
|
|
116
|
+
"outputTypes": ["person"],
|
|
117
|
+
"parameters": {},
|
|
118
|
+
"values": ["Female"],
|
|
119
|
+
"children": [],
|
|
120
|
+
"counts": {
|
|
121
|
+
"person": {
|
|
122
|
+
"rows": 125,
|
|
123
|
+
"n": 125
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"title": "All male patients",
|
|
132
|
+
"statement": ["gender", "Male"],
|
|
133
|
+
"help": true,
|
|
134
|
+
"columns": [
|
|
135
|
+
"person_id",
|
|
136
|
+
"criterion_id",
|
|
137
|
+
"criterion_table",
|
|
138
|
+
"criterion_domain",
|
|
139
|
+
"start_date",
|
|
140
|
+
"end_date",
|
|
141
|
+
"source_value"
|
|
142
|
+
],
|
|
143
|
+
"rows": [
|
|
144
|
+
[
|
|
145
|
+
1,
|
|
146
|
+
1,
|
|
147
|
+
"patients",
|
|
148
|
+
"person",
|
|
149
|
+
"1923-05-01",
|
|
150
|
+
"1923-05-01",
|
|
151
|
+
"00013D2EFD8E45D1"
|
|
152
|
+
],
|
|
153
|
+
[
|
|
154
|
+
2,
|
|
155
|
+
2,
|
|
156
|
+
"patients",
|
|
157
|
+
"person",
|
|
158
|
+
"1943-01-01",
|
|
159
|
+
"1943-01-01",
|
|
160
|
+
"00016F745862898F"
|
|
161
|
+
],
|
|
162
|
+
[
|
|
163
|
+
4,
|
|
164
|
+
4,
|
|
165
|
+
"patients",
|
|
166
|
+
"person",
|
|
167
|
+
"1941-06-01",
|
|
168
|
+
"1941-06-01",
|
|
169
|
+
"00021CA6FF03E670"
|
|
170
|
+
],
|
|
171
|
+
[
|
|
172
|
+
5,
|
|
173
|
+
5,
|
|
174
|
+
"patients",
|
|
175
|
+
"person",
|
|
176
|
+
"1936-08-01",
|
|
177
|
+
"1936-08-01",
|
|
178
|
+
"00024B3D2352D2D0"
|
|
179
|
+
],
|
|
180
|
+
[
|
|
181
|
+
6,
|
|
182
|
+
6,
|
|
183
|
+
"patients",
|
|
184
|
+
"person",
|
|
185
|
+
"1943-10-01",
|
|
186
|
+
"1943-10-01",
|
|
187
|
+
"0002DAE1C81CC70D"
|
|
188
|
+
],
|
|
189
|
+
[
|
|
190
|
+
7,
|
|
191
|
+
7,
|
|
192
|
+
"patients",
|
|
193
|
+
"person",
|
|
194
|
+
"1922-07-01",
|
|
195
|
+
"1922-07-01",
|
|
196
|
+
"0002F28CE057345B"
|
|
197
|
+
],
|
|
198
|
+
[
|
|
199
|
+
8,
|
|
200
|
+
8,
|
|
201
|
+
"patients",
|
|
202
|
+
"person",
|
|
203
|
+
"1935-09-01",
|
|
204
|
+
"1935-09-01",
|
|
205
|
+
"000308435E3E5B76"
|
|
206
|
+
],
|
|
207
|
+
[
|
|
208
|
+
12,
|
|
209
|
+
12,
|
|
210
|
+
"patients",
|
|
211
|
+
"person",
|
|
212
|
+
"1929-06-01",
|
|
213
|
+
"1929-06-01",
|
|
214
|
+
"00048EF1F4791C68"
|
|
215
|
+
],
|
|
216
|
+
[
|
|
217
|
+
14,
|
|
218
|
+
14,
|
|
219
|
+
"patients",
|
|
220
|
+
"person",
|
|
221
|
+
"1934-05-01",
|
|
222
|
+
"1934-05-01",
|
|
223
|
+
"00052705243EA128"
|
|
224
|
+
],
|
|
225
|
+
[
|
|
226
|
+
16,
|
|
227
|
+
16,
|
|
228
|
+
"patients",
|
|
229
|
+
"person",
|
|
230
|
+
"1934-01-01",
|
|
231
|
+
"1934-01-01",
|
|
232
|
+
"0007E57CC13CE880"
|
|
233
|
+
]
|
|
234
|
+
],
|
|
235
|
+
"tree": {
|
|
236
|
+
"format": "conceptql-diagram/v1",
|
|
237
|
+
"statements": [
|
|
238
|
+
{
|
|
239
|
+
"name": "gender",
|
|
240
|
+
"base": "selection",
|
|
241
|
+
"humanName": "Gender",
|
|
242
|
+
"outputTypes": ["person"],
|
|
243
|
+
"parameters": {},
|
|
244
|
+
"values": ["Male"],
|
|
245
|
+
"children": [],
|
|
246
|
+
"counts": {
|
|
247
|
+
"person": {
|
|
248
|
+
"rows": 124,
|
|
249
|
+
"n": 124
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "hospice-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "All hospice admissions",
|
|
6
|
+
"statement": ["hospice"],
|
|
7
|
+
"help": false,
|
|
8
|
+
"columns": [
|
|
9
|
+
"person_id",
|
|
10
|
+
"criterion_id",
|
|
11
|
+
"criterion_table",
|
|
12
|
+
"criterion_domain",
|
|
13
|
+
"start_date",
|
|
14
|
+
"end_date",
|
|
15
|
+
"source_value"
|
|
16
|
+
],
|
|
17
|
+
"rows": [],
|
|
18
|
+
"tree": {
|
|
19
|
+
"format": "conceptql-diagram/v1",
|
|
20
|
+
"statements": [
|
|
21
|
+
{
|
|
22
|
+
"name": "hospice",
|
|
23
|
+
"base": "selection",
|
|
24
|
+
"humanName": "Hospice",
|
|
25
|
+
"outputTypes": ["condition_occurrence"],
|
|
26
|
+
"parameters": {},
|
|
27
|
+
"values": [],
|
|
28
|
+
"children": [],
|
|
29
|
+
"counts": {
|
|
30
|
+
"condition_occurrence": {
|
|
31
|
+
"rows": 0,
|
|
32
|
+
"n": 0
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|