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.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +176 -0
  3. data/README.md +4 -2
  4. data/assets/diagram/diagram.css +331 -0
  5. data/assets/diagram/fonts/OFL.txt +93 -0
  6. data/assets/diagram/fonts/Roboto-400.ttf +0 -0
  7. data/assets/diagram/fonts/Roboto-700.ttf +0 -0
  8. data/assets/diagram/fonts/Roboto-Italic-400.ttf +0 -0
  9. data/assets/diagram/fonts/Roboto-Italic-Latin.woff2 +0 -0
  10. data/assets/diagram/fonts/Roboto-Normal-Latin.woff2 +0 -0
  11. data/assets/diagram/operators.svg +224 -0
  12. data/config/vocabularies.csv +85 -85
  13. data/docs/spec/README.md +2624 -0
  14. data/docs/spec/examples/after-operator.json +562 -0
  15. data/docs/spec/examples/any-overlap-operator.json +106 -0
  16. data/docs/spec/examples/before-operator.json +437 -0
  17. data/docs/spec/examples/co-reported-operator.json +168 -0
  18. data/docs/spec/examples/contains-operator.json +97 -0
  19. data/docs/spec/examples/date-range-operator.json +275 -0
  20. data/docs/spec/examples/death-operator.json +103 -0
  21. data/docs/spec/examples/during-operator.json +178 -0
  22. data/docs/spec/examples/episode-operator.json +80 -0
  23. data/docs/spec/examples/equal-operator.json +79 -0
  24. data/docs/spec/examples/ethnicity-operator.json +86 -0
  25. data/docs/spec/examples/except-operator.json +536 -0
  26. data/docs/spec/examples/filter-operator.json +218 -0
  27. data/docs/spec/examples/first-operator.json +148 -0
  28. data/docs/spec/examples/gender-operator.json +257 -0
  29. data/docs/spec/examples/hospice-operator.json +40 -0
  30. data/docs/spec/examples/hospitalization-operator.json +131 -0
  31. data/docs/spec/examples/information-periods-operator.json +131 -0
  32. data/docs/spec/examples/last-operator.json +148 -0
  33. data/docs/spec/examples/match-operator.json +186 -0
  34. data/docs/spec/examples/nth-occurrence-operator.json +300 -0
  35. data/docs/spec/examples/numeric-filter-operator.json +77 -0
  36. data/docs/spec/examples/one-in-two-out-operator.json +158 -0
  37. data/docs/spec/examples/person-filter-operator.json +919 -0
  38. data/docs/spec/examples/person-operator.json +274 -0
  39. data/docs/spec/examples/place-of-service-filter-operator.json +57 -0
  40. data/docs/spec/examples/provenance-operator.json +148 -0
  41. data/docs/spec/examples/provider-filter-operator.json +77 -0
  42. data/docs/spec/examples/race-operator.json +131 -0
  43. data/docs/spec/examples/recall-operator.json +289 -0
  44. data/docs/spec/examples/snf-operator.json +40 -0
  45. data/docs/spec/examples/time-window-operator.json +736 -0
  46. data/docs/spec/examples/trim-date-end-operator.json +201 -0
  47. data/docs/spec/examples/trim-date-start-operator.json +201 -0
  48. data/docs/spec/examples/union-operator.json +547 -0
  49. data/docs/spec/examples/vocabulary-operator.json +232 -0
  50. data/lib/conceptql/behaviors/metadatable.rb +68 -2
  51. data/lib/conceptql/behaviors/provenanceable.rb +4 -1
  52. data/lib/conceptql/behaviors/utilizable.rb +3 -0
  53. data/lib/conceptql/code_case_mismatch_error.rb +50 -0
  54. data/lib/conceptql/data_model/gdm.rb +23 -2
  55. data/lib/conceptql/diagram_renderer/app.rb +59 -0
  56. data/lib/conceptql/diagram_renderer/configuration.rb +87 -0
  57. data/lib/conceptql/diagram_renderer/diagram_data.rb +80 -0
  58. data/lib/conceptql/diagram_renderer/drawing.rb +255 -0
  59. data/lib/conceptql/diagram_renderer/geometry.rb +380 -0
  60. data/lib/conceptql/diagram_renderer/input_error.rb +11 -0
  61. data/lib/conceptql/diagram_renderer/js_format.rb +112 -0
  62. data/lib/conceptql/diagram_renderer/resvg.rb +120 -0
  63. data/lib/conceptql/diagram_renderer/sprite.rb +73 -0
  64. data/lib/conceptql/diagram_renderer/static.rb +70 -0
  65. data/lib/conceptql/diagram_renderer/svg.rb +73 -0
  66. data/lib/conceptql/diagram_renderer/tree_layout.rb +287 -0
  67. data/lib/conceptql/diagram_renderer.rb +82 -0
  68. data/lib/conceptql/lexicon/lexicon_strategy.rb +16 -0
  69. data/lib/conceptql/lexicon.rb +63 -11
  70. data/lib/conceptql/nodifier.rb +5 -3
  71. data/lib/conceptql/operators/after.rb +15 -1
  72. data/lib/conceptql/operators/any_overlap.rb +6 -1
  73. data/lib/conceptql/operators/before.rb +11 -1
  74. data/lib/conceptql/operators/binary_operator_operator.rb +12 -2
  75. data/lib/conceptql/operators/co_reported.rb +9 -4
  76. data/lib/conceptql/operators/contains.rb +6 -1
  77. data/lib/conceptql/operators/count.rb +2 -0
  78. data/lib/conceptql/operators/date_range.rb +15 -3
  79. data/lib/conceptql/operators/death.rb +5 -1
  80. data/lib/conceptql/operators/dedup.rb +2 -0
  81. data/lib/conceptql/operators/during.rb +6 -1
  82. data/lib/conceptql/operators/episode.rb +13 -2
  83. data/lib/conceptql/operators/equal.rb +11 -1
  84. data/lib/conceptql/operators/ethnicity.rb +19 -7
  85. data/lib/conceptql/operators/except.rb +10 -1
  86. data/lib/conceptql/operators/filter.rb +6 -1
  87. data/lib/conceptql/operators/first.rb +19 -9
  88. data/lib/conceptql/operators/from.rb +3 -0
  89. data/lib/conceptql/operators/gender.rb +10 -2
  90. data/lib/conceptql/operators/hospice.rb +7 -1
  91. data/lib/conceptql/operators/hospitalization.rb +6 -1
  92. data/lib/conceptql/operators/information_periods.rb +26 -7
  93. data/lib/conceptql/operators/invalid.rb +4 -0
  94. data/lib/conceptql/operators/last.rb +19 -9
  95. data/lib/conceptql/operators/match.rb +6 -1
  96. data/lib/conceptql/operators/multiple_vocabularies.rb +17 -3
  97. data/lib/conceptql/operators/numeric.rb +4 -0
  98. data/lib/conceptql/operators/numeric_filter.rb +13 -3
  99. data/lib/conceptql/operators/occurrence.rb +33 -12
  100. data/lib/conceptql/operators/one_in_two_out.rb +22 -5
  101. data/lib/conceptql/operators/operator.rb +8 -4
  102. data/lib/conceptql/operators/person.rb +5 -1
  103. data/lib/conceptql/operators/person_filter.rb +14 -1
  104. data/lib/conceptql/operators/place_of_service_filter.rb +14 -3
  105. data/lib/conceptql/operators/provenance.rb +17 -8
  106. data/lib/conceptql/operators/provider_filter.rb +18 -6
  107. data/lib/conceptql/operators/race.rb +14 -9
  108. data/lib/conceptql/operators/read.rb +11 -1
  109. data/lib/conceptql/operators/recall.rb +34 -2
  110. data/lib/conceptql/operators/snf.rb +7 -1
  111. data/lib/conceptql/operators/sum.rb +4 -0
  112. data/lib/conceptql/operators/temporal_operator.rb +4 -2
  113. data/lib/conceptql/operators/time_window.rb +27 -4
  114. data/lib/conceptql/operators/trim_date.rb +6 -14
  115. data/lib/conceptql/operators/trim_date_end.rb +9 -3
  116. data/lib/conceptql/operators/trim_date_start.rb +9 -3
  117. data/lib/conceptql/operators/union.rb +13 -1
  118. data/lib/conceptql/operators/vocabulary.rb +80 -6
  119. data/lib/conceptql/paths.rb +9 -1
  120. data/lib/conceptql/version.rb +1 -1
  121. data/lib/conceptql/vocabularies/drg_systems.rb +3 -2
  122. data/lib/conceptql/vocabularies/entry.rb +14 -11
  123. data/lib/conceptql/vocabularies/vocabulary_class_factory.rb +2 -1
  124. data/lib/conceptql.rb +3 -0
  125. metadata +75 -2
  126. data/doc/spec.md +0 -2091
@@ -0,0 +1,437 @@
1
+ {
2
+ "spec_id": "before-operator",
3
+ "examples": [
4
+ {
5
+ "title": "All MIs that occurred before a patient's last case of diabetes (250.01)",
6
+ "statement": [
7
+ "before",
8
+ {
9
+ "left": ["icd9", "412"],
10
+ "right": ["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
+ 17,
26
+ 27269,
27
+ "observations",
28
+ "condition_occurrence",
29
+ "2008-08-25",
30
+ "2008-08-25",
31
+ "412"
32
+ ],
33
+ [
34
+ 17,
35
+ 46165,
36
+ "observations",
37
+ "condition_occurrence",
38
+ "2009-04-30",
39
+ "2009-04-30",
40
+ "412"
41
+ ],
42
+ [
43
+ 66,
44
+ 16171,
45
+ "observations",
46
+ "condition_occurrence",
47
+ "2009-07-25",
48
+ "2009-07-25",
49
+ "412"
50
+ ],
51
+ [
52
+ 81,
53
+ 1405,
54
+ "observations",
55
+ "condition_occurrence",
56
+ "2009-01-28",
57
+ "2009-01-30",
58
+ "412"
59
+ ],
60
+ [
61
+ 109,
62
+ 89334,
63
+ "observations",
64
+ "condition_occurrence",
65
+ "2010-07-06",
66
+ "2010-07-06",
67
+ "412"
68
+ ],
69
+ [
70
+ 131,
71
+ 172,
72
+ "observations",
73
+ "condition_occurrence",
74
+ "2008-03-22",
75
+ "2008-03-23",
76
+ "412"
77
+ ],
78
+ [
79
+ 152,
80
+ 82988,
81
+ "observations",
82
+ "condition_occurrence",
83
+ "2008-08-16",
84
+ "2008-08-16",
85
+ "412"
86
+ ],
87
+ [
88
+ 184,
89
+ 24281,
90
+ "observations",
91
+ "condition_occurrence",
92
+ "2008-01-07",
93
+ "2008-01-07",
94
+ "412"
95
+ ],
96
+ [
97
+ 187,
98
+ 90638,
99
+ "observations",
100
+ "condition_occurrence",
101
+ "2009-01-31",
102
+ "2009-01-31",
103
+ "412"
104
+ ],
105
+ [
106
+ 214,
107
+ 89463,
108
+ "observations",
109
+ "condition_occurrence",
110
+ "2008-02-17",
111
+ "2008-02-17",
112
+ "412"
113
+ ]
114
+ ],
115
+ "tree": {
116
+ "format": "conceptql-diagram/v1",
117
+ "statements": [
118
+ {
119
+ "name": "before",
120
+ "base": "filter",
121
+ "humanName": "Before",
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": "icd9",
144
+ "base": "selection",
145
+ "humanName": "ICD-9 CM",
146
+ "vocabularyId": "ICD9CM",
147
+ "outputTypes": ["condition_occurrence"],
148
+ "parameters": {},
149
+ "values": ["250.01"],
150
+ "children": [],
151
+ "counts": {
152
+ "condition_occurrence": {
153
+ "rows": 82,
154
+ "n": 45
155
+ }
156
+ }
157
+ }
158
+ ],
159
+ "counts": {
160
+ "condition_occurrence": {
161
+ "rows": 11,
162
+ "n": 9
163
+ }
164
+ }
165
+ }
166
+ ]
167
+ }
168
+ },
169
+ {
170
+ "title": "All MIs that occurred before a patient's first case of diabetes (250.01)",
171
+ "statement": [
172
+ "before",
173
+ {
174
+ "left": ["icd9", "412"],
175
+ "right": ["first", ["icd9", "250.01"]]
176
+ }
177
+ ],
178
+ "help": true,
179
+ "columns": [
180
+ "person_id",
181
+ "criterion_id",
182
+ "criterion_table",
183
+ "criterion_domain",
184
+ "start_date",
185
+ "end_date",
186
+ "source_value"
187
+ ],
188
+ "rows": [
189
+ [
190
+ 17,
191
+ 27269,
192
+ "observations",
193
+ "condition_occurrence",
194
+ "2008-08-25",
195
+ "2008-08-25",
196
+ "412"
197
+ ],
198
+ [
199
+ 17,
200
+ 46165,
201
+ "observations",
202
+ "condition_occurrence",
203
+ "2009-04-30",
204
+ "2009-04-30",
205
+ "412"
206
+ ],
207
+ [
208
+ 66,
209
+ 16171,
210
+ "observations",
211
+ "condition_occurrence",
212
+ "2009-07-25",
213
+ "2009-07-25",
214
+ "412"
215
+ ],
216
+ [
217
+ 81,
218
+ 1405,
219
+ "observations",
220
+ "condition_occurrence",
221
+ "2009-01-28",
222
+ "2009-01-30",
223
+ "412"
224
+ ],
225
+ [
226
+ 109,
227
+ 89334,
228
+ "observations",
229
+ "condition_occurrence",
230
+ "2010-07-06",
231
+ "2010-07-06",
232
+ "412"
233
+ ],
234
+ [
235
+ 131,
236
+ 172,
237
+ "observations",
238
+ "condition_occurrence",
239
+ "2008-03-22",
240
+ "2008-03-23",
241
+ "412"
242
+ ],
243
+ [
244
+ 152,
245
+ 82988,
246
+ "observations",
247
+ "condition_occurrence",
248
+ "2008-08-16",
249
+ "2008-08-16",
250
+ "412"
251
+ ],
252
+ [
253
+ 184,
254
+ 24281,
255
+ "observations",
256
+ "condition_occurrence",
257
+ "2008-01-07",
258
+ "2008-01-07",
259
+ "412"
260
+ ],
261
+ [
262
+ 187,
263
+ 90638,
264
+ "observations",
265
+ "condition_occurrence",
266
+ "2009-01-31",
267
+ "2009-01-31",
268
+ "412"
269
+ ],
270
+ [
271
+ 214,
272
+ 89463,
273
+ "observations",
274
+ "condition_occurrence",
275
+ "2008-02-17",
276
+ "2008-02-17",
277
+ "412"
278
+ ]
279
+ ],
280
+ "tree": {
281
+ "format": "conceptql-diagram/v1",
282
+ "statements": [
283
+ {
284
+ "name": "before",
285
+ "base": "filter",
286
+ "humanName": "Before",
287
+ "outputTypes": ["condition_occurrence"],
288
+ "parameters": {},
289
+ "values": [],
290
+ "children": [
291
+ {
292
+ "name": "icd9",
293
+ "base": "selection",
294
+ "humanName": "ICD-9 CM",
295
+ "vocabularyId": "ICD9CM",
296
+ "outputTypes": ["condition_occurrence"],
297
+ "parameters": {},
298
+ "values": ["412"],
299
+ "children": [],
300
+ "counts": {
301
+ "condition_occurrence": {
302
+ "rows": 48,
303
+ "n": 37
304
+ }
305
+ }
306
+ },
307
+ {
308
+ "name": "first",
309
+ "base": "temporal",
310
+ "humanName": "First",
311
+ "outputTypes": ["condition_occurrence"],
312
+ "parameters": {},
313
+ "values": [],
314
+ "children": [
315
+ {
316
+ "name": "icd9",
317
+ "base": "selection",
318
+ "humanName": "ICD-9 CM",
319
+ "vocabularyId": "ICD9CM",
320
+ "outputTypes": ["condition_occurrence"],
321
+ "parameters": {},
322
+ "values": ["250.01"],
323
+ "children": [],
324
+ "counts": {
325
+ "condition_occurrence": {
326
+ "rows": 82,
327
+ "n": 45
328
+ }
329
+ }
330
+ }
331
+ ],
332
+ "counts": {
333
+ "condition_occurrence": {
334
+ "rows": 45,
335
+ "n": 45
336
+ }
337
+ }
338
+ }
339
+ ],
340
+ "counts": {
341
+ "condition_occurrence": {
342
+ "rows": 10,
343
+ "n": 9
344
+ }
345
+ }
346
+ }
347
+ ]
348
+ }
349
+ },
350
+ {
351
+ "title": "Heart attacks that end no more than 1 year before death",
352
+ "statement": [
353
+ "before",
354
+ {
355
+ "left": ["icd9", "410.00", "410.01", "410.10", "410.11"],
356
+ "right": ["death"],
357
+ "within": "1y"
358
+ }
359
+ ],
360
+ "help": true,
361
+ "columns": [
362
+ "person_id",
363
+ "criterion_id",
364
+ "criterion_table",
365
+ "criterion_domain",
366
+ "start_date",
367
+ "end_date",
368
+ "source_value"
369
+ ],
370
+ "rows": [
371
+ [
372
+ 191,
373
+ 42977,
374
+ "observations",
375
+ "condition_occurrence",
376
+ "2009-05-21",
377
+ "2009-05-21",
378
+ "41010"
379
+ ]
380
+ ],
381
+ "tree": {
382
+ "format": "conceptql-diagram/v1",
383
+ "statements": [
384
+ {
385
+ "name": "before",
386
+ "base": "filter",
387
+ "humanName": "Before",
388
+ "outputTypes": ["condition_occurrence"],
389
+ "parameters": {
390
+ "within": "1y"
391
+ },
392
+ "values": [],
393
+ "children": [
394
+ {
395
+ "name": "icd9",
396
+ "base": "selection",
397
+ "humanName": "ICD-9 CM",
398
+ "vocabularyId": "ICD9CM",
399
+ "outputTypes": ["condition_occurrence"],
400
+ "parameters": {},
401
+ "values": ["410.00", "410.01", "410.10", "410.11"],
402
+ "children": [],
403
+ "counts": {
404
+ "condition_occurrence": {
405
+ "rows": 13,
406
+ "n": 8
407
+ }
408
+ }
409
+ },
410
+ {
411
+ "name": "death",
412
+ "base": "cast",
413
+ "humanName": "Death",
414
+ "outputTypes": ["death"],
415
+ "parameters": {},
416
+ "values": [],
417
+ "children": [],
418
+ "counts": {
419
+ "death": {
420
+ "rows": 10,
421
+ "n": 10
422
+ }
423
+ }
424
+ }
425
+ ],
426
+ "counts": {
427
+ "condition_occurrence": {
428
+ "rows": 1,
429
+ "n": 1
430
+ }
431
+ }
432
+ }
433
+ ]
434
+ }
435
+ }
436
+ ]
437
+ }
@@ -0,0 +1,168 @@
1
+ {
2
+ "spec_id": "co-reported-operator",
3
+ "examples": [
4
+ {
5
+ "title": "Diabetes diagnoses reported as a reason for an office visit, and those office visits",
6
+ "statement": ["co_reported", ["icd9", "250.00"], ["cpt", "99214"]],
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
+ 25,
20
+ 93217,
21
+ "observations",
22
+ "condition_occurrence",
23
+ "2008-09-18",
24
+ "2008-09-18",
25
+ "25000"
26
+ ],
27
+ [
28
+ 25,
29
+ 93220,
30
+ "observations",
31
+ "procedure_occurrence",
32
+ "2008-09-18",
33
+ "2008-09-18",
34
+ "99214"
35
+ ],
36
+ [
37
+ 31,
38
+ 87695,
39
+ "observations",
40
+ "condition_occurrence",
41
+ "2008-06-17",
42
+ "2008-06-17",
43
+ "25000"
44
+ ],
45
+ [
46
+ 31,
47
+ 87696,
48
+ "observations",
49
+ "procedure_occurrence",
50
+ "2008-06-17",
51
+ "2008-06-17",
52
+ "99214"
53
+ ],
54
+ [
55
+ 40,
56
+ 81973,
57
+ "observations",
58
+ "condition_occurrence",
59
+ "2009-05-01",
60
+ "2009-05-01",
61
+ "25000"
62
+ ],
63
+ [
64
+ 40,
65
+ 81993,
66
+ "observations",
67
+ "procedure_occurrence",
68
+ "2009-05-01",
69
+ "2009-05-01",
70
+ "99214"
71
+ ],
72
+ [
73
+ 44,
74
+ 44702,
75
+ "observations",
76
+ "condition_occurrence",
77
+ "2008-01-10",
78
+ "2008-01-10",
79
+ "25000"
80
+ ],
81
+ [
82
+ 44,
83
+ 44715,
84
+ "observations",
85
+ "procedure_occurrence",
86
+ "2008-01-10",
87
+ "2008-01-10",
88
+ "99214"
89
+ ],
90
+ [
91
+ 58,
92
+ 35093,
93
+ "observations",
94
+ "condition_occurrence",
95
+ "2009-06-15",
96
+ "2009-06-15",
97
+ "25000"
98
+ ],
99
+ [
100
+ 58,
101
+ 35095,
102
+ "observations",
103
+ "procedure_occurrence",
104
+ "2009-06-15",
105
+ "2009-06-15",
106
+ "99214"
107
+ ]
108
+ ],
109
+ "tree": {
110
+ "format": "conceptql-diagram/v1",
111
+ "statements": [
112
+ {
113
+ "name": "co_reported",
114
+ "base": "set",
115
+ "humanName": "Co Reported",
116
+ "outputTypes": ["condition_occurrence", "procedure_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": ["250.00"],
128
+ "children": [],
129
+ "counts": {
130
+ "condition_occurrence": {
131
+ "rows": 1036,
132
+ "n": 162
133
+ }
134
+ }
135
+ },
136
+ {
137
+ "name": "cpt",
138
+ "base": "selection",
139
+ "humanName": "CPT",
140
+ "vocabularyId": "CPT4",
141
+ "outputTypes": ["procedure_occurrence"],
142
+ "parameters": {},
143
+ "values": ["99214"],
144
+ "children": [],
145
+ "counts": {
146
+ "procedure_occurrence": {
147
+ "rows": 1073,
148
+ "n": 175
149
+ }
150
+ }
151
+ }
152
+ ],
153
+ "counts": {
154
+ "condition_occurrence": {
155
+ "rows": 49,
156
+ "n": 39
157
+ },
158
+ "procedure_occurrence": {
159
+ "rows": 49,
160
+ "n": 39
161
+ }
162
+ }
163
+ }
164
+ ]
165
+ }
166
+ }
167
+ ]
168
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "spec_id": "contains-operator",
3
+ "examples": [
4
+ {
5
+ "title": "All MIs occurring on 2010-06-22",
6
+ "statement": [
7
+ "contains",
8
+ {
9
+ "left": ["icd9", "412"],
10
+ "right": [
11
+ "date_range",
12
+ {
13
+ "start": "2010-06-22",
14
+ "end": "2010-06-22"
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
+ 217,
32
+ 56467,
33
+ "observations",
34
+ "condition_occurrence",
35
+ "2010-06-22",
36
+ "2010-06-23",
37
+ "412"
38
+ ]
39
+ ],
40
+ "tree": {
41
+ "format": "conceptql-diagram/v1",
42
+ "statements": [
43
+ {
44
+ "name": "contains",
45
+ "base": "filter",
46
+ "humanName": "Contains",
47
+ "outputTypes": ["condition_occurrence"],
48
+ "parameters": {},
49
+ "values": [],
50
+ "children": [
51
+ {
52
+ "name": "icd9",
53
+ "base": "selection",
54
+ "humanName": "ICD-9 CM",
55
+ "vocabularyId": "ICD9CM",
56
+ "outputTypes": ["condition_occurrence"],
57
+ "parameters": {},
58
+ "values": ["412"],
59
+ "children": [],
60
+ "counts": {
61
+ "condition_occurrence": {
62
+ "rows": 48,
63
+ "n": 37
64
+ }
65
+ }
66
+ },
67
+ {
68
+ "name": "date_range",
69
+ "base": "selection",
70
+ "humanName": "Date Range",
71
+ "outputTypes": ["person"],
72
+ "parameters": {
73
+ "start": "2010-06-22",
74
+ "end": "2010-06-22"
75
+ },
76
+ "values": [],
77
+ "children": [],
78
+ "counts": {
79
+ "person": {
80
+ "rows": 249,
81
+ "n": 249
82
+ }
83
+ }
84
+ }
85
+ ],
86
+ "counts": {
87
+ "condition_occurrence": {
88
+ "rows": 1,
89
+ "n": 1
90
+ }
91
+ }
92
+ }
93
+ ]
94
+ }
95
+ }
96
+ ]
97
+ }