From 1a9539d12ff78852026e4d2a1940a7dd550f03b0 Mon Sep 17 00:00:00 2001 From: rj-morgan Date: Tue, 24 Mar 2026 12:28:16 +0000 Subject: [PATCH 1/4] Add support for NCRS check actions. NIT2098 --- lib/canql/grammars/e_base_records.treetop | 7 ++++--- test/nodes/e_base_records_test.rb | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/canql/grammars/e_base_records.treetop b/lib/canql/grammars/e_base_records.treetop index 328abce..b02dd52 100644 --- a/lib/canql/grammars/e_base_records.treetop +++ b/lib/canql/grammars/e_base_records.treetop @@ -50,9 +50,10 @@ module Canql rule accepted_action 'badger_search' / 'badger_checked' / 'coding_group' / 'complete' / - 'delete' / 'fasp_categorisation' / 'msds_sent' / 'qa' / - 'rare_disease_team' / 'reg_coding_forum' / - 'scr_checked' / 'scr_check' / 'search' / 'sources_checked' / 'technical' + 'delete' / 'fasp_categorisation' / 'msds_sent' / + 'ncrs_checked' / 'ncrs_check' / + 'qa' / 'rare_disease_team' / 'reg_coding_forum' / + 'search' / 'sources_checked' / 'technical' end rule all_or_none_actions diff --git a/test/nodes/e_base_records_test.rb b/test/nodes/e_base_records_test.rb index dd58c9a..22e3e3d 100644 --- a/test/nodes/e_base_records_test.rb +++ b/test/nodes/e_base_records_test.rb @@ -19,10 +19,10 @@ def test_should_filter_by_qa_action_on_patients assert_equal({ Canql::EQUALS => 'patient' }, parser.meta_data['results.subject']) end - def test_should_filter_by_scr_check_action - parser = Canql::Parser.new('all cases with scr_check action') + def test_should_filter_by_NCRS_check_action + parser = Canql::Parser.new('all cases with NCRS_check action') assert parser.valid? - assert_equal({ Canql::EQUALS => 'SCR_CHECK' }, parser.meta_data['action.actioninitiated']) + assert_equal({ Canql::EQUALS => 'NCRS_CHECK' }, parser.meta_data['action.actioninitiated']) end def test_should_filter_by_badger_search_action @@ -38,10 +38,10 @@ def test_should_filter_by_badger_search_action_and_provider assert_equal({ Canql::EQUALS => 'RGT01' }, parser.meta_data['action.providercode']) end - def test_should_filter_by_scr_checked_action - parser = Canql::Parser.new('all cases with scr_checked action') + def test_should_filter_by_NCRS_checked_action + parser = Canql::Parser.new('all cases with NCRS_checked action') assert parser.valid? - assert_equal({ Canql::EQUALS => 'SCR_CHECKED' }, parser.meta_data['action.actioninitiated']) + assert_equal({ Canql::EQUALS => 'NCRS_CHECKED' }, parser.meta_data['action.actioninitiated']) end def test_should_filter_by_action_hosital_code From b299f070bf6aab1c3f518009021dfe6038a4a124 Mon Sep 17 00:00:00 2001 From: rj-morgan Date: Tue, 24 Mar 2026 12:33:09 +0000 Subject: [PATCH 2/4] Rubocop --- test/nodes/e_base_records_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodes/e_base_records_test.rb b/test/nodes/e_base_records_test.rb index 22e3e3d..97e1a8a 100644 --- a/test/nodes/e_base_records_test.rb +++ b/test/nodes/e_base_records_test.rb @@ -19,7 +19,7 @@ def test_should_filter_by_qa_action_on_patients assert_equal({ Canql::EQUALS => 'patient' }, parser.meta_data['results.subject']) end - def test_should_filter_by_NCRS_check_action + def test_should_filter_by_ncrs_check_action parser = Canql::Parser.new('all cases with NCRS_check action') assert parser.valid? assert_equal({ Canql::EQUALS => 'NCRS_CHECK' }, parser.meta_data['action.actioninitiated']) @@ -38,7 +38,7 @@ def test_should_filter_by_badger_search_action_and_provider assert_equal({ Canql::EQUALS => 'RGT01' }, parser.meta_data['action.providercode']) end - def test_should_filter_by_NCRS_checked_action + def test_should_filter_by_ncrs_checked_action parser = Canql::Parser.new('all cases with NCRS_checked action') assert parser.valid? assert_equal({ Canql::EQUALS => 'NCRS_CHECKED' }, parser.meta_data['action.actioninitiated']) From 9934207bc2e62211d858af6ff4e0fa61d662a768 Mon Sep 17 00:00:00 2001 From: rj-morgan Date: Tue, 24 Mar 2026 14:27:24 +0000 Subject: [PATCH 3/4] Changelog and version --- CHANGELOG.md | 5 ++++- lib/canql/version.rb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 936b407..8103afd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ -## [Unreleased] +## 6.1.0 / 2026-03-24 +### Changed +* Added NCRS_CHECK and NCRS_CHECKED actions to action filter +* Removed SCR_CHECK and SCR_CHECKED actions from action filter ### Fixed * Support Ruby 3.4. Drop support for Rails 7.0, Ruby 3.1 diff --git a/lib/canql/version.rb b/lib/canql/version.rb index ffe1290..306c4d0 100644 --- a/lib/canql/version.rb +++ b/lib/canql/version.rb @@ -2,5 +2,5 @@ # This stores the current version of the Canql gem module Canql - VERSION = '6.0.3' + VERSION = '6.1.0' end From 5fec14f5ab5b2801daf1a5ae4bf5276dad646337 Mon Sep 17 00:00:00 2001 From: rj-morgan Date: Tue, 24 Mar 2026 14:31:50 +0000 Subject: [PATCH 4/4] Rubocop --- lib/canql/grammars/e_base_records.treetop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/canql/grammars/e_base_records.treetop b/lib/canql/grammars/e_base_records.treetop index b02dd52..d210fbe 100644 --- a/lib/canql/grammars/e_base_records.treetop +++ b/lib/canql/grammars/e_base_records.treetop @@ -51,7 +51,7 @@ module Canql rule accepted_action 'badger_search' / 'badger_checked' / 'coding_group' / 'complete' / 'delete' / 'fasp_categorisation' / 'msds_sent' / - 'ncrs_checked' / 'ncrs_check' / + 'ncrs_checked' / 'ncrs_check' / 'qa' / 'rare_disease_team' / 'reg_coding_forum' / 'search' / 'sources_checked' / 'technical' end