canql 5.6.0 → 5.8.0

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: 69ac77dc14c9bcc2dd95a64e29769c0745f22618dcde8d61da511037b9a57ac1
4
- data.tar.gz: 3a75f686973aff03cae2f87d573c6037db3d28e1de8f3c2a41ded5f42b04b8c0
3
+ metadata.gz: db0101ed9a42781086ed80279217c3e906dd96e270318ace7a625f16f7c397e2
4
+ data.tar.gz: fcf832cf721a9e033c10dfd57e6c4a1bc7dc722d6444560aeb9c2b80192225da
5
5
  SHA512:
6
- metadata.gz: 9daec279858e2f8aeeb96ea9bf06c87d50e0061f6a5b47a7c06f8f7de071d2c85033f2025b7e1a4ad50af4f8e41d222e45f1a0a60f4bf1da45010c2ae5bf6b14
7
- data.tar.gz: 9c691d7d0e6b356ed2af4cdfc0787d8499d81ab930db1c295932384e35a5c3283698fb7fb361332ef2db67263ea337fefc1110b8872bacded290b61f2c669bad
6
+ metadata.gz: ab0f1536746bd0c1d1f9b49b5b44fb79862073f15dc078ea320ce04151da4bb58b00ad0e15d9c57c83f4d64461f2f14efbdcf7594d4f66d7c7616d8f9c4e5d43
7
+ data.tar.gz: c69532221304fe322ce64e2591dff87fe9084cbf1de205111b23eec8ee83c7ddb1949f62000d9877ff1c4e58f025c3c234b0881d2eeea6da09705a52427bde51
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  ## [Unreleased]
2
- * no relevant changes
2
+ *no unreleased changes*
3
+
4
+ ## 5.8.0 / 2022-07-18
5
+ * Added new 'badger_search' registration action type filter (#86)
6
+
7
+ ## 5.7.1 / 2021-10-11
8
+ ### Patched
9
+ * Corrected issue where date related tests failed on some ruby version (#83)
10
+
11
+ ## 5.7.0 / 2021-09-16
12
+ * Added new 'fasp' and 'fasp amber and green' case / patient / anomaly categoryfilters (#78)
13
+ * Added new HES, BIOCHEM and USS unprocessed record filters (#79)
3
14
 
4
15
  ## 5.6.0 / 2021-03-16
5
16
  ### Added
data/code_safety.yml CHANGED
@@ -26,8 +26,8 @@ file safety:
26
26
  safe_revision: 146b255b240b0efc928d39dd1b70ab221ddc3138
27
27
  CHANGELOG.md:
28
28
  comments:
29
- reviewed_by: josh.pencheon
30
- safe_revision: 29d2a4accc6fbe9305b01e79cb285e5bf8531cbc
29
+ reviewed_by: ollietulloch
30
+ safe_revision: ce307f20916a4866631128076b4dbfa821d9c780
31
31
  CODE_OF_CONDUCT.md:
32
32
  comments:
33
33
  reviewed_by: drewthorp
@@ -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: df64f58ac3cc8dbd70d1792d24071ef013f9ae42
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
@@ -93,8 +93,8 @@ file safety:
93
93
  safe_revision: 2346abb4435bf95cbe9b4d8c124123b9fefe60d6
94
94
  lib/canql/grammars/e_base_records.treetop:
95
95
  comments:
96
- reviewed_by: josh.pencheon
97
- safe_revision: 4e26ac746098452b01dac88373e401e39f309b74
96
+ reviewed_by: ollietulloch
97
+ safe_revision: b7af9756bba9a1c67d05dda58c6b7446827f1a7e
98
98
  lib/canql/grammars/genetic_test.treetop:
99
99
  comments:
100
100
  reviewed_by: josh.pencheon
@@ -111,8 +111,8 @@ file safety:
111
111
  lib/canql/grammars/patient.treetop:
112
112
  comments: It is a known issue that this is potentially susceptible to certain
113
113
  kinds of DoS attack
114
- reviewed_by: ollietulloch
115
- safe_revision: 481194575c30b48987f957a9cc5535d604ea0117
114
+ reviewed_by: kenny.lee
115
+ safe_revision: a69bbd63d71d5fb2ba46d6a84589915b1120763b
116
116
  lib/canql/grammars/perinatal_hospital.treetop:
117
117
  comments:
118
118
  reviewed_by: josh.pencheon
@@ -149,8 +149,8 @@ file safety:
149
149
  safe_revision: e549c0dcafdd6004ec279bd256fae8b9964c9629
150
150
  lib/canql/nodes/batch_types.rb:
151
151
  comments:
152
- reviewed_by: josh.pencheon
153
- safe_revision: df64f58ac3cc8dbd70d1792d24071ef013f9ae42
152
+ reviewed_by: kenny.lee
153
+ safe_revision: 49d17e254a95d50dea1448ca59fd45c44937d661
154
154
  lib/canql/nodes/dates.rb:
155
155
  comments:
156
156
  reviewed_by: timgentry
@@ -173,8 +173,8 @@ file safety:
173
173
  safe_revision: 3ace8794c1c545b47898da1fbee49af8afdbf521
174
174
  lib/canql/nodes/patient.rb:
175
175
  comments:
176
- reviewed_by: ollietulloch
177
- safe_revision: 481194575c30b48987f957a9cc5535d604ea0117
176
+ reviewed_by: kenny.lee
177
+ safe_revision: 49d17e254a95d50dea1448ca59fd45c44937d661
178
178
  lib/canql/nodes/perinatal_hospital.rb:
179
179
  comments:
180
180
  reviewed_by: josh.pencheon
@@ -201,8 +201,8 @@ file safety:
201
201
  safe_revision: 6932d590299ad4a9d2ba24b425b158c67142bf74
202
202
  lib/canql/version.rb:
203
203
  comments:
204
- reviewed_by: josh.pencheon
205
- safe_revision: 29d2a4accc6fbe9305b01e79cb285e5bf8531cbc
204
+ reviewed_by: ollietulloch
205
+ safe_revision: ce307f20916a4866631128076b4dbfa821d9c780
206
206
  test/anomaly_test_helper.rb:
207
207
  comments:
208
208
  reviewed_by: ollietulloch
@@ -233,12 +233,12 @@ file safety:
233
233
  safe_revision: 7490099869e368dcd5c26ded11eb90229baf4cae
234
234
  test/nodes/code_test.rb:
235
235
  comments:
236
- reviewed_by: ollietulloch
237
- safe_revision: e549c0dcafdd6004ec279bd256fae8b9964c9629
236
+ reviewed_by: kenny.lee
237
+ safe_revision: 7580eb6b1196dec1fb778ee345d2bce50ef0f7c7
238
238
  test/nodes/e_base_records_test.rb:
239
239
  comments:
240
- reviewed_by: josh.pencheon
241
- safe_revision: df64f58ac3cc8dbd70d1792d24071ef013f9ae42
240
+ reviewed_by: ollietulloch
241
+ safe_revision: b7af9756bba9a1c67d05dda58c6b7446827f1a7e
242
242
  test/nodes/genetic_tests_test.rb:
243
243
  comments:
244
244
  reviewed_by: josh.pencheon
@@ -257,16 +257,16 @@ file safety:
257
257
  safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
258
258
  test/nodes/mother_e_base_records_test.rb:
259
259
  comments:
260
- reviewed_by: josh.pencheon
261
- safe_revision: 4805609963f75639e2444df8f42d2d6d65005b7c
260
+ reviewed_by: kenny.lee
261
+ safe_revision: 99ef15c6610409a1562e6a03b015569d087b045f
262
262
  test/nodes/patient_age_test.rb:
263
263
  comments:
264
264
  reviewed_by: josh.pencheon
265
265
  safe_revision: 511e4238f83eb5b32839c25d94ec2a59145539bb
266
266
  test/nodes/patient_test.rb:
267
267
  comments:
268
- reviewed_by: ollietulloch
269
- safe_revision: 481194575c30b48987f957a9cc5535d604ea0117
268
+ reviewed_by: kenny.lee
269
+ safe_revision: a69bbd63d71d5fb2ba46d6a84589915b1120763b
270
270
  test/nodes/perinatal_hospital_test.rb:
271
271
  comments:
272
272
  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 / ca_death) <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,6 +25,18 @@ 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
41
  ('rddeath' / 'rd death' / 'rare disease death') <Nodes::RddeathNode>
29
42
  end
@@ -49,8 +49,8 @@ module Canql
49
49
  end
50
50
 
51
51
  rule accepted_action
52
- 'coding_clinic' / 'coding_group' / 'complete' / 'qa' / 'reg_group' /
53
- 'scr_checked' / 'scr_check' / 'search' / 'technical'
52
+ 'badger_search' / 'coding_clinic' / 'coding_group' / 'complete' / 'qa' /
53
+ 'reg_group' / 'scr_checked' / 'scr_check' / 'search' / 'technical'
54
54
  end
55
55
 
56
56
  rule all_or_none_actions
@@ -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
 
@@ -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'
@@ -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/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.6.0'
5
+ VERSION = '5.8.0'
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.6.0
4
+ version: 5.8.0
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-16 00:00:00.000000000 Z
11
+ date: 2022-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chronic