canql 5.3.0 → 5.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +16 -5
- data/README.md +1 -1
- data/code_safety.yml +107 -91
- data/lib/canql/grammars/anomaly.treetop +2 -2
- data/lib/canql/grammars/batch_types.treetop +19 -2
- data/lib/canql/grammars/hes_event.treetop +15 -0
- data/lib/canql/grammars/main.treetop +4 -2
- data/lib/canql/grammars/patient.treetop +3 -2
- data/lib/canql/grammars.rb +1 -0
- data/lib/canql/nodes/batch_types.rb +25 -1
- data/lib/canql/nodes/hes_event.rb +17 -0
- data/lib/canql/nodes/main.rb +2 -1
- data/lib/canql/nodes/patient.rb +7 -6
- data/lib/canql/nodes.rb +1 -0
- data/lib/canql/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b6c774649dcffa9c8948ce5635e0a383a5dbb3f909fbc58e2ae01e08f2e8ea2
|
4
|
+
data.tar.gz: 77da684a8fe7ccfc0a8736c468a9f4c2baa438467baf5578054714c77da75c47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d8464c8d1ebe51731ab9f3116fdb16e53f450a23a837a210d9b5cef6746c43c4b45095168bb9df7ce0e4c36ec4b27bf56feb594ff80699fa63c330aab2b7108
|
7
|
+
data.tar.gz: 718b15cc009ef0a0830670bfcd29566c80a1fba33ca1741a2274a7ccc7b46ba6b82f29de9216d59e0e275846cff79a8076df0109627986c21889dc5189beea57
|
data/.github/workflows/test.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,22 +1,33 @@
|
|
1
1
|
## [Unreleased]
|
2
|
-
|
2
|
+
## 5.7.0 / 2021-09-16
|
3
|
+
* Added new 'fasp' and 'fasp amber and green' case / patient / anomaly categoryfilters (#78)
|
4
|
+
* Added new HES, BIOCHEM and USS unprocessed record filters (#79)
|
3
5
|
|
6
|
+
## 5.6.0 / 2021-03-16
|
7
|
+
### Added
|
8
|
+
* Add new CA Death option to the unprocessed record filter (#75)
|
4
9
|
|
5
|
-
## 5.
|
10
|
+
## 5.5.0 / 2021-03-16
|
11
|
+
### Added
|
12
|
+
* Add HES event filter (#72)
|
6
13
|
|
14
|
+
## 5.4.0 / 2021-03-08
|
15
|
+
### Added
|
16
|
+
* Add 'pending data' option to the anomaly screening status filter (#69)
|
17
|
+
|
18
|
+
## 5.3.0 / 2021-03-05
|
19
|
+
### Added
|
7
20
|
* Added new FASP case RAG rating filters (#66)
|
8
21
|
|
9
22
|
## 5.2.0 / 2021-03-04
|
10
|
-
|
23
|
+
### Added
|
11
24
|
* Added new FASP anomaly RAG rating filters (#63)
|
12
25
|
|
13
26
|
## 5.1.0 / 2021-01-25
|
14
|
-
|
15
27
|
### Added
|
16
28
|
* Added new filters for test acceptance requirments (#59)
|
17
29
|
|
18
30
|
## 5.0.0 / 2021-01-19
|
19
|
-
|
20
31
|
### Changed
|
21
32
|
* Changed the values of registry to use registry name rather than codes and added new supra-region options (#54)
|
22
33
|
|
data/README.md
CHANGED
@@ -50,7 +50,7 @@ would output:
|
|
50
50
|
and booking at hospital RGT01 and delivery at addenbrookes trust
|
51
51
|
The parser is case insensitive. An example of an almost fully involved CANQL query is:
|
52
52
|
|
53
|
-
> First 27 Male Liveborn Thames Primary Cases Due between 20/06/2015 and 25/06/2015 and Born on 22/06/2015 and that Died on 07/07/2015 with Suspected Prenatal Q20 Anomalies and Booking at hospital RGT01 and Delivery at addenbrookes trust and Postnatal Tests and Missing Postcode and Date of Birth and QA Action and Unprocessed paediatric records and Mother Born between 01/10/1990 and 10/01/1999 and who Died on 01/08/2015 with Populated Postcode and NHS Number
|
53
|
+
> First 27 Male Liveborn Thames Primary Cases Due between 20/06/2015 and 25/06/2015 and Born on 22/06/2015 and that Died on 07/07/2015 with Suspected Prenatal Q20 Anomalies and Booking at hospital RGT01 and Delivery at addenbrookes trust and Postnatal Tests and Missing Postcode and Date of Birth and QA Action and Unprocessed paediatric records and hes records and Mother Born between 01/10/1990 and 10/01/1999 and who Died on 01/08/2015 with Populated Postcode and NHS Number
|
54
54
|
|
55
55
|
Please see the tests for many more examples.
|
56
56
|
|
data/code_safety.yml
CHANGED
@@ -1,77 +1,77 @@
|
|
1
1
|
---
|
2
2
|
file safety:
|
3
3
|
".github/CODEOWNERS":
|
4
|
-
comments:
|
4
|
+
comments:
|
5
5
|
reviewed_by: josh.pencheon
|
6
6
|
safe_revision: a964c47962d47724afd66ba59660589fc3c8b02c
|
7
7
|
".github/workflows/lint.yml":
|
8
|
-
comments:
|
8
|
+
comments:
|
9
9
|
reviewed_by: josh.pencheon
|
10
10
|
safe_revision: 71f6a631758a5a38814d3eafec407e0fde30101f
|
11
11
|
".github/workflows/test.yml":
|
12
|
-
comments:
|
12
|
+
comments:
|
13
13
|
reviewed_by: josh.pencheon
|
14
|
-
safe_revision:
|
14
|
+
safe_revision: a3f5265f1d20a6dcb8c45ab5f09207ca7d1e255c
|
15
15
|
".gitignore":
|
16
|
-
comments:
|
16
|
+
comments:
|
17
17
|
reviewed_by: timgentry
|
18
18
|
safe_revision: cbb48a04cbac04a6dce845110928f69492e152a1
|
19
19
|
".hound.yml":
|
20
|
-
comments:
|
20
|
+
comments:
|
21
21
|
reviewed_by: timgentry
|
22
22
|
safe_revision: 0b34688f1198eace9310f47060aa8915f5b44985
|
23
23
|
".rubocop.yml":
|
24
|
-
comments:
|
24
|
+
comments:
|
25
25
|
reviewed_by: josh.pencheon
|
26
26
|
safe_revision: 146b255b240b0efc928d39dd1b70ab221ddc3138
|
27
27
|
CHANGELOG.md:
|
28
|
-
comments:
|
29
|
-
reviewed_by:
|
30
|
-
safe_revision:
|
28
|
+
comments:
|
29
|
+
reviewed_by: kenny.lee
|
30
|
+
safe_revision: 1f6f0da156ec3d26bfa9b77547646dae1c352b85
|
31
31
|
CODE_OF_CONDUCT.md:
|
32
|
-
comments:
|
32
|
+
comments:
|
33
33
|
reviewed_by: drewthorp
|
34
34
|
safe_revision: 6a666fcabe027056b1c774b2eabb3fdf686911d2
|
35
35
|
Gemfile:
|
36
|
-
comments:
|
36
|
+
comments:
|
37
37
|
reviewed_by: timgentry
|
38
38
|
safe_revision: 6932d590299ad4a9d2ba24b425b158c67142bf74
|
39
39
|
LICENSE.txt:
|
40
|
-
comments:
|
40
|
+
comments:
|
41
41
|
reviewed_by: timgentry
|
42
42
|
safe_revision: ee80c4bbd5e990d38b5fc954f4fd037177672db2
|
43
43
|
README.md:
|
44
|
-
comments:
|
44
|
+
comments:
|
45
45
|
reviewed_by: josh.pencheon
|
46
|
-
safe_revision:
|
46
|
+
safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
|
47
47
|
Rakefile:
|
48
|
-
comments:
|
48
|
+
comments:
|
49
49
|
reviewed_by: timgentry
|
50
50
|
safe_revision: 6932d590299ad4a9d2ba24b425b158c67142bf74
|
51
51
|
bin/console:
|
52
|
-
comments:
|
52
|
+
comments:
|
53
53
|
reviewed_by: timgentry
|
54
54
|
safe_revision: d6f1ccac606735190d30c962b7681ed12aec374a
|
55
55
|
bin/setup:
|
56
|
-
comments:
|
56
|
+
comments:
|
57
57
|
reviewed_by: timgentry
|
58
58
|
safe_revision: 6a666fcabe027056b1c774b2eabb3fdf686911d2
|
59
59
|
canql.gemspec:
|
60
|
-
comments:
|
60
|
+
comments:
|
61
61
|
reviewed_by: josh.pencheon
|
62
62
|
safe_revision: 146b255b240b0efc928d39dd1b70ab221ddc3138
|
63
63
|
lib/canql.rb:
|
64
|
-
comments:
|
64
|
+
comments:
|
65
65
|
reviewed_by: timgentry
|
66
66
|
safe_revision: 6932d590299ad4a9d2ba24b425b158c67142bf74
|
67
67
|
lib/canql/constants.rb:
|
68
|
-
comments:
|
68
|
+
comments:
|
69
69
|
reviewed_by: timgentry
|
70
70
|
safe_revision: d6f1ccac606735190d30c962b7681ed12aec374a
|
71
71
|
lib/canql/grammars.rb:
|
72
|
-
comments:
|
72
|
+
comments:
|
73
73
|
reviewed_by: josh.pencheon
|
74
|
-
safe_revision:
|
74
|
+
safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
|
75
75
|
lib/canql/grammars/age.treetop:
|
76
76
|
comments: It is a known issue that this is potentially susceptible to certain
|
77
77
|
kinds of DoS attack
|
@@ -80,41 +80,45 @@ file safety:
|
|
80
80
|
lib/canql/grammars/anomaly.treetop:
|
81
81
|
comments: It is a known issue that this is potentially susceptible to certain
|
82
82
|
kinds of DoS attack
|
83
|
-
reviewed_by:
|
84
|
-
safe_revision:
|
83
|
+
reviewed_by: kenny.lee
|
84
|
+
safe_revision: 7580eb6b1196dec1fb778ee345d2bce50ef0f7c7
|
85
85
|
lib/canql/grammars/batch_types.treetop:
|
86
|
-
comments:
|
87
|
-
reviewed_by:
|
88
|
-
safe_revision:
|
86
|
+
comments:
|
87
|
+
reviewed_by: kenny.lee
|
88
|
+
safe_revision: 5bd6ccd1951140ab01b701583af94f414188b299
|
89
89
|
lib/canql/grammars/dates.treetop:
|
90
90
|
comments: It is a known issue that this is potentially susceptible to certain
|
91
91
|
kinds of DoS attack
|
92
92
|
reviewed_by: timgentry
|
93
93
|
safe_revision: 2346abb4435bf95cbe9b4d8c124123b9fefe60d6
|
94
94
|
lib/canql/grammars/e_base_records.treetop:
|
95
|
-
comments:
|
95
|
+
comments:
|
96
96
|
reviewed_by: josh.pencheon
|
97
97
|
safe_revision: 4e26ac746098452b01dac88373e401e39f309b74
|
98
98
|
lib/canql/grammars/genetic_test.treetop:
|
99
|
-
comments:
|
99
|
+
comments:
|
100
100
|
reviewed_by: josh.pencheon
|
101
101
|
safe_revision: 526dbe8a3dc3334b4174928e6f51d07e48ed9247
|
102
|
+
lib/canql/grammars/hes_event.treetop:
|
103
|
+
comments:
|
104
|
+
reviewed_by: josh.pencheon
|
105
|
+
safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
|
102
106
|
lib/canql/grammars/main.treetop:
|
103
107
|
comments: It is a known issue that this is potentially susceptible to certain
|
104
108
|
kinds of DoS attack
|
105
109
|
reviewed_by: josh.pencheon
|
106
|
-
safe_revision:
|
110
|
+
safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
|
107
111
|
lib/canql/grammars/patient.treetop:
|
108
112
|
comments: It is a known issue that this is potentially susceptible to certain
|
109
113
|
kinds of DoS attack
|
110
|
-
reviewed_by:
|
111
|
-
safe_revision:
|
114
|
+
reviewed_by: kenny.lee
|
115
|
+
safe_revision: a69bbd63d71d5fb2ba46d6a84589915b1120763b
|
112
116
|
lib/canql/grammars/perinatal_hospital.treetop:
|
113
|
-
comments:
|
117
|
+
comments:
|
114
118
|
reviewed_by: josh.pencheon
|
115
119
|
safe_revision: c431b8a476b84d077e9c39a2a13c2b17a296773d
|
116
120
|
lib/canql/grammars/provider.treetop:
|
117
|
-
comments:
|
121
|
+
comments:
|
118
122
|
reviewed_by: josh.pencheon
|
119
123
|
safe_revision: c431b8a476b84d077e9c39a2a13c2b17a296773d
|
120
124
|
lib/canql/grammars/registry.treetop:
|
@@ -128,150 +132,162 @@ file safety:
|
|
128
132
|
reviewed_by: timgentry
|
129
133
|
safe_revision: c39d24bb500719971969762e94545e82866bf92f
|
130
134
|
lib/canql/grammars/test_result_group.treetop:
|
131
|
-
comments:
|
135
|
+
comments:
|
132
136
|
reviewed_by: josh.pencheon
|
133
137
|
safe_revision: 9bb663b220e76e78f3f0f48e4bc6334fe9451925
|
134
138
|
lib/canql/nodes.rb:
|
135
|
-
comments:
|
139
|
+
comments:
|
136
140
|
reviewed_by: josh.pencheon
|
137
|
-
safe_revision:
|
141
|
+
safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
|
138
142
|
lib/canql/nodes/age.rb:
|
139
|
-
comments:
|
143
|
+
comments:
|
140
144
|
reviewed_by: timgentry
|
141
145
|
safe_revision: 6932d590299ad4a9d2ba24b425b158c67142bf74
|
142
146
|
lib/canql/nodes/anomaly.rb:
|
143
|
-
comments:
|
147
|
+
comments:
|
144
148
|
reviewed_by: ollietulloch
|
145
149
|
safe_revision: e549c0dcafdd6004ec279bd256fae8b9964c9629
|
146
150
|
lib/canql/nodes/batch_types.rb:
|
147
|
-
comments:
|
148
|
-
reviewed_by:
|
149
|
-
safe_revision:
|
151
|
+
comments:
|
152
|
+
reviewed_by: kenny.lee
|
153
|
+
safe_revision: 49d17e254a95d50dea1448ca59fd45c44937d661
|
150
154
|
lib/canql/nodes/dates.rb:
|
151
|
-
comments:
|
155
|
+
comments:
|
152
156
|
reviewed_by: timgentry
|
153
157
|
safe_revision: 6932d590299ad4a9d2ba24b425b158c67142bf74
|
154
158
|
lib/canql/nodes/e_base_records.rb:
|
155
|
-
comments:
|
159
|
+
comments:
|
156
160
|
reviewed_by: josh.pencheon
|
157
161
|
safe_revision: 4805609963f75639e2444df8f42d2d6d65005b7c
|
158
162
|
lib/canql/nodes/genetic_test.rb:
|
159
|
-
comments:
|
163
|
+
comments:
|
160
164
|
reviewed_by: josh.pencheon
|
161
165
|
safe_revision: 526dbe8a3dc3334b4174928e6f51d07e48ed9247
|
166
|
+
lib/canql/nodes/hes_event.rb:
|
167
|
+
comments:
|
168
|
+
reviewed_by: josh.pencheon
|
169
|
+
safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
|
162
170
|
lib/canql/nodes/main.rb:
|
163
|
-
comments:
|
171
|
+
comments:
|
164
172
|
reviewed_by: josh.pencheon
|
165
|
-
safe_revision:
|
173
|
+
safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
|
166
174
|
lib/canql/nodes/patient.rb:
|
167
|
-
comments:
|
168
|
-
reviewed_by:
|
169
|
-
safe_revision:
|
175
|
+
comments:
|
176
|
+
reviewed_by: kenny.lee
|
177
|
+
safe_revision: 49d17e254a95d50dea1448ca59fd45c44937d661
|
170
178
|
lib/canql/nodes/perinatal_hospital.rb:
|
171
|
-
comments:
|
179
|
+
comments:
|
172
180
|
reviewed_by: josh.pencheon
|
173
181
|
safe_revision: c431b8a476b84d077e9c39a2a13c2b17a296773d
|
174
182
|
lib/canql/nodes/registry.rb:
|
175
|
-
comments:
|
183
|
+
comments:
|
176
184
|
reviewed_by: josh.pencheon
|
177
185
|
safe_revision: 4e26ac746098452b01dac88373e401e39f309b74
|
178
186
|
lib/canql/nodes/test_result.rb:
|
179
|
-
comments:
|
187
|
+
comments:
|
180
188
|
reviewed_by: timgentry
|
181
189
|
safe_revision: c39d24bb500719971969762e94545e82866bf92f
|
182
190
|
lib/canql/nodes/test_result_group.rb:
|
183
|
-
comments:
|
191
|
+
comments:
|
184
192
|
reviewed_by: josh.pencheon
|
185
193
|
safe_revision: 9bb663b220e76e78f3f0f48e4bc6334fe9451925
|
186
194
|
lib/canql/parser.rb:
|
187
|
-
comments:
|
195
|
+
comments:
|
188
196
|
reviewed_by: timgentry
|
189
197
|
safe_revision: 6932d590299ad4a9d2ba24b425b158c67142bf74
|
190
198
|
lib/canql/treetop/extensions.rb:
|
191
|
-
comments:
|
199
|
+
comments:
|
192
200
|
reviewed_by: timgentry
|
193
201
|
safe_revision: 6932d590299ad4a9d2ba24b425b158c67142bf74
|
194
202
|
lib/canql/version.rb:
|
195
|
-
comments:
|
196
|
-
reviewed_by:
|
197
|
-
safe_revision:
|
203
|
+
comments:
|
204
|
+
reviewed_by: kenny.lee
|
205
|
+
safe_revision: 1f6f0da156ec3d26bfa9b77547646dae1c352b85
|
198
206
|
test/anomaly_test_helper.rb:
|
199
|
-
comments:
|
207
|
+
comments:
|
200
208
|
reviewed_by: ollietulloch
|
201
209
|
safe_revision: e549c0dcafdd6004ec279bd256fae8b9964c9629
|
202
210
|
test/canql_test.rb:
|
203
|
-
comments:
|
211
|
+
comments:
|
204
212
|
reviewed_by: timgentry
|
205
213
|
safe_revision: 6932d590299ad4a9d2ba24b425b158c67142bf74
|
214
|
+
test/hes_event_test_helper.rb:
|
215
|
+
comments:
|
216
|
+
reviewed_by: josh.pencheon
|
217
|
+
safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
|
206
218
|
test/minitest_helper.rb:
|
207
|
-
comments:
|
219
|
+
comments:
|
208
220
|
reviewed_by: timgentry
|
209
221
|
safe_revision: 6932d590299ad4a9d2ba24b425b158c67142bf74
|
210
222
|
test/nodes/anomaly_test.rb:
|
211
|
-
comments:
|
212
|
-
reviewed_by:
|
213
|
-
safe_revision:
|
223
|
+
comments:
|
224
|
+
reviewed_by: ollietulloch
|
225
|
+
safe_revision: b0b092613c94a8c2f04191dbe2a1a347c8e14d16
|
214
226
|
test/nodes/case_age_test.rb:
|
215
|
-
comments:
|
227
|
+
comments:
|
216
228
|
reviewed_by: josh.pencheon
|
217
229
|
safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
|
218
230
|
test/nodes/case_test.rb:
|
219
|
-
comments:
|
231
|
+
comments:
|
220
232
|
reviewed_by: josh.pencheon
|
221
233
|
safe_revision: 7490099869e368dcd5c26ded11eb90229baf4cae
|
222
234
|
test/nodes/code_test.rb:
|
223
|
-
comments:
|
224
|
-
reviewed_by:
|
225
|
-
safe_revision:
|
235
|
+
comments:
|
236
|
+
reviewed_by: kenny.lee
|
237
|
+
safe_revision: 7580eb6b1196dec1fb778ee345d2bce50ef0f7c7
|
226
238
|
test/nodes/e_base_records_test.rb:
|
227
|
-
comments:
|
228
|
-
reviewed_by:
|
229
|
-
safe_revision:
|
239
|
+
comments:
|
240
|
+
reviewed_by: kenny.lee
|
241
|
+
safe_revision: 5bd6ccd1951140ab01b701583af94f414188b299
|
230
242
|
test/nodes/genetic_tests_test.rb:
|
231
|
-
comments:
|
243
|
+
comments:
|
232
244
|
reviewed_by: josh.pencheon
|
233
245
|
safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
|
246
|
+
test/nodes/hes_event_test.rb:
|
247
|
+
comments:
|
248
|
+
reviewed_by: josh.pencheon
|
249
|
+
safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
|
234
250
|
test/nodes/main_case_test.rb:
|
235
|
-
comments:
|
251
|
+
comments:
|
236
252
|
reviewed_by: josh.pencheon
|
237
253
|
safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
|
238
254
|
test/nodes/main_patient_test.rb:
|
239
|
-
comments:
|
255
|
+
comments:
|
240
256
|
reviewed_by: josh.pencheon
|
241
257
|
safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
|
242
258
|
test/nodes/mother_e_base_records_test.rb:
|
243
|
-
comments:
|
244
|
-
reviewed_by:
|
245
|
-
safe_revision:
|
259
|
+
comments:
|
260
|
+
reviewed_by: kenny.lee
|
261
|
+
safe_revision: 99ef15c6610409a1562e6a03b015569d087b045f
|
246
262
|
test/nodes/patient_age_test.rb:
|
247
|
-
comments:
|
263
|
+
comments:
|
248
264
|
reviewed_by: josh.pencheon
|
249
265
|
safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
|
250
266
|
test/nodes/patient_test.rb:
|
251
|
-
comments:
|
252
|
-
reviewed_by:
|
253
|
-
safe_revision:
|
267
|
+
comments:
|
268
|
+
reviewed_by: kenny.lee
|
269
|
+
safe_revision: a69bbd63d71d5fb2ba46d6a84589915b1120763b
|
254
270
|
test/nodes/perinatal_hospital_test.rb:
|
255
|
-
comments:
|
271
|
+
comments:
|
256
272
|
reviewed_by: josh.pencheon
|
257
273
|
safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
|
258
274
|
test/nodes/registry_test.rb:
|
259
|
-
comments:
|
275
|
+
comments:
|
260
276
|
reviewed_by: josh.pencheon
|
261
277
|
safe_revision: 293248a17d087d7557a6aacdcb5bf3fbec946b87
|
262
278
|
test/nodes/test_result_groups_test.rb:
|
263
|
-
comments:
|
279
|
+
comments:
|
264
280
|
reviewed_by: josh.pencheon
|
265
281
|
safe_revision: 9bb663b220e76e78f3f0f48e4bc6334fe9451925
|
266
282
|
test/nodes/test_results_test.rb:
|
267
|
-
comments:
|
283
|
+
comments:
|
268
284
|
reviewed_by: josh.pencheon
|
269
285
|
safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
|
270
286
|
test/parser_test.rb:
|
271
|
-
comments:
|
287
|
+
comments:
|
272
288
|
reviewed_by: josh.pencheon
|
273
|
-
safe_revision:
|
289
|
+
safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
|
274
290
|
test/test_helper.rb:
|
275
|
-
comments:
|
291
|
+
comments:
|
276
292
|
reviewed_by: josh.pencheon
|
277
293
|
safe_revision: 42bb9bd177a761b9d04d728e53fcf0ebd0083ae4
|
@@ -23,7 +23,7 @@ module Canql
|
|
23
23
|
'ics' / 'ineligible unbooked' / 'inb' / 'early detected' / 'ied' /
|
24
24
|
'screen declined' / 'sd' / 'ineligible early loss' / 'iefl' / 'ineligible top' /
|
25
25
|
'itop' / 'missed screen' / 'ms' / 'excluded' / 'exc' / 'detected' /
|
26
|
-
'undetected' / 'ineligible') word_break
|
26
|
+
'undetected' / 'ineligible' / 'pending data') word_break
|
27
27
|
end
|
28
28
|
|
29
29
|
rule anomalies_keyword
|
@@ -47,7 +47,7 @@ module Canql
|
|
47
47
|
end
|
48
48
|
|
49
49
|
rule fasp_rating
|
50
|
-
('fasp red and amber' / 'fasp amber and red' / 'fasp red' / 'fasp amber' / 'fasp green') <Nodes::Anomaly::SingleFaspRatingNode>
|
50
|
+
('fasp amber and green' / 'fasp green and amber' / 'fasp red and amber' / 'fasp amber and red' / 'fasp red' / 'fasp amber' / 'fasp green') <Nodes::Anomaly::SingleFaspRatingNode>
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
module Canql
|
2
2
|
grammar BatchTypes
|
3
3
|
rule batch_type
|
4
|
-
(paediatric / enote2 / badger / ucyto / nipt / rddeath /
|
4
|
+
(paediatric / enote2 / badger / ucyto / nipt / rddeath /
|
5
|
+
umum / ca_death / biochem / hes / uss) <Nodes::BatchTypeNode>
|
5
6
|
end
|
6
7
|
|
7
8
|
rule paediatric
|
@@ -24,12 +25,28 @@ module Canql
|
|
24
25
|
'nipt' <Nodes::NiptNode>
|
25
26
|
end
|
26
27
|
|
28
|
+
rule biochem
|
29
|
+
'biochem' <Nodes::BiochemNode>
|
30
|
+
end
|
31
|
+
|
32
|
+
rule hes
|
33
|
+
'hes' <Nodes::HesNode>
|
34
|
+
end
|
35
|
+
|
36
|
+
rule uss
|
37
|
+
('uss' / 'ultrasound screening' ) <Nodes::UssNode>
|
38
|
+
end
|
39
|
+
|
27
40
|
rule rddeath
|
28
|
-
('rddeath' / 'rare disease death') <Nodes::RddeathNode>
|
41
|
+
('rddeath' / 'rd death' / 'rare disease death') <Nodes::RddeathNode>
|
29
42
|
end
|
30
43
|
|
31
44
|
rule umum
|
32
45
|
('umum' / 'mum') <Nodes::UmumNode>
|
33
46
|
end
|
47
|
+
|
48
|
+
rule ca_death
|
49
|
+
('cadeath' / 'ca death' / 'congenital anomaly death') <Nodes::CADeathNode>
|
50
|
+
end
|
34
51
|
end
|
35
52
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Canql
|
2
|
+
grammar HesEvent
|
3
|
+
rule hes_events
|
4
|
+
and_keyword? existance_modifier:hes_no_keyword? hes_keyword <Nodes::HesEvent::WithCondition>
|
5
|
+
end
|
6
|
+
|
7
|
+
rule hes_no_keyword
|
8
|
+
space ('no' / 'some') word_break
|
9
|
+
end
|
10
|
+
|
11
|
+
rule hes_keyword
|
12
|
+
space ('hes events' / 'hes records') word_break
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -6,6 +6,7 @@ grammar Canql
|
|
6
6
|
include GeneticTest
|
7
7
|
include TestResult
|
8
8
|
include TestResultGroup
|
9
|
+
include HesEvent
|
9
10
|
include Dates
|
10
11
|
include EBaseRecords
|
11
12
|
include BatchTypes
|
@@ -130,10 +131,11 @@ grammar Canql
|
|
130
131
|
rule case_with_conditions
|
131
132
|
anomalies / genetic_tests / test_results / perinatal_hospital /
|
132
133
|
case_field_existance / test_acceptance_existance / test_result_groups /
|
133
|
-
mother_conditions / action_or_ebr
|
134
|
+
mother_conditions / action_or_ebr / hes_events
|
134
135
|
end
|
135
136
|
|
136
137
|
rule patient_with_conditions
|
137
|
-
anomalies / genetic_tests / test_results / patient_field_existance /
|
138
|
+
anomalies / genetic_tests / test_results / patient_field_existance /
|
139
|
+
action_or_ebr / hes_events
|
138
140
|
end
|
139
141
|
end
|
@@ -16,8 +16,9 @@ module Canql
|
|
16
16
|
space category:('eurocat amber and green' /
|
17
17
|
'eurocat red and amber' / 'eurocat red' / 'eurocat amber' /
|
18
18
|
'eurocat green' / 'eurocat' /
|
19
|
-
'fasp red and amber' / 'fasp amber and red' /
|
20
|
-
'fasp amber' / 'fasp green' / 'fasp
|
19
|
+
'fasp red and amber' / 'fasp amber and red' /
|
20
|
+
'fasp amber and green' / 'fasp green and amber' / 'fasp red' /
|
21
|
+
'fasp amber' / 'fasp green' / 'fasp excluded' / 'fasp'
|
21
22
|
) word_break <Nodes::Patient::CategoryNode>
|
22
23
|
end
|
23
24
|
|
data/lib/canql/grammars.rb
CHANGED
@@ -14,4 +14,5 @@ Treetop.load File.expand_path('grammars/patient', File.dirname(__FILE__))
|
|
14
14
|
Treetop.load File.expand_path('grammars/registry', File.dirname(__FILE__))
|
15
15
|
Treetop.load File.expand_path('grammars/provider', File.dirname(__FILE__))
|
16
16
|
Treetop.load File.expand_path('grammars/perinatal_hospital', File.dirname(__FILE__))
|
17
|
+
Treetop.load File.expand_path('grammars/hes_event', File.dirname(__FILE__))
|
17
18
|
Treetop.load File.expand_path('grammars/main', File.dirname(__FILE__))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module Canql
|
3
|
+
module Canql # :nodoc: all
|
4
4
|
module Nodes
|
5
5
|
module BatchTypeNode
|
6
6
|
def to_type
|
@@ -39,6 +39,24 @@ module Canql #:nodoc: all
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
module BiochemNode
|
43
|
+
def normalise
|
44
|
+
'biochem'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
module HesNode
|
49
|
+
def normalise
|
50
|
+
'hes'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
module UssNode
|
55
|
+
def normalise
|
56
|
+
'uss'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
42
60
|
module RddeathNode
|
43
61
|
def normalise
|
44
62
|
'rd_death'
|
@@ -50,5 +68,11 @@ module Canql #:nodoc: all
|
|
50
68
|
'umum'
|
51
69
|
end
|
52
70
|
end
|
71
|
+
|
72
|
+
module CADeathNode
|
73
|
+
def normalise
|
74
|
+
'ca_death'
|
75
|
+
end
|
76
|
+
end
|
53
77
|
end
|
54
78
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Canql #:nodoc: all
|
4
|
+
module Nodes
|
5
|
+
module HesEvent
|
6
|
+
module WithCondition
|
7
|
+
def to_hes
|
8
|
+
{ 'exists' => existance_filter }
|
9
|
+
end
|
10
|
+
|
11
|
+
def existance_filter
|
12
|
+
{ Canql::EQUALS => existance_modifier.text_value.strip != 'no' }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/canql/nodes/main.rb
CHANGED
@@ -32,7 +32,7 @@ module Canql #:nodoc: all
|
|
32
32
|
sub_clauses = build_sub_clauses
|
33
33
|
|
34
34
|
%i[
|
35
|
-
anomalies genetic_tests test_results test_result_groups test_acceptances
|
35
|
+
anomalies genetic_tests test_results test_result_groups test_acceptances hes_events
|
36
36
|
].each do |condition_key|
|
37
37
|
if sub_clauses[condition_key].present?
|
38
38
|
conditions[condition_key.to_s] = { Canql::ALL => sub_clauses[condition_key] }
|
@@ -52,6 +52,7 @@ module Canql #:nodoc: all
|
|
52
52
|
sub_clauses, element, :test_result_groups, :to_test_result_group
|
53
53
|
)
|
54
54
|
add_sub_clause(sub_clauses, element, :test_acceptances, :to_test_acceptance)
|
55
|
+
add_sub_clause(sub_clauses, element, :hes_events, :to_hes)
|
55
56
|
end
|
56
57
|
sub_clauses
|
57
58
|
end
|
data/lib/canql/nodes/patient.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module Canql
|
3
|
+
module Canql # :nodoc: all
|
4
4
|
module Nodes
|
5
5
|
module Patient
|
6
6
|
module GenderNode
|
@@ -30,6 +30,7 @@ module Canql #:nodoc: all
|
|
30
30
|
if category.text_value.start_with?('eurocat ') || category.text_value.start_with?('fasp ')
|
31
31
|
filter_value = category.text_value.gsub(/( )/, '_').downcase.gsub(/(_and_)/, '_')
|
32
32
|
filter_value = 'fasp_red_amber' if filter_value == 'fasp_amber_red'
|
33
|
+
filter_value = 'fasp_amber_green' if filter_value == 'fasp_green_amber'
|
33
34
|
return filter_value
|
34
35
|
end
|
35
36
|
|
@@ -40,16 +41,16 @@ module Canql #:nodoc: all
|
|
40
41
|
module FieldExists
|
41
42
|
FIELDS = {
|
42
43
|
'date of birth': { patient: 'birthdate', mother: 'birthdate' },
|
43
|
-
|
44
|
+
dob: { patient: 'birthdate', mother: 'birthdate' },
|
44
45
|
'date of vital status': { patient: 'dateofvitalstatus', mother: 'dateofvitalstatus' },
|
45
46
|
'delivery postcode': { patient: 'delivery_postcode' },
|
46
47
|
'booking postcode': { patient: 'booking_postcode' },
|
47
48
|
'nhs number': { patient: 'nhsnumber', mother: 'nhsnumber' },
|
48
49
|
'birth weight': { patient: 'weight' },
|
49
50
|
'place of delivery': { patient: 'placeofdelivery' },
|
50
|
-
|
51
|
-
|
52
|
-
|
51
|
+
sex: { patient: 'sex' },
|
52
|
+
outcome: { patient: 'outcome' },
|
53
|
+
edd: { patient: 'expecteddeliverydate' },
|
53
54
|
'expected delivery date': { patient: 'expecteddeliverydate' },
|
54
55
|
'booking hospital': { patient: 'booking_hospital' },
|
55
56
|
'screening status': { patient: 'screeningstatus' },
|
@@ -65,7 +66,7 @@ module Canql #:nodoc: all
|
|
65
66
|
patient_field_list.text_values_for_marker(:patient_field_name), subject.to_sym
|
66
67
|
)
|
67
68
|
modifer = field_existance_modifier.text_value.strip
|
68
|
-
existance = modifer
|
69
|
+
existance = modifer == 'missing' ? 'fields_missing' : 'fields_populated'
|
69
70
|
{ "#{subject}.#{existance}" => { Canql::EQUALS => field_names } }
|
70
71
|
end
|
71
72
|
|
data/lib/canql/nodes.rb
CHANGED
data/lib/canql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHE NDR Development Team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chronic
|
@@ -235,6 +235,7 @@ files:
|
|
235
235
|
- lib/canql/grammars/dates.treetop
|
236
236
|
- lib/canql/grammars/e_base_records.treetop
|
237
237
|
- lib/canql/grammars/genetic_test.treetop
|
238
|
+
- lib/canql/grammars/hes_event.treetop
|
238
239
|
- lib/canql/grammars/main.treetop
|
239
240
|
- lib/canql/grammars/patient.treetop
|
240
241
|
- lib/canql/grammars/perinatal_hospital.treetop
|
@@ -249,6 +250,7 @@ files:
|
|
249
250
|
- lib/canql/nodes/dates.rb
|
250
251
|
- lib/canql/nodes/e_base_records.rb
|
251
252
|
- lib/canql/nodes/genetic_test.rb
|
253
|
+
- lib/canql/nodes/hes_event.rb
|
252
254
|
- lib/canql/nodes/main.rb
|
253
255
|
- lib/canql/nodes/patient.rb
|
254
256
|
- lib/canql/nodes/perinatal_hospital.rb
|
@@ -262,7 +264,7 @@ homepage: https://github.com/PublicHealthEngland/canql
|
|
262
264
|
licenses:
|
263
265
|
- MIT
|
264
266
|
metadata: {}
|
265
|
-
post_install_message:
|
267
|
+
post_install_message:
|
266
268
|
rdoc_options: []
|
267
269
|
require_paths:
|
268
270
|
- lib
|
@@ -277,8 +279,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
277
279
|
- !ruby/object:Gem::Version
|
278
280
|
version: '0'
|
279
281
|
requirements: []
|
280
|
-
rubygems_version: 3.
|
281
|
-
signing_key:
|
282
|
+
rubygems_version: 3.1.4
|
283
|
+
signing_key:
|
282
284
|
specification_version: 4
|
283
285
|
summary: Congenital Anomaly Natural Query Language
|
284
286
|
test_files: []
|