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,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "equal-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "HbA1c results (LOINC 4548-4) with the same value as an HbA1c result by HPLC (LOINC 17856-6) of the same patient",
|
|
6
|
+
"statement": [
|
|
7
|
+
"equal",
|
|
8
|
+
{
|
|
9
|
+
"left": ["loinc", "4548-4"],
|
|
10
|
+
"right": ["loinc", "17856-6"]
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"help": false,
|
|
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
|
+
"tree": {
|
|
25
|
+
"format": "conceptql-diagram/v1",
|
|
26
|
+
"statements": [
|
|
27
|
+
{
|
|
28
|
+
"name": "equal",
|
|
29
|
+
"base": "filter",
|
|
30
|
+
"humanName": "Equal",
|
|
31
|
+
"outputTypes": ["observation"],
|
|
32
|
+
"parameters": {},
|
|
33
|
+
"values": [],
|
|
34
|
+
"children": [
|
|
35
|
+
{
|
|
36
|
+
"name": "loinc",
|
|
37
|
+
"base": "selection",
|
|
38
|
+
"humanName": "Logical Observation Identifiers Names and Codes (Regenstrief Institute)",
|
|
39
|
+
"vocabularyId": "LOINC",
|
|
40
|
+
"outputTypes": ["observation"],
|
|
41
|
+
"parameters": {},
|
|
42
|
+
"values": ["4548-4"],
|
|
43
|
+
"children": [],
|
|
44
|
+
"counts": {
|
|
45
|
+
"observation": {
|
|
46
|
+
"rows": 1,
|
|
47
|
+
"n": 1
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "loinc",
|
|
53
|
+
"base": "selection",
|
|
54
|
+
"humanName": "Logical Observation Identifiers Names and Codes (Regenstrief Institute)",
|
|
55
|
+
"vocabularyId": "LOINC",
|
|
56
|
+
"outputTypes": ["observation"],
|
|
57
|
+
"parameters": {},
|
|
58
|
+
"values": ["17856-6"],
|
|
59
|
+
"children": [],
|
|
60
|
+
"counts": {
|
|
61
|
+
"observation": {
|
|
62
|
+
"rows": 0,
|
|
63
|
+
"n": 0
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"counts": {
|
|
69
|
+
"observation": {
|
|
70
|
+
"rows": 0,
|
|
71
|
+
"n": 0
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "ethnicity-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "All patients recorded as Hispanic",
|
|
6
|
+
"statement": ["ethnicity", "Hispanic"],
|
|
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
|
+
4,
|
|
20
|
+
4,
|
|
21
|
+
"patients",
|
|
22
|
+
"person",
|
|
23
|
+
"1941-06-01",
|
|
24
|
+
"1941-06-01",
|
|
25
|
+
"00021CA6FF03E670"
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
22,
|
|
29
|
+
22,
|
|
30
|
+
"patients",
|
|
31
|
+
"person",
|
|
32
|
+
"1942-08-01",
|
|
33
|
+
"1942-08-01",
|
|
34
|
+
"000D6D88463D8A76"
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
72,
|
|
38
|
+
72,
|
|
39
|
+
"patients",
|
|
40
|
+
"person",
|
|
41
|
+
"1933-04-01",
|
|
42
|
+
"1933-04-01",
|
|
43
|
+
"002354398A00234E"
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
76,
|
|
47
|
+
76,
|
|
48
|
+
"patients",
|
|
49
|
+
"person",
|
|
50
|
+
"1938-03-01",
|
|
51
|
+
"1938-03-01",
|
|
52
|
+
"00242FF5E7A3F2D9"
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
181,
|
|
56
|
+
181,
|
|
57
|
+
"patients",
|
|
58
|
+
"person",
|
|
59
|
+
"1939-11-01",
|
|
60
|
+
"1939-11-01",
|
|
61
|
+
"005E0AB5172E715F"
|
|
62
|
+
]
|
|
63
|
+
],
|
|
64
|
+
"tree": {
|
|
65
|
+
"format": "conceptql-diagram/v1",
|
|
66
|
+
"statements": [
|
|
67
|
+
{
|
|
68
|
+
"name": "ethnicity",
|
|
69
|
+
"base": "selection",
|
|
70
|
+
"humanName": "Ethnicity",
|
|
71
|
+
"outputTypes": ["person"],
|
|
72
|
+
"parameters": {},
|
|
73
|
+
"values": ["Hispanic"],
|
|
74
|
+
"children": [],
|
|
75
|
+
"counts": {
|
|
76
|
+
"person": {
|
|
77
|
+
"rows": 5,
|
|
78
|
+
"n": 5
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_id": "except-operator",
|
|
3
|
+
"examples": [
|
|
4
|
+
{
|
|
5
|
+
"title": "All males who are not white",
|
|
6
|
+
"statement": [
|
|
7
|
+
"except",
|
|
8
|
+
{
|
|
9
|
+
"left": ["gender", "male"],
|
|
10
|
+
"right": ["race", "white"]
|
|
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
|
+
4,
|
|
26
|
+
4,
|
|
27
|
+
"patients",
|
|
28
|
+
"person",
|
|
29
|
+
"1941-06-01",
|
|
30
|
+
"1941-06-01",
|
|
31
|
+
"00021CA6FF03E670"
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
6,
|
|
35
|
+
6,
|
|
36
|
+
"patients",
|
|
37
|
+
"person",
|
|
38
|
+
"1943-10-01",
|
|
39
|
+
"1943-10-01",
|
|
40
|
+
"0002DAE1C81CC70D"
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
21,
|
|
44
|
+
21,
|
|
45
|
+
"patients",
|
|
46
|
+
"person",
|
|
47
|
+
"1932-08-01",
|
|
48
|
+
"1932-08-01",
|
|
49
|
+
"000C7486B11E7030"
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
22,
|
|
53
|
+
22,
|
|
54
|
+
"patients",
|
|
55
|
+
"person",
|
|
56
|
+
"1942-08-01",
|
|
57
|
+
"1942-08-01",
|
|
58
|
+
"000D6D88463D8A76"
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
50,
|
|
62
|
+
50,
|
|
63
|
+
"patients",
|
|
64
|
+
"person",
|
|
65
|
+
"1941-08-01",
|
|
66
|
+
"1941-08-01",
|
|
67
|
+
"001AEDD510C92C87"
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
68,
|
|
71
|
+
68,
|
|
72
|
+
"patients",
|
|
73
|
+
"person",
|
|
74
|
+
"1954-11-01",
|
|
75
|
+
"1954-11-01",
|
|
76
|
+
"0021D4CDAFC0609F"
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
69,
|
|
80
|
+
69,
|
|
81
|
+
"patients",
|
|
82
|
+
"person",
|
|
83
|
+
"1925-05-01",
|
|
84
|
+
"1925-05-01",
|
|
85
|
+
"00225409819CF5F6"
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
71,
|
|
89
|
+
71,
|
|
90
|
+
"patients",
|
|
91
|
+
"person",
|
|
92
|
+
"1931-01-01",
|
|
93
|
+
"1931-01-01",
|
|
94
|
+
"0022CC1943D038E2"
|
|
95
|
+
],
|
|
96
|
+
[
|
|
97
|
+
72,
|
|
98
|
+
72,
|
|
99
|
+
"patients",
|
|
100
|
+
"person",
|
|
101
|
+
"1933-04-01",
|
|
102
|
+
"1933-04-01",
|
|
103
|
+
"002354398A00234E"
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
75,
|
|
107
|
+
75,
|
|
108
|
+
"patients",
|
|
109
|
+
"person",
|
|
110
|
+
"1932-08-01",
|
|
111
|
+
"1932-08-01",
|
|
112
|
+
"00241223F034F97B"
|
|
113
|
+
]
|
|
114
|
+
],
|
|
115
|
+
"tree": {
|
|
116
|
+
"format": "conceptql-diagram/v1",
|
|
117
|
+
"statements": [
|
|
118
|
+
{
|
|
119
|
+
"name": "except",
|
|
120
|
+
"base": "filter",
|
|
121
|
+
"humanName": "Except",
|
|
122
|
+
"outputTypes": ["person"],
|
|
123
|
+
"parameters": {},
|
|
124
|
+
"values": [],
|
|
125
|
+
"children": [
|
|
126
|
+
{
|
|
127
|
+
"name": "gender",
|
|
128
|
+
"base": "selection",
|
|
129
|
+
"humanName": "Gender",
|
|
130
|
+
"outputTypes": ["person"],
|
|
131
|
+
"parameters": {},
|
|
132
|
+
"values": ["male"],
|
|
133
|
+
"children": [],
|
|
134
|
+
"counts": {
|
|
135
|
+
"person": {
|
|
136
|
+
"rows": 124,
|
|
137
|
+
"n": 124
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "race",
|
|
143
|
+
"base": "selection",
|
|
144
|
+
"humanName": "Race",
|
|
145
|
+
"outputTypes": ["person"],
|
|
146
|
+
"parameters": {},
|
|
147
|
+
"values": ["white"],
|
|
148
|
+
"children": [],
|
|
149
|
+
"counts": {
|
|
150
|
+
"person": {
|
|
151
|
+
"rows": 204,
|
|
152
|
+
"n": 204
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"counts": {
|
|
158
|
+
"person": {
|
|
159
|
+
"rows": 27,
|
|
160
|
+
"n": 27
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"title": "All Conditions that are MI",
|
|
169
|
+
"statement": [
|
|
170
|
+
"except",
|
|
171
|
+
{
|
|
172
|
+
"left": ["icd9", "412"],
|
|
173
|
+
"right": ["cpt", "99214"]
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"help": true,
|
|
177
|
+
"columns": [
|
|
178
|
+
"person_id",
|
|
179
|
+
"criterion_id",
|
|
180
|
+
"criterion_table",
|
|
181
|
+
"criterion_domain",
|
|
182
|
+
"start_date",
|
|
183
|
+
"end_date",
|
|
184
|
+
"source_value"
|
|
185
|
+
],
|
|
186
|
+
"rows": [
|
|
187
|
+
[
|
|
188
|
+
11,
|
|
189
|
+
82614,
|
|
190
|
+
"observations",
|
|
191
|
+
"condition_occurrence",
|
|
192
|
+
"2008-10-29",
|
|
193
|
+
"2008-10-29",
|
|
194
|
+
"412"
|
|
195
|
+
],
|
|
196
|
+
[
|
|
197
|
+
17,
|
|
198
|
+
27269,
|
|
199
|
+
"observations",
|
|
200
|
+
"condition_occurrence",
|
|
201
|
+
"2008-08-25",
|
|
202
|
+
"2008-08-25",
|
|
203
|
+
"412"
|
|
204
|
+
],
|
|
205
|
+
[
|
|
206
|
+
17,
|
|
207
|
+
46165,
|
|
208
|
+
"observations",
|
|
209
|
+
"condition_occurrence",
|
|
210
|
+
"2009-04-30",
|
|
211
|
+
"2009-04-30",
|
|
212
|
+
"412"
|
|
213
|
+
],
|
|
214
|
+
[
|
|
215
|
+
38,
|
|
216
|
+
40556,
|
|
217
|
+
"observations",
|
|
218
|
+
"condition_occurrence",
|
|
219
|
+
"2010-02-12",
|
|
220
|
+
"2010-02-12",
|
|
221
|
+
"412"
|
|
222
|
+
],
|
|
223
|
+
[
|
|
224
|
+
54,
|
|
225
|
+
74606,
|
|
226
|
+
"observations",
|
|
227
|
+
"condition_occurrence",
|
|
228
|
+
"2008-06-05",
|
|
229
|
+
"2008-06-05",
|
|
230
|
+
"412"
|
|
231
|
+
],
|
|
232
|
+
[
|
|
233
|
+
60,
|
|
234
|
+
986,
|
|
235
|
+
"observations",
|
|
236
|
+
"condition_occurrence",
|
|
237
|
+
"2009-07-19",
|
|
238
|
+
"2009-07-22",
|
|
239
|
+
"412"
|
|
240
|
+
],
|
|
241
|
+
[
|
|
242
|
+
66,
|
|
243
|
+
16171,
|
|
244
|
+
"observations",
|
|
245
|
+
"condition_occurrence",
|
|
246
|
+
"2009-07-25",
|
|
247
|
+
"2009-07-25",
|
|
248
|
+
"412"
|
|
249
|
+
],
|
|
250
|
+
[
|
|
251
|
+
73,
|
|
252
|
+
52843,
|
|
253
|
+
"observations",
|
|
254
|
+
"condition_occurrence",
|
|
255
|
+
"2008-11-16",
|
|
256
|
+
"2008-11-16",
|
|
257
|
+
"412"
|
|
258
|
+
],
|
|
259
|
+
[
|
|
260
|
+
77,
|
|
261
|
+
58165,
|
|
262
|
+
"observations",
|
|
263
|
+
"condition_occurrence",
|
|
264
|
+
"2010-10-06",
|
|
265
|
+
"2010-10-06",
|
|
266
|
+
"412"
|
|
267
|
+
],
|
|
268
|
+
[
|
|
269
|
+
81,
|
|
270
|
+
1405,
|
|
271
|
+
"observations",
|
|
272
|
+
"condition_occurrence",
|
|
273
|
+
"2009-01-28",
|
|
274
|
+
"2009-01-30",
|
|
275
|
+
"412"
|
|
276
|
+
]
|
|
277
|
+
],
|
|
278
|
+
"tree": {
|
|
279
|
+
"format": "conceptql-diagram/v1",
|
|
280
|
+
"statements": [
|
|
281
|
+
{
|
|
282
|
+
"name": "except",
|
|
283
|
+
"base": "filter",
|
|
284
|
+
"humanName": "Except",
|
|
285
|
+
"outputTypes": ["condition_occurrence"],
|
|
286
|
+
"parameters": {},
|
|
287
|
+
"values": [],
|
|
288
|
+
"children": [
|
|
289
|
+
{
|
|
290
|
+
"name": "icd9",
|
|
291
|
+
"base": "selection",
|
|
292
|
+
"humanName": "ICD-9 CM",
|
|
293
|
+
"vocabularyId": "ICD9CM",
|
|
294
|
+
"outputTypes": ["condition_occurrence"],
|
|
295
|
+
"parameters": {},
|
|
296
|
+
"values": ["412"],
|
|
297
|
+
"children": [],
|
|
298
|
+
"counts": {
|
|
299
|
+
"condition_occurrence": {
|
|
300
|
+
"rows": 48,
|
|
301
|
+
"n": 37
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "cpt",
|
|
307
|
+
"base": "selection",
|
|
308
|
+
"humanName": "CPT",
|
|
309
|
+
"vocabularyId": "CPT4",
|
|
310
|
+
"outputTypes": ["procedure_occurrence"],
|
|
311
|
+
"parameters": {},
|
|
312
|
+
"values": ["99214"],
|
|
313
|
+
"children": [],
|
|
314
|
+
"counts": {
|
|
315
|
+
"procedure_occurrence": {
|
|
316
|
+
"rows": 1073,
|
|
317
|
+
"n": 175
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"counts": {
|
|
323
|
+
"condition_occurrence": {
|
|
324
|
+
"rows": 48,
|
|
325
|
+
"n": 37
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"title": "Passes two types downstream: Conditions that are MI (unaffected by the right-hand stream) and People that are Male but not White",
|
|
334
|
+
"statement": [
|
|
335
|
+
"except",
|
|
336
|
+
{
|
|
337
|
+
"left": ["union", ["icd9", "412"], ["gender", "Male"]],
|
|
338
|
+
"right": ["race", "White"]
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"help": true,
|
|
342
|
+
"columns": [
|
|
343
|
+
"person_id",
|
|
344
|
+
"criterion_id",
|
|
345
|
+
"criterion_table",
|
|
346
|
+
"criterion_domain",
|
|
347
|
+
"start_date",
|
|
348
|
+
"end_date",
|
|
349
|
+
"source_value"
|
|
350
|
+
],
|
|
351
|
+
"rows": [
|
|
352
|
+
[
|
|
353
|
+
4,
|
|
354
|
+
4,
|
|
355
|
+
"patients",
|
|
356
|
+
"person",
|
|
357
|
+
"1941-06-01",
|
|
358
|
+
"1941-06-01",
|
|
359
|
+
"00021CA6FF03E670"
|
|
360
|
+
],
|
|
361
|
+
[
|
|
362
|
+
6,
|
|
363
|
+
6,
|
|
364
|
+
"patients",
|
|
365
|
+
"person",
|
|
366
|
+
"1943-10-01",
|
|
367
|
+
"1943-10-01",
|
|
368
|
+
"0002DAE1C81CC70D"
|
|
369
|
+
],
|
|
370
|
+
[
|
|
371
|
+
11,
|
|
372
|
+
82614,
|
|
373
|
+
"observations",
|
|
374
|
+
"condition_occurrence",
|
|
375
|
+
"2008-10-29",
|
|
376
|
+
"2008-10-29",
|
|
377
|
+
"412"
|
|
378
|
+
],
|
|
379
|
+
[
|
|
380
|
+
17,
|
|
381
|
+
27269,
|
|
382
|
+
"observations",
|
|
383
|
+
"condition_occurrence",
|
|
384
|
+
"2008-08-25",
|
|
385
|
+
"2008-08-25",
|
|
386
|
+
"412"
|
|
387
|
+
],
|
|
388
|
+
[
|
|
389
|
+
17,
|
|
390
|
+
46165,
|
|
391
|
+
"observations",
|
|
392
|
+
"condition_occurrence",
|
|
393
|
+
"2009-04-30",
|
|
394
|
+
"2009-04-30",
|
|
395
|
+
"412"
|
|
396
|
+
],
|
|
397
|
+
[
|
|
398
|
+
21,
|
|
399
|
+
21,
|
|
400
|
+
"patients",
|
|
401
|
+
"person",
|
|
402
|
+
"1932-08-01",
|
|
403
|
+
"1932-08-01",
|
|
404
|
+
"000C7486B11E7030"
|
|
405
|
+
],
|
|
406
|
+
[
|
|
407
|
+
22,
|
|
408
|
+
22,
|
|
409
|
+
"patients",
|
|
410
|
+
"person",
|
|
411
|
+
"1942-08-01",
|
|
412
|
+
"1942-08-01",
|
|
413
|
+
"000D6D88463D8A76"
|
|
414
|
+
],
|
|
415
|
+
[
|
|
416
|
+
38,
|
|
417
|
+
40556,
|
|
418
|
+
"observations",
|
|
419
|
+
"condition_occurrence",
|
|
420
|
+
"2010-02-12",
|
|
421
|
+
"2010-02-12",
|
|
422
|
+
"412"
|
|
423
|
+
],
|
|
424
|
+
[
|
|
425
|
+
50,
|
|
426
|
+
50,
|
|
427
|
+
"patients",
|
|
428
|
+
"person",
|
|
429
|
+
"1941-08-01",
|
|
430
|
+
"1941-08-01",
|
|
431
|
+
"001AEDD510C92C87"
|
|
432
|
+
],
|
|
433
|
+
[
|
|
434
|
+
54,
|
|
435
|
+
74606,
|
|
436
|
+
"observations",
|
|
437
|
+
"condition_occurrence",
|
|
438
|
+
"2008-06-05",
|
|
439
|
+
"2008-06-05",
|
|
440
|
+
"412"
|
|
441
|
+
]
|
|
442
|
+
],
|
|
443
|
+
"tree": {
|
|
444
|
+
"format": "conceptql-diagram/v1",
|
|
445
|
+
"statements": [
|
|
446
|
+
{
|
|
447
|
+
"name": "except",
|
|
448
|
+
"base": "filter",
|
|
449
|
+
"humanName": "Except",
|
|
450
|
+
"outputTypes": ["condition_occurrence", "person"],
|
|
451
|
+
"parameters": {},
|
|
452
|
+
"values": [],
|
|
453
|
+
"children": [
|
|
454
|
+
{
|
|
455
|
+
"name": "union",
|
|
456
|
+
"base": "set",
|
|
457
|
+
"humanName": "Union",
|
|
458
|
+
"outputTypes": ["condition_occurrence", "person"],
|
|
459
|
+
"parameters": {},
|
|
460
|
+
"values": [],
|
|
461
|
+
"children": [
|
|
462
|
+
{
|
|
463
|
+
"name": "icd9",
|
|
464
|
+
"base": "selection",
|
|
465
|
+
"humanName": "ICD-9 CM",
|
|
466
|
+
"vocabularyId": "ICD9CM",
|
|
467
|
+
"outputTypes": ["condition_occurrence"],
|
|
468
|
+
"parameters": {},
|
|
469
|
+
"values": ["412"],
|
|
470
|
+
"children": [],
|
|
471
|
+
"counts": {
|
|
472
|
+
"condition_occurrence": {
|
|
473
|
+
"rows": 48,
|
|
474
|
+
"n": 37
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "gender",
|
|
480
|
+
"base": "selection",
|
|
481
|
+
"humanName": "Gender",
|
|
482
|
+
"outputTypes": ["person"],
|
|
483
|
+
"parameters": {},
|
|
484
|
+
"values": ["Male"],
|
|
485
|
+
"children": [],
|
|
486
|
+
"counts": {
|
|
487
|
+
"person": {
|
|
488
|
+
"rows": 124,
|
|
489
|
+
"n": 124
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
"counts": {
|
|
495
|
+
"condition_occurrence": {
|
|
496
|
+
"rows": 48,
|
|
497
|
+
"n": 37
|
|
498
|
+
},
|
|
499
|
+
"person": {
|
|
500
|
+
"rows": 124,
|
|
501
|
+
"n": 124
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "race",
|
|
507
|
+
"base": "selection",
|
|
508
|
+
"humanName": "Race",
|
|
509
|
+
"outputTypes": ["person"],
|
|
510
|
+
"parameters": {},
|
|
511
|
+
"values": ["White"],
|
|
512
|
+
"children": [],
|
|
513
|
+
"counts": {
|
|
514
|
+
"person": {
|
|
515
|
+
"rows": 204,
|
|
516
|
+
"n": 204
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
],
|
|
521
|
+
"counts": {
|
|
522
|
+
"condition_occurrence": {
|
|
523
|
+
"rows": 48,
|
|
524
|
+
"n": 37
|
|
525
|
+
},
|
|
526
|
+
"person": {
|
|
527
|
+
"rows": 27,
|
|
528
|
+
"n": 27
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
]
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
]
|
|
536
|
+
}
|