canql 5.4.0 → 5.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fcbeb6ccebc9a99388e3eeb15f29d9faa270ac17f85cafecdf0384936fc8229
4
- data.tar.gz: 99b63524c4ac676bf7e878475ec59d53701cc35003ecc9dfdafd10630a98b637
3
+ metadata.gz: b8c04694a35cd216e3d898eea6e2203a777f9d5116c40bff49b8da75483d868a
4
+ data.tar.gz: c18be16aa74a11cce48a9aa7d985acbc202c61c5f10e3a1cfddd07c667f83eec
5
5
  SHA512:
6
- metadata.gz: d7b16d016a069fb971fdbf749a3aaa935a9310d9f461109c3a12eb8a72d65ac98beb60eb3f6f7c5040c16b6a52fd39afdb513414cf82b3bdf35b7528c70ad8ae
7
- data.tar.gz: c44e33ce868f67731f27918dad42d4a683057390a9668c60332171ac337d3f643c6f0b03c103da05517be16720ac883cd4824a4a57870653f0363c30b3884649
6
+ metadata.gz: 489de8c90e7f56acee103535eb963227c91f2bc4e6f6c480ba03881e3778ba5fe48e09ee7084e7bea2535fe3a096ced179654c216121967127a72636e1f8cd3e
7
+ data.tar.gz: 62cab1efb443fa2bf8db58b3d84516d89088897be2ab543904c6cd58150bb9320f99fb214eb855412d33a335e42c3cf1d8c471f589549834e5276b16f23a3a26
@@ -1,6 +1,6 @@
1
1
  name: Test
2
2
 
3
- on: [push, pull_request]
3
+ on: [push]
4
4
 
5
5
  jobs:
6
6
  test:
data/CHANGELOG.md CHANGED
@@ -1,25 +1,39 @@
1
1
  ## [Unreleased]
2
- * no relevant changes
2
+ *no unreleased changes*
3
3
 
4
- ## 5.4.0 / 2021-03-08
4
+ ## 5.7.1 / 2021-10-11
5
+ ### Patched
6
+ * Corrected issue where date related tests failed on some ruby version (#83)
7
+
8
+ ## 5.7.0 / 2021-09-16
9
+ * Added new 'fasp' and 'fasp amber and green' case / patient / anomaly categoryfilters (#78)
10
+ * Added new HES, BIOCHEM and USS unprocessed record filters (#79)
11
+
12
+ ## 5.6.0 / 2021-03-16
13
+ ### Added
14
+ * Add new CA Death option to the unprocessed record filter (#75)
5
15
 
16
+ ## 5.5.0 / 2021-03-16
17
+ ### Added
18
+ * Add HES event filter (#72)
19
+
20
+ ## 5.4.0 / 2021-03-08
21
+ ### Added
6
22
  * Add 'pending data' option to the anomaly screening status filter (#69)
7
23
 
8
24
  ## 5.3.0 / 2021-03-05
9
-
25
+ ### Added
10
26
  * Added new FASP case RAG rating filters (#66)
11
27
 
12
28
  ## 5.2.0 / 2021-03-04
13
-
29
+ ### Added
14
30
  * Added new FASP anomaly RAG rating filters (#63)
15
31
 
16
32
  ## 5.1.0 / 2021-01-25
17
-
18
33
  ### Added
19
34
  * Added new filters for test acceptance requirments (#59)
20
35
 
21
36
  ## 5.0.0 / 2021-01-19
22
-
23
37
  ### Changed
24
38
  * Changed the values of registry to use registry name rather than codes and added new supra-region options (#54)
25
39
 
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
@@ -11,7 +11,7 @@ file safety:
11
11
  ".github/workflows/test.yml":
12
12
  comments:
13
13
  reviewed_by: josh.pencheon
14
- safe_revision: 865fc970554fee9207f8e3cd0247133c6a849b24
14
+ safe_revision: a3f5265f1d20a6dcb8c45ab5f09207ca7d1e255c
15
15
  ".gitignore":
16
16
  comments:
17
17
  reviewed_by: timgentry
@@ -27,7 +27,7 @@ file safety:
27
27
  CHANGELOG.md:
28
28
  comments:
29
29
  reviewed_by: ollietulloch
30
- safe_revision: 8e66f9ea2d880e368446969c3b0e63a1660cb427
30
+ safe_revision: 80a300b5aeadf74ca952d4adc4a7a49595e3cc6d
31
31
  CODE_OF_CONDUCT.md:
32
32
  comments:
33
33
  reviewed_by: drewthorp
@@ -43,7 +43,7 @@ file safety:
43
43
  README.md:
44
44
  comments:
45
45
  reviewed_by: josh.pencheon
46
- safe_revision: 8c07968aa84db92b6f1cc528180f73530ddc6ff5
46
+ safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
47
47
  Rakefile:
48
48
  comments:
49
49
  reviewed_by: timgentry
@@ -71,7 +71,7 @@ file safety:
71
71
  lib/canql/grammars.rb:
72
72
  comments:
73
73
  reviewed_by: josh.pencheon
74
- safe_revision: c5f8f76b2c335a8554f39a14d6165bf5cd8f9b67
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,12 +80,12 @@ 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: ollietulloch
84
- safe_revision: b0b092613c94a8c2f04191dbe2a1a347c8e14d16
83
+ reviewed_by: kenny.lee
84
+ safe_revision: 7580eb6b1196dec1fb778ee345d2bce50ef0f7c7
85
85
  lib/canql/grammars/batch_types.treetop:
86
86
  comments:
87
- reviewed_by: josh.pencheon
88
- safe_revision: 1892161f3c300f3b199aa318b3fe23a54dd80829
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
@@ -99,16 +99,20 @@ file safety:
99
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: 9bb663b220e76e78f3f0f48e4bc6334fe9451925
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: ollietulloch
111
- safe_revision: 481194575c30b48987f957a9cc5535d604ea0117
114
+ reviewed_by: kenny.lee
115
+ safe_revision: a69bbd63d71d5fb2ba46d6a84589915b1120763b
112
116
  lib/canql/grammars/perinatal_hospital.treetop:
113
117
  comments:
114
118
  reviewed_by: josh.pencheon
@@ -134,7 +138,7 @@ file safety:
134
138
  lib/canql/nodes.rb:
135
139
  comments:
136
140
  reviewed_by: josh.pencheon
137
- safe_revision: c5f8f76b2c335a8554f39a14d6165bf5cd8f9b67
141
+ safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
138
142
  lib/canql/nodes/age.rb:
139
143
  comments:
140
144
  reviewed_by: timgentry
@@ -145,8 +149,8 @@ file safety:
145
149
  safe_revision: e549c0dcafdd6004ec279bd256fae8b9964c9629
146
150
  lib/canql/nodes/batch_types.rb:
147
151
  comments:
148
- reviewed_by: josh.pencheon
149
- safe_revision: 1892161f3c300f3b199aa318b3fe23a54dd80829
152
+ reviewed_by: kenny.lee
153
+ safe_revision: 49d17e254a95d50dea1448ca59fd45c44937d661
150
154
  lib/canql/nodes/dates.rb:
151
155
  comments:
152
156
  reviewed_by: timgentry
@@ -159,14 +163,18 @@ file safety:
159
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
171
  comments:
164
172
  reviewed_by: josh.pencheon
165
- safe_revision: 361dea5dc6d64bdb7b03434dd2878f8c3b128c95
173
+ safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
166
174
  lib/canql/nodes/patient.rb:
167
175
  comments:
168
- reviewed_by: ollietulloch
169
- safe_revision: 481194575c30b48987f957a9cc5535d604ea0117
176
+ reviewed_by: kenny.lee
177
+ safe_revision: 49d17e254a95d50dea1448ca59fd45c44937d661
170
178
  lib/canql/nodes/perinatal_hospital.rb:
171
179
  comments:
172
180
  reviewed_by: josh.pencheon
@@ -194,7 +202,7 @@ file safety:
194
202
  lib/canql/version.rb:
195
203
  comments:
196
204
  reviewed_by: ollietulloch
197
- safe_revision: 8e66f9ea2d880e368446969c3b0e63a1660cb427
205
+ safe_revision: 80a300b5aeadf74ca952d4adc4a7a49595e3cc6d
198
206
  test/anomaly_test_helper.rb:
199
207
  comments:
200
208
  reviewed_by: ollietulloch
@@ -203,6 +211,10 @@ file safety:
203
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
219
  comments:
208
220
  reviewed_by: timgentry
@@ -221,16 +233,20 @@ file safety:
221
233
  safe_revision: 7490099869e368dcd5c26ded11eb90229baf4cae
222
234
  test/nodes/code_test.rb:
223
235
  comments:
224
- reviewed_by: ollietulloch
225
- safe_revision: e549c0dcafdd6004ec279bd256fae8b9964c9629
236
+ reviewed_by: kenny.lee
237
+ safe_revision: 7580eb6b1196dec1fb778ee345d2bce50ef0f7c7
226
238
  test/nodes/e_base_records_test.rb:
227
239
  comments:
228
- reviewed_by: josh.pencheon
229
- safe_revision: 293248a17d087d7557a6aacdcb5bf3fbec946b87
240
+ reviewed_by: ollietulloch
241
+ safe_revision: bdbff32b03f27a487a68f72f8663215282bf62b6
230
242
  test/nodes/genetic_tests_test.rb:
231
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
251
  comments:
236
252
  reviewed_by: josh.pencheon
@@ -241,16 +257,16 @@ file safety:
241
257
  safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
242
258
  test/nodes/mother_e_base_records_test.rb:
243
259
  comments:
244
- reviewed_by: josh.pencheon
245
- safe_revision: 4805609963f75639e2444df8f42d2d6d65005b7c
260
+ reviewed_by: kenny.lee
261
+ safe_revision: 99ef15c6610409a1562e6a03b015569d087b045f
246
262
  test/nodes/patient_age_test.rb:
247
263
  comments:
248
264
  reviewed_by: josh.pencheon
249
265
  safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
250
266
  test/nodes/patient_test.rb:
251
267
  comments:
252
- reviewed_by: ollietulloch
253
- safe_revision: 481194575c30b48987f957a9cc5535d604ea0117
268
+ reviewed_by: kenny.lee
269
+ safe_revision: a69bbd63d71d5fb2ba46d6a84589915b1120763b
254
270
  test/nodes/perinatal_hospital_test.rb:
255
271
  comments:
256
272
  reviewed_by: josh.pencheon
@@ -270,7 +286,7 @@ file safety:
270
286
  test/parser_test.rb:
271
287
  comments:
272
288
  reviewed_by: josh.pencheon
273
- safe_revision: 293248a17d087d7557a6aacdcb5bf3fbec946b87
289
+ safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
274
290
  test/test_helper.rb:
275
291
  comments:
276
292
  reviewed_by: josh.pencheon
@@ -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 / umum) <Nodes::BatchTypeNode>
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 / action_or_ebr
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' / 'fasp red' /
20
- 'fasp amber' / 'fasp green' / 'fasp excluded'
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
 
@@ -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 #:nodoc: all
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
@@ -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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Canql #:nodoc: all
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
- 'dob': { patient: 'birthdate', mother: 'birthdate' },
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
- 'sex': { patient: 'sex' },
51
- 'outcome': { patient: 'outcome' },
52
- 'edd': { patient: 'expecteddeliverydate' },
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 != 'missing' ? 'fields_populated' : 'fields_missing'
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
@@ -22,3 +22,4 @@ require 'canql/nodes/patient'
22
22
  require 'canql/nodes/main'
23
23
  require 'canql/nodes/registry'
24
24
  require 'canql/nodes/perinatal_hospital'
25
+ require 'canql/nodes/hes_event'
data/lib/canql/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  # This stores the current version of the Canql gem
4
4
  module Canql
5
- VERSION = '5.4.0'
5
+ VERSION = '5.7.1'
6
6
  end
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.0
4
+ version: 5.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHE NDR Development Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-08 00:00:00.000000000 Z
11
+ date: 2021-10-11 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