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,275 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "date-range-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "Each patient, with the dates of the year 2010",
|
|
6
|
+
"statement": [
|
|
7
|
+
"date_range",
|
|
8
|
+
{
|
|
9
|
+
"start": "2010-01-01",
|
|
10
|
+
"end": "2010-12-31"
|
|
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
|
+
1,
|
|
26
|
+
1,
|
|
27
|
+
"patients",
|
|
28
|
+
"person",
|
|
29
|
+
"2010-01-01",
|
|
30
|
+
"2010-12-31",
|
|
31
|
+
"00013D2EFD8E45D1"
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
2,
|
|
35
|
+
2,
|
|
36
|
+
"patients",
|
|
37
|
+
"person",
|
|
38
|
+
"2010-01-01",
|
|
39
|
+
"2010-12-31",
|
|
40
|
+
"00016F745862898F"
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
3,
|
|
44
|
+
3,
|
|
45
|
+
"patients",
|
|
46
|
+
"person",
|
|
47
|
+
"2010-01-01",
|
|
48
|
+
"2010-12-31",
|
|
49
|
+
"0001FDD721E223DC"
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
4,
|
|
53
|
+
4,
|
|
54
|
+
"patients",
|
|
55
|
+
"person",
|
|
56
|
+
"2010-01-01",
|
|
57
|
+
"2010-12-31",
|
|
58
|
+
"00021CA6FF03E670"
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
5,
|
|
62
|
+
5,
|
|
63
|
+
"patients",
|
|
64
|
+
"person",
|
|
65
|
+
"2010-01-01",
|
|
66
|
+
"2010-12-31",
|
|
67
|
+
"00024B3D2352D2D0"
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
6,
|
|
71
|
+
6,
|
|
72
|
+
"patients",
|
|
73
|
+
"person",
|
|
74
|
+
"2010-01-01",
|
|
75
|
+
"2010-12-31",
|
|
76
|
+
"0002DAE1C81CC70D"
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
7,
|
|
80
|
+
7,
|
|
81
|
+
"patients",
|
|
82
|
+
"person",
|
|
83
|
+
"2010-01-01",
|
|
84
|
+
"2010-12-31",
|
|
85
|
+
"0002F28CE057345B"
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
8,
|
|
89
|
+
8,
|
|
90
|
+
"patients",
|
|
91
|
+
"person",
|
|
92
|
+
"2010-01-01",
|
|
93
|
+
"2010-12-31",
|
|
94
|
+
"000308435E3E5B76"
|
|
95
|
+
],
|
|
96
|
+
[
|
|
97
|
+
9,
|
|
98
|
+
9,
|
|
99
|
+
"patients",
|
|
100
|
+
"person",
|
|
101
|
+
"2010-01-01",
|
|
102
|
+
"2010-12-31",
|
|
103
|
+
"000345A39D4157C9"
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
10,
|
|
107
|
+
10,
|
|
108
|
+
"patients",
|
|
109
|
+
"person",
|
|
110
|
+
"2010-01-01",
|
|
111
|
+
"2010-12-31",
|
|
112
|
+
"00036A21B65B0206"
|
|
113
|
+
]
|
|
114
|
+
],
|
|
115
|
+
"tree": {
|
|
116
|
+
"format": "conceptql-diagram/v1",
|
|
117
|
+
"statements": [
|
|
118
|
+
{
|
|
119
|
+
"name": "date_range",
|
|
120
|
+
"base": "selection",
|
|
121
|
+
"humanName": "Date Range",
|
|
122
|
+
"outputTypes": ["person"],
|
|
123
|
+
"parameters": {
|
|
124
|
+
"start": "2010-01-01",
|
|
125
|
+
"end": "2010-12-31"
|
|
126
|
+
},
|
|
127
|
+
"values": [],
|
|
128
|
+
"children": [],
|
|
129
|
+
"counts": {
|
|
130
|
+
"person": {
|
|
131
|
+
"rows": 249,
|
|
132
|
+
"n": 249
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"title": "Each patient, with the dates from the start to the end of the data",
|
|
141
|
+
"statement": [
|
|
142
|
+
"date_range",
|
|
143
|
+
{
|
|
144
|
+
"start": "START",
|
|
145
|
+
"end": "END"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"help": true,
|
|
149
|
+
"columns": [
|
|
150
|
+
"person_id",
|
|
151
|
+
"criterion_id",
|
|
152
|
+
"criterion_table",
|
|
153
|
+
"criterion_domain",
|
|
154
|
+
"start_date",
|
|
155
|
+
"end_date",
|
|
156
|
+
"source_value"
|
|
157
|
+
],
|
|
158
|
+
"rows": [
|
|
159
|
+
[
|
|
160
|
+
1,
|
|
161
|
+
1,
|
|
162
|
+
"patients",
|
|
163
|
+
"person",
|
|
164
|
+
"2008-01-01",
|
|
165
|
+
"2010-12-31",
|
|
166
|
+
"00013D2EFD8E45D1"
|
|
167
|
+
],
|
|
168
|
+
[
|
|
169
|
+
2,
|
|
170
|
+
2,
|
|
171
|
+
"patients",
|
|
172
|
+
"person",
|
|
173
|
+
"2008-01-01",
|
|
174
|
+
"2010-12-31",
|
|
175
|
+
"00016F745862898F"
|
|
176
|
+
],
|
|
177
|
+
[
|
|
178
|
+
3,
|
|
179
|
+
3,
|
|
180
|
+
"patients",
|
|
181
|
+
"person",
|
|
182
|
+
"2008-01-01",
|
|
183
|
+
"2010-12-31",
|
|
184
|
+
"0001FDD721E223DC"
|
|
185
|
+
],
|
|
186
|
+
[
|
|
187
|
+
4,
|
|
188
|
+
4,
|
|
189
|
+
"patients",
|
|
190
|
+
"person",
|
|
191
|
+
"2008-01-01",
|
|
192
|
+
"2010-12-31",
|
|
193
|
+
"00021CA6FF03E670"
|
|
194
|
+
],
|
|
195
|
+
[
|
|
196
|
+
5,
|
|
197
|
+
5,
|
|
198
|
+
"patients",
|
|
199
|
+
"person",
|
|
200
|
+
"2008-01-01",
|
|
201
|
+
"2010-12-31",
|
|
202
|
+
"00024B3D2352D2D0"
|
|
203
|
+
],
|
|
204
|
+
[
|
|
205
|
+
6,
|
|
206
|
+
6,
|
|
207
|
+
"patients",
|
|
208
|
+
"person",
|
|
209
|
+
"2008-01-01",
|
|
210
|
+
"2010-12-31",
|
|
211
|
+
"0002DAE1C81CC70D"
|
|
212
|
+
],
|
|
213
|
+
[
|
|
214
|
+
7,
|
|
215
|
+
7,
|
|
216
|
+
"patients",
|
|
217
|
+
"person",
|
|
218
|
+
"2008-01-01",
|
|
219
|
+
"2010-12-31",
|
|
220
|
+
"0002F28CE057345B"
|
|
221
|
+
],
|
|
222
|
+
[
|
|
223
|
+
8,
|
|
224
|
+
8,
|
|
225
|
+
"patients",
|
|
226
|
+
"person",
|
|
227
|
+
"2008-01-01",
|
|
228
|
+
"2010-12-31",
|
|
229
|
+
"000308435E3E5B76"
|
|
230
|
+
],
|
|
231
|
+
[
|
|
232
|
+
9,
|
|
233
|
+
9,
|
|
234
|
+
"patients",
|
|
235
|
+
"person",
|
|
236
|
+
"2008-01-01",
|
|
237
|
+
"2010-12-31",
|
|
238
|
+
"000345A39D4157C9"
|
|
239
|
+
],
|
|
240
|
+
[
|
|
241
|
+
10,
|
|
242
|
+
10,
|
|
243
|
+
"patients",
|
|
244
|
+
"person",
|
|
245
|
+
"2008-01-01",
|
|
246
|
+
"2010-12-31",
|
|
247
|
+
"00036A21B65B0206"
|
|
248
|
+
]
|
|
249
|
+
],
|
|
250
|
+
"tree": {
|
|
251
|
+
"format": "conceptql-diagram/v1",
|
|
252
|
+
"statements": [
|
|
253
|
+
{
|
|
254
|
+
"name": "date_range",
|
|
255
|
+
"base": "selection",
|
|
256
|
+
"humanName": "Date Range",
|
|
257
|
+
"outputTypes": ["person"],
|
|
258
|
+
"parameters": {
|
|
259
|
+
"start": "START",
|
|
260
|
+
"end": "END"
|
|
261
|
+
},
|
|
262
|
+
"values": [],
|
|
263
|
+
"children": [],
|
|
264
|
+
"counts": {
|
|
265
|
+
"person": {
|
|
266
|
+
"rows": 249,
|
|
267
|
+
"n": 249
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "death-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "All death records",
|
|
6
|
+
"statement": ["death"],
|
|
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
|
+
[16, 1, "deaths", "death", "2010-12-01", "2010-12-01", null],
|
|
19
|
+
[26, 2, "deaths", "death", "2009-07-01", "2009-07-01", null],
|
|
20
|
+
[65, 3, "deaths", "death", "2009-01-01", "2009-01-01", null],
|
|
21
|
+
[119, 4, "deaths", "death", "2008-09-01", "2008-09-01", null],
|
|
22
|
+
[166, 5, "deaths", "death", "2008-07-01", "2008-07-01", null],
|
|
23
|
+
[181, 6, "deaths", "death", "2010-07-01", "2010-07-01", null],
|
|
24
|
+
[190, 7, "deaths", "death", "2009-09-01", "2009-09-01", null],
|
|
25
|
+
[191, 8, "deaths", "death", "2009-09-01", "2009-09-01", null],
|
|
26
|
+
[201, 9, "deaths", "death", "2008-05-01", "2008-05-01", null],
|
|
27
|
+
[215, 10, "deaths", "death", "2008-01-01", "2008-01-01", null]
|
|
28
|
+
],
|
|
29
|
+
"tree": {
|
|
30
|
+
"format": "conceptql-diagram/v1",
|
|
31
|
+
"statements": [
|
|
32
|
+
{
|
|
33
|
+
"name": "death",
|
|
34
|
+
"base": "cast",
|
|
35
|
+
"humanName": "Death",
|
|
36
|
+
"outputTypes": ["death"],
|
|
37
|
+
"parameters": {},
|
|
38
|
+
"values": [],
|
|
39
|
+
"children": [],
|
|
40
|
+
"counts": {
|
|
41
|
+
"death": {
|
|
42
|
+
"rows": 10,
|
|
43
|
+
"n": 10
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"title": "The deaths of the patients with an old myocardial infarction (ICD-9-CM 412)",
|
|
52
|
+
"statement": ["death", ["icd9cm", "412"]],
|
|
53
|
+
"help": true,
|
|
54
|
+
"columns": [
|
|
55
|
+
"person_id",
|
|
56
|
+
"criterion_id",
|
|
57
|
+
"criterion_table",
|
|
58
|
+
"criterion_domain",
|
|
59
|
+
"start_date",
|
|
60
|
+
"end_date",
|
|
61
|
+
"source_value"
|
|
62
|
+
],
|
|
63
|
+
"rows": [[190, 7, "deaths", "death", "2009-09-01", "2009-09-01", null]],
|
|
64
|
+
"tree": {
|
|
65
|
+
"format": "conceptql-diagram/v1",
|
|
66
|
+
"statements": [
|
|
67
|
+
{
|
|
68
|
+
"name": "death",
|
|
69
|
+
"base": "cast",
|
|
70
|
+
"humanName": "Death",
|
|
71
|
+
"outputTypes": ["death"],
|
|
72
|
+
"parameters": {},
|
|
73
|
+
"values": [],
|
|
74
|
+
"children": [
|
|
75
|
+
{
|
|
76
|
+
"name": "icd9cm",
|
|
77
|
+
"base": "selection",
|
|
78
|
+
"humanName": "ICD-9 CM",
|
|
79
|
+
"vocabularyId": "ICD9CM",
|
|
80
|
+
"outputTypes": ["condition_occurrence"],
|
|
81
|
+
"parameters": {},
|
|
82
|
+
"values": ["412"],
|
|
83
|
+
"children": [],
|
|
84
|
+
"counts": {
|
|
85
|
+
"condition_occurrence": {
|
|
86
|
+
"rows": 48,
|
|
87
|
+
"n": 37
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"counts": {
|
|
93
|
+
"death": {
|
|
94
|
+
"rows": 1,
|
|
95
|
+
"n": 1
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "during-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "All MIs for the year 2010",
|
|
6
|
+
"statement": [
|
|
7
|
+
"during",
|
|
8
|
+
{
|
|
9
|
+
"left": ["icd9", "412"],
|
|
10
|
+
"right": [
|
|
11
|
+
"date_range",
|
|
12
|
+
{
|
|
13
|
+
"start": "2010-01-01",
|
|
14
|
+
"end": "2010-12-31"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"help": true,
|
|
20
|
+
"columns": [
|
|
21
|
+
"person_id",
|
|
22
|
+
"criterion_id",
|
|
23
|
+
"criterion_table",
|
|
24
|
+
"criterion_domain",
|
|
25
|
+
"start_date",
|
|
26
|
+
"end_date",
|
|
27
|
+
"source_value"
|
|
28
|
+
],
|
|
29
|
+
"rows": [
|
|
30
|
+
[
|
|
31
|
+
38,
|
|
32
|
+
40556,
|
|
33
|
+
"observations",
|
|
34
|
+
"condition_occurrence",
|
|
35
|
+
"2010-02-12",
|
|
36
|
+
"2010-02-12",
|
|
37
|
+
"412"
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
77,
|
|
41
|
+
58165,
|
|
42
|
+
"observations",
|
|
43
|
+
"condition_occurrence",
|
|
44
|
+
"2010-10-06",
|
|
45
|
+
"2010-10-06",
|
|
46
|
+
"412"
|
|
47
|
+
],
|
|
48
|
+
[
|
|
49
|
+
90,
|
|
50
|
+
33940,
|
|
51
|
+
"observations",
|
|
52
|
+
"condition_occurrence",
|
|
53
|
+
"2010-05-26",
|
|
54
|
+
"2010-05-26",
|
|
55
|
+
"412"
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
109,
|
|
59
|
+
89334,
|
|
60
|
+
"observations",
|
|
61
|
+
"condition_occurrence",
|
|
62
|
+
"2010-07-06",
|
|
63
|
+
"2010-07-06",
|
|
64
|
+
"412"
|
|
65
|
+
],
|
|
66
|
+
[
|
|
67
|
+
110,
|
|
68
|
+
62592,
|
|
69
|
+
"observations",
|
|
70
|
+
"condition_occurrence",
|
|
71
|
+
"2010-06-27",
|
|
72
|
+
"2010-06-27",
|
|
73
|
+
"412"
|
|
74
|
+
],
|
|
75
|
+
[
|
|
76
|
+
152,
|
|
77
|
+
84298,
|
|
78
|
+
"observations",
|
|
79
|
+
"condition_occurrence",
|
|
80
|
+
"2010-11-22",
|
|
81
|
+
"2010-11-22",
|
|
82
|
+
"412"
|
|
83
|
+
],
|
|
84
|
+
[
|
|
85
|
+
187,
|
|
86
|
+
87583,
|
|
87
|
+
"observations",
|
|
88
|
+
"condition_occurrence",
|
|
89
|
+
"2010-12-26",
|
|
90
|
+
"2010-12-26",
|
|
91
|
+
"412"
|
|
92
|
+
],
|
|
93
|
+
[
|
|
94
|
+
213,
|
|
95
|
+
15005,
|
|
96
|
+
"observations",
|
|
97
|
+
"condition_occurrence",
|
|
98
|
+
"2010-02-07",
|
|
99
|
+
"2010-02-07",
|
|
100
|
+
"412"
|
|
101
|
+
],
|
|
102
|
+
[
|
|
103
|
+
217,
|
|
104
|
+
56467,
|
|
105
|
+
"observations",
|
|
106
|
+
"condition_occurrence",
|
|
107
|
+
"2010-06-22",
|
|
108
|
+
"2010-06-23",
|
|
109
|
+
"412"
|
|
110
|
+
],
|
|
111
|
+
[
|
|
112
|
+
239,
|
|
113
|
+
49718,
|
|
114
|
+
"observations",
|
|
115
|
+
"condition_occurrence",
|
|
116
|
+
"2010-02-12",
|
|
117
|
+
"2010-02-12",
|
|
118
|
+
"412"
|
|
119
|
+
]
|
|
120
|
+
],
|
|
121
|
+
"tree": {
|
|
122
|
+
"format": "conceptql-diagram/v1",
|
|
123
|
+
"statements": [
|
|
124
|
+
{
|
|
125
|
+
"name": "during",
|
|
126
|
+
"base": "filter",
|
|
127
|
+
"humanName": "During",
|
|
128
|
+
"outputTypes": ["condition_occurrence"],
|
|
129
|
+
"parameters": {},
|
|
130
|
+
"values": [],
|
|
131
|
+
"children": [
|
|
132
|
+
{
|
|
133
|
+
"name": "icd9",
|
|
134
|
+
"base": "selection",
|
|
135
|
+
"humanName": "ICD-9 CM",
|
|
136
|
+
"vocabularyId": "ICD9CM",
|
|
137
|
+
"outputTypes": ["condition_occurrence"],
|
|
138
|
+
"parameters": {},
|
|
139
|
+
"values": ["412"],
|
|
140
|
+
"children": [],
|
|
141
|
+
"counts": {
|
|
142
|
+
"condition_occurrence": {
|
|
143
|
+
"rows": 48,
|
|
144
|
+
"n": 37
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "date_range",
|
|
150
|
+
"base": "selection",
|
|
151
|
+
"humanName": "Date Range",
|
|
152
|
+
"outputTypes": ["person"],
|
|
153
|
+
"parameters": {
|
|
154
|
+
"start": "2010-01-01",
|
|
155
|
+
"end": "2010-12-31"
|
|
156
|
+
},
|
|
157
|
+
"values": [],
|
|
158
|
+
"children": [],
|
|
159
|
+
"counts": {
|
|
160
|
+
"person": {
|
|
161
|
+
"rows": 249,
|
|
162
|
+
"n": 249
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"counts": {
|
|
168
|
+
"condition_occurrence": {
|
|
169
|
+
"rows": 10,
|
|
170
|
+
"n": 10
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "episode-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "Episodes of diabetes diagnoses",
|
|
6
|
+
"statement": [
|
|
7
|
+
"episode",
|
|
8
|
+
["icd9", "250.00"],
|
|
9
|
+
{
|
|
10
|
+
"gap_of": "90"
|
|
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
|
+
[2, 0, "episode", "episode", "2009-05-11", "2009-07-31", null],
|
|
25
|
+
[3, 0, "episode", "episode", "2009-11-17", "2009-11-17", null],
|
|
26
|
+
[5, 0, "episode", "episode", "2009-06-28", "2009-06-28", null],
|
|
27
|
+
[7, 0, "episode", "episode", "2008-04-23", "2008-06-09", null],
|
|
28
|
+
[7, 0, "episode", "episode", "2008-10-02", "2008-11-30", null],
|
|
29
|
+
[7, 0, "episode", "episode", "2009-07-12", "2009-09-13", null],
|
|
30
|
+
[7, 0, "episode", "episode", "2010-04-22", "2010-07-18", null],
|
|
31
|
+
[8, 0, "episode", "episode", "2008-10-17", "2008-10-17", null],
|
|
32
|
+
[8, 0, "episode", "episode", "2009-03-01", "2009-03-03", null],
|
|
33
|
+
[8, 0, "episode", "episode", "2009-07-16", "2009-07-16", null]
|
|
34
|
+
],
|
|
35
|
+
"tree": {
|
|
36
|
+
"format": "conceptql-diagram/v1",
|
|
37
|
+
"statements": [
|
|
38
|
+
{
|
|
39
|
+
"name": "episode",
|
|
40
|
+
"base": "temporal",
|
|
41
|
+
"humanName": "Episode",
|
|
42
|
+
"outputTypes": ["condition_occurrence", "episode"],
|
|
43
|
+
"parameters": {
|
|
44
|
+
"gap_of": "90"
|
|
45
|
+
},
|
|
46
|
+
"values": [],
|
|
47
|
+
"children": [
|
|
48
|
+
{
|
|
49
|
+
"name": "icd9",
|
|
50
|
+
"base": "selection",
|
|
51
|
+
"humanName": "ICD-9 CM",
|
|
52
|
+
"vocabularyId": "ICD9CM",
|
|
53
|
+
"outputTypes": ["condition_occurrence"],
|
|
54
|
+
"parameters": {},
|
|
55
|
+
"values": ["250.00"],
|
|
56
|
+
"children": [],
|
|
57
|
+
"counts": {
|
|
58
|
+
"condition_occurrence": {
|
|
59
|
+
"rows": 1036,
|
|
60
|
+
"n": 162
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"counts": {
|
|
66
|
+
"condition_occurrence": {
|
|
67
|
+
"rows": 0,
|
|
68
|
+
"n": 0
|
|
69
|
+
},
|
|
70
|
+
"episode": {
|
|
71
|
+
"rows": 439,
|
|
72
|
+
"n": 162
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|