From 6b9955d9ce07fd8aff63abb4f36f5bdbaaa20fda Mon Sep 17 00:00:00 2001 From: NImeson Date: Fri, 27 Feb 2026 10:58:45 +0000 Subject: [PATCH 1/8] new indications added to constants to import missing SRIs following casref --- .../colorectal/providers/rq3/rq3_constants.rb | 19 +++++++++++++++---- .../colorectal/providers/rq3/rq3_helper.rb | 3 ++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb b/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb index 4ee5ef72..1ecaabe9 100644 --- a/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb +++ b/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb @@ -26,11 +26,13 @@ module Rq3Constants 'FAP' => %w[APC], 'PPAP' => %w[POLE POLD1], 'COCA' => %w[MLH1 MSH2], - 'POLY' => %w[APC MUTYH], + 'POLY' => %w[APC MUTYH NTHL1], 'NGS_COLON' => %w[MLH1 MSH2 MSH6 APC MUTYH], 'COLON' => %w[MLH1 MSH2 MSH6 PMS2 APC MUTYH PTEN - SMAD4 BMPR1A STK11], - 'HNPCC' => %w[MLH1 MSH2 MSH6 PMS2 EPCAM] }.freeze + SMAD4 BMPR1A STK11 NTHL1], + 'HNPCC' => %w[MLH1 MSH2 MSH6 PMS2 EPCAM], + 'PC' => %w[BRCA1 BRCA2 ATM CHEK2 PALB2 MLH1 MLH2 MSH6], #contents of the R430 panel + 'BAP1' => %w[BAP1]}.freeze COLORECTAL_GENES_REGEX = /(?APC| BMPR1A| @@ -45,7 +47,16 @@ module Rq3Constants PTEN| SMAD4| STK11| - TACSTD1)/xi.freeze + TACSTD1| + BAP1| + NTHL1| + GREM1| + RNF43| + BRCA1| + BRCA2| + ATM| + CHEK2| + PALB2)/xi.freeze CDNA_REGEX = /c\.(?([0-9]+[^[:alnum:]][0-9][^[:alnum:]][0-9]+ [^[:alnum:]][0-9][a-z]+)| diff --git a/lib/import/helpers/colorectal/providers/rq3/rq3_helper.rb b/lib/import/helpers/colorectal/providers/rq3/rq3_helper.rb index 8017a5fe..1a646748 100644 --- a/lib/import/helpers/colorectal/providers/rq3/rq3_helper.rb +++ b/lib/import/helpers/colorectal/providers/rq3/rq3_helper.rb @@ -275,7 +275,8 @@ def sometimes_tested?(record) record.raw_fields['indication'] == 'HNPCC' || record.raw_fields['indication'] == 'COLON' || record.raw_fields['indication'] == 'NGS_COLON' || - record.raw_fields['indication'] == 'POLY' + record.raw_fields['indication'] == 'POLY' || + record.raw_fields['indication'] == 'PC' end def process_testresult_multiple_cdnavariant From ca4835251955750cbcad1c419d66df4838096a61 Mon Sep 17 00:00:00 2001 From: NImeson Date: Fri, 27 Feb 2026 12:57:10 +0000 Subject: [PATCH 2/8] Added test in for new PC indication, 3 possible teststatus scenarios --- .../birmingham_handler_colorectal_test.rb | 43 ++++++++++++------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb index 19c83e59..2ac63612 100644 --- a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb +++ b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb @@ -144,36 +144,47 @@ def setup assert_equal 10, genocolorectals[0].attribute_map['sequencevarianttype'] end - test 'process_variants_from_report_new_format' do + test 'process_variants_from_report_new_indication' do pathogenic_record = build_raw_record('pseudo_id1' => 'bob') - pathogenic_record.raw_fields['indication'] = 'PHTS' + pathogenic_record.raw_fields['indication'] = 'PC' + pathogenic_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in BRCA1 (NM_007294.4) and BRCA2 (NM_000059.3) (Illumina TruSight Hereditary Cancer Panel)' pathogenic_record.raw_fields['overall2'] = 'Pathogenic' - pathogenic_record.raw_fields['teststatus'] = 'The previously reported heterozygous splice site variant c.802-1G>C in the PTEN gene is now considered likely pathogenic.' + pathogenic_record.raw_fields['teststatus'] = 'Heterozygous pathogenic variant c.1234_5678del p.(Asn1234Lysfs*3) identified in the BRCA2 gene in germline blood DNA' processor = variant_processor_for(pathogenic_record) genocolorectals = processor.process_variants_from_report - assert_equal 2, genocolorectals[0].attribute_map['teststatus'] - assert_nil genocolorectals[0].attribute_map['proteinimpact'] - assert_equal 'c.802-1G>C', genocolorectals[0].attribute_map['codingdnasequencechange'] - assert_equal 62, genocolorectals[0].attribute_map['gene'] + assert_equal 1, genocolorectals[0].attribute_map['teststatus'] + assert_equal 7, genocolorectals[0].attribute_map['gene'] + assert_equal 2, genocolorectals[1].attribute_map['teststatus'] + assert_equal 'p.Asn1234LysfsTer3', genocolorectals[1].attribute_map['proteinimpact'] + assert_equal 'c.1234_5678delp', genocolorectals[1].attribute_map['codingdnasequencechange'] + assert_equal 8, genocolorectals[1].attribute_map['gene'] normal_record = build_raw_record('pseudo_id1' => 'bob') - normal_record.raw_fields['indication'] = 'PHTS' + normal_record.raw_fields['indication'] = 'PC' + normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in ATM (NM_000051.3), BRCA1 (NM_007294.4), + BRCA2 (NM_000059.3), CHEK2 exons 2-10 plus codon 367 (NM_007194.4), MLH1 (NM_000249.4), + MSH2 (NM_000251.3), MSH6 (NM_000179.3) and PALB2 (NM_024675.4) (Illumina TruSight Hereditary Cancer Panel)' normal_record.raw_fields['overall2'] = 'Normal' - normal_record.raw_fields['teststatus'] = 'Molecular analysis shows no evidence of the familial pathogenic variant in the PTEN gene.' + normal_record.raw_fields['teststatus'] = 'No evidence of a pathogenic variant in BRCA1, BRCA2, MLH1, MSH2, MSH6 or PALB2.' processor = variant_processor_for(normal_record) genocolorectals2 = processor.process_variants_from_report - assert_equal 1, genocolorectals2[0].attribute_map['teststatus'] + assert_equal 8, genocolorectals2.size + assert(genocolorectals2.all? { |g| g.attribute_map['teststatus'] == 1 }) uv_record = build_raw_record('pseudo_id1' => 'bob') - uv_record.raw_fields['indication'] = 'PHTS' + uv_record.raw_fields['indication'] = 'PC' uv_record.raw_fields['overall2'] = 'UV' - uv_record.raw_fields['teststatus'] = 'Heterozygous inframe deletion variant of uncertain significance c.69_74del p.(Asp24_Leu25del) detected in the PTEN gene' + uv_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in ATM (NM_000051.3), BRCA1 (NM_007294.4), + BRCA2 (NM_000059.3), CHEK2 exons 2-10 plus codon 367 (NM_007194.4), MLH1 (NM_000249.4), + MSH2 (NM_000251.3), MSH6 (NM_000179.3) and PALB2 (NM_024675.4). MLPA of EPCAM.' + uv_record.raw_fields['teststatus'] = 'Heterozygous inframe deletion variant of uncertain significance c.12_34del p.(Asp12_Leu17del) detected in the MLH1 gene' processor = variant_processor_for(uv_record) genocolorectals3 = processor.process_variants_from_report - assert_equal 2, genocolorectals3[0].attribute_map['teststatus'] - assert_equal 3, genocolorectals3[0].attribute_map['variantpathclass'] - assert_equal 'c.69_74delp', genocolorectals[0].attribute_map['codingdnasequencechange'] - assert_equal 62, genocolorectals[0].attribute_map['gene'] + assert_equal 9, genocolorectals3.size + assert_equal 2744, genocolorectals3[8].attribute_map['gene'] + assert_equal 2, genocolorectals3[8].attribute_map['teststatus'] + assert_equal 3, genocolorectals3[8].attribute_map['variantpathclass'] + assert_equal 'c.12_34delp', genocolorectals3[8].attribute_map['codingdnasequencechange'] end private From 9df683a06e2f12abeb36f05ff796a9aaee9736b0 Mon Sep 17 00:00:00 2001 From: NImeson Date: Fri, 27 Feb 2026 13:03:25 +0000 Subject: [PATCH 3/8] re-adding test method that was deleted in error --- .../birmingham_handler_colorectal_test.rb | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb index 2ac63612..2e6e5f4e 100644 --- a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb +++ b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb @@ -144,6 +144,38 @@ def setup assert_equal 10, genocolorectals[0].attribute_map['sequencevarianttype'] end + test 'process_variants_from_report_new_format' do + pathogenic_record = build_raw_record('pseudo_id1' => 'bob') + pathogenic_record.raw_fields['indication'] = 'PHTS' + pathogenic_record.raw_fields['overall2'] = 'Pathogenic' + pathogenic_record.raw_fields['teststatus'] = 'The previously reported heterozygous splice site variant c.802-1G>C in the PTEN gene is now considered likely pathogenic.' + processor = variant_processor_for(pathogenic_record) + genocolorectals = processor.process_variants_from_report + assert_equal 2, genocolorectals[0].attribute_map['teststatus'] + assert_nil genocolorectals[0].attribute_map['proteinimpact'] + assert_equal 'c.802-1G>C', genocolorectals[0].attribute_map['codingdnasequencechange'] + assert_equal 62, genocolorectals[0].attribute_map['gene'] + + normal_record = build_raw_record('pseudo_id1' => 'bob') + normal_record.raw_fields['indication'] = 'PHTS' + normal_record.raw_fields['overall2'] = 'Normal' + normal_record.raw_fields['teststatus'] = 'Molecular analysis shows no evidence of the familial pathogenic variant in the PTEN gene.' + processor = variant_processor_for(normal_record) + genocolorectals2 = processor.process_variants_from_report + assert_equal 1, genocolorectals2[0].attribute_map['teststatus'] + + uv_record = build_raw_record('pseudo_id1' => 'bob') + uv_record.raw_fields['indication'] = 'PHTS' + uv_record.raw_fields['overall2'] = 'UV' + uv_record.raw_fields['teststatus'] = 'Heterozygous inframe deletion variant of uncertain significance c.69_74del p.(Asp24_Leu25del) detected in the PTEN gene' + processor = variant_processor_for(uv_record) + genocolorectals3 = processor.process_variants_from_report + assert_equal 2, genocolorectals3[0].attribute_map['teststatus'] + assert_equal 3, genocolorectals3[0].attribute_map['variantpathclass'] + assert_equal 'c.69_74delp', genocolorectals[0].attribute_map['codingdnasequencechange'] + assert_equal 62, genocolorectals[0].attribute_map['gene'] + end + test 'process_variants_from_report_new_indication' do pathogenic_record = build_raw_record('pseudo_id1' => 'bob') pathogenic_record.raw_fields['indication'] = 'PC' From 500eb1addfb1e45b3fb260a8650f5d9317406e04 Mon Sep 17 00:00:00 2001 From: NImeson Date: Fri, 27 Feb 2026 15:41:29 +0000 Subject: [PATCH 4/8] added a missed addition to constants file --- lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb b/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb index 1ecaabe9..daaf82f4 100644 --- a/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb +++ b/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb @@ -27,7 +27,7 @@ module Rq3Constants 'PPAP' => %w[POLE POLD1], 'COCA' => %w[MLH1 MSH2], 'POLY' => %w[APC MUTYH NTHL1], - 'NGS_COLON' => %w[MLH1 MSH2 MSH6 APC MUTYH], + 'NGS_COLON' => %w[MLH1 MSH2 MSH6 APC MUTYH NTHL1], 'COLON' => %w[MLH1 MSH2 MSH6 PMS2 APC MUTYH PTEN SMAD4 BMPR1A STK11 NTHL1], 'HNPCC' => %w[MLH1 MSH2 MSH6 PMS2 EPCAM], From b82a7bfa6fb3e87bd3edb4331de90c47ccaa17fc Mon Sep 17 00:00:00 2001 From: NImeson Date: Fri, 6 Mar 2026 12:13:20 +0000 Subject: [PATCH 5/8] Added comments on new test and added additional test for BAP1 indication --- .../birmingham_handler_colorectal_test.rb | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb index 2e6e5f4e..7c80af47 100644 --- a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb +++ b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb @@ -176,7 +176,8 @@ def setup assert_equal 62, genocolorectals[0].attribute_map['gene'] end - test 'process_variants_from_report_new_indication' do + test 'process_variants_from_report_new_pc_indication' do + # where 2 genes are indicated in the report field pathogenic_record = build_raw_record('pseudo_id1' => 'bob') pathogenic_record.raw_fields['indication'] = 'PC' pathogenic_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in BRCA1 (NM_007294.4) and BRCA2 (NM_000059.3) (Illumina TruSight Hereditary Cancer Panel)' @@ -190,7 +191,7 @@ def setup assert_equal 'p.Asn1234LysfsTer3', genocolorectals[1].attribute_map['proteinimpact'] assert_equal 'c.1234_5678delp', genocolorectals[1].attribute_map['codingdnasequencechange'] assert_equal 8, genocolorectals[1].attribute_map['gene'] - + # where 8 genes are indicated in the report field normal_record = build_raw_record('pseudo_id1' => 'bob') normal_record.raw_fields['indication'] = 'PC' normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in ATM (NM_000051.3), BRCA1 (NM_007294.4), @@ -202,7 +203,7 @@ def setup genocolorectals2 = processor.process_variants_from_report assert_equal 8, genocolorectals2.size assert(genocolorectals2.all? { |g| g.attribute_map['teststatus'] == 1 }) - + # where 9 genes are indicated in the report field uv_record = build_raw_record('pseudo_id1' => 'bob') uv_record.raw_fields['indication'] = 'PC' uv_record.raw_fields['overall2'] = 'UV' @@ -219,6 +220,31 @@ def setup assert_equal 'c.12_34delp', genocolorectals3[8].attribute_map['codingdnasequencechange'] end + test 'process_variants_from_report_new_bap1_indication' do + pathogenic_record = build_raw_record('pseudo_id1' => 'bob') + pathogenic_record.raw_fields['indication'] = 'PC' + pathogenic_record.raw_fields['report'] = 'Sanger sequencing analysis was used to detect the familial variant in the BAP1 gene. ' + pathogenic_record.raw_fields['overall2'] = 'Pathogenic' + pathogenic_record.raw_fields['teststatus'] = 'Molecular analysis shows the presence of the familial pathogenic variant c.123-1G>A in the BAP1 gene' + processor = variant_processor_for(pathogenic_record) + genocolorectal = processor.process_variants_from_report + assert_equal 1, genocolorectal.size + assert_equal 2, genocolorectal[0].attribute_map['teststatus'] + assert_equal 'c.123-1G>A', genocolorectal[0].attribute_map['codingdnasequencechange'] + assert_equal 517, genocolorectal[0].attribute_map['gene'] + + normal_record = build_raw_record('pseudo_id1' => 'bob') + normal_record.raw_fields['indication'] = 'PC' + normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in BAP1 (NM_004656.4) (Illumina TruSight Hereditary Cancer Panel' + normal_record.raw_fields['overall2'] = 'Normal' + normal_record.raw_fields['teststatus'] = 'Molecular analysis shows no evidence of the familial pathogenic variant in the BAP1 gene' + processor = variant_processor_for(normal_record) + genocolorectal2 = processor.process_variants_from_report + assert_equal 1, genocolorectal2.size + assert_equal 1, genocolorectal2[0].attribute_map['teststatus'] + assert_equal 517, genocolorectal2[0].attribute_map['gene'] + end + private def variant_processor_for(record) From 40c9f15f0608c6851a8941411163d4901f060715 Mon Sep 17 00:00:00 2001 From: NImeson Date: Fri, 6 Mar 2026 16:05:56 +0000 Subject: [PATCH 6/8] edited tests and added new moleculartestingtype --- .../colorectal/providers/rq3/rq3_constants.rb | 3 +- .../birmingham_handler_colorectal_test.rb | 65 ++++++++++++++++--- 2 files changed, 59 insertions(+), 9 deletions(-) diff --git a/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb b/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb index daaf82f4..83e56f2d 100644 --- a/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb +++ b/lib/import/helpers/colorectal/providers/rq3/rq3_constants.rb @@ -18,7 +18,8 @@ module Rq3Constants 'indirect testing' => :full_screen, 'pold1/ pole analysis' => :full_screen, 'prenatal diagnosis' => :targeted_mutation, - 'presymptomatic' => :targeted_mutation }.freeze + 'presymptomatic' => :targeted_mutation, + 'mainstreaming' => :full_screen }.freeze COLORECTAL_GENES_MAP = { 'PJS' => %w[STK11], 'PHTS' => %w[PTEN], diff --git a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb index 7c80af47..45fdaed3 100644 --- a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb +++ b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb @@ -16,6 +16,9 @@ def setup @record.raw_fields['moleculartestingtype'] = 'RNA studies' @handler.process_genetictestscope(@genotype, @record) assert_equal 'Unable to assign Colorectal Lynch or MMR genetictestscope', @genotype.attribute_map['genetictestscope'] + @record.raw_fields['moleculartestingtype'] = 'Mainstreaming' + @handler.process_genetictestscope(@genotype, @record) + assert_equal 'Full screen Colorectal Lynch or MMR', @genotype.attribute_map['genetictestscope'] end test 'process_multiple_tests_from_fullscreen' do @@ -176,7 +179,7 @@ def setup assert_equal 62, genocolorectals[0].attribute_map['gene'] end - test 'process_variants_from_report_new_pc_indication' do + test 'process_variants_from_report_new_pc_indication_two_genes' do # where 2 genes are indicated in the report field pathogenic_record = build_raw_record('pseudo_id1' => 'bob') pathogenic_record.raw_fields['indication'] = 'PC' @@ -191,6 +194,21 @@ def setup assert_equal 'p.Asn1234LysfsTer3', genocolorectals[1].attribute_map['proteinimpact'] assert_equal 'c.1234_5678delp', genocolorectals[1].attribute_map['codingdnasequencechange'] assert_equal 8, genocolorectals[1].attribute_map['gene'] + + normal_record = build_raw_record('pseudo_id1' => 'bob') + normal_record.raw_fields['indication'] = 'PC' + normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in BRCA1 (NM_007294.4) and BRCA2 (NM_000059.3) (Illumina TruSight Hereditary Cancer Panel)' + normal_record.raw_fields['overall2'] = 'Normal' + normal_record.raw_fields['teststatus'] = 'No evidence of a pathogenic variant in BRCA1 or BRCA2' + processor = variant_processor_for(normal_record) + genocolorectals2 = processor.process_variants_from_report + assert_equal 1, genocolorectals2[0].attribute_map['teststatus'] + assert_equal 7, genocolorectals2[0].attribute_map['gene'] + assert_equal 1, genocolorectals2[1].attribute_map['teststatus'] + assert_equal 8, genocolorectals2[1].attribute_map['gene'] + end + + test 'process_variants_from_report_new_pc_indication_8_standard_genes' do # where 8 genes are indicated in the report field normal_record = build_raw_record('pseudo_id1' => 'bob') normal_record.raw_fields['indication'] = 'PC' @@ -200,9 +218,27 @@ def setup normal_record.raw_fields['overall2'] = 'Normal' normal_record.raw_fields['teststatus'] = 'No evidence of a pathogenic variant in BRCA1, BRCA2, MLH1, MSH2, MSH6 or PALB2.' processor = variant_processor_for(normal_record) + genocolorectals = processor.process_variants_from_report + assert_equal 8, genocolorectals.size + assert(genocolorectals.all? { |g| g.attribute_map['teststatus'] == 1 }) + + normal_record = build_raw_record('pseudo_id1' => 'bob') + normal_record.raw_fields['indication'] = 'PC' + normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in ATM (NM_000051.3), BRCA1 (NM_007294.4), + BRCA2 (NM_000059.3), CHEK2 exons 2-10 plus codon 367 (NM_007194.4), MLH1 (NM_000249.4), + MSH2 (NM_000251.3), MSH6 (NM_000179.3) and PALB2 (NM_024675.4) (Illumina TruSight Hereditary Cancer Panel)' + normal_record.raw_fields['overall2'] = 'Normal' + normal_record.raw_fields['teststatus'] = 'HHeterozygous pathogenic variant c.1447C>T p.(Gln483*) identified in the MLH1 gene.' + processor = variant_processor_for(normal_record) genocolorectals2 = processor.process_variants_from_report assert_equal 8, genocolorectals2.size - assert(genocolorectals2.all? { |g| g.attribute_map['teststatus'] == 1 }) + assert_equal 1, genocolorectals2[4].attribute_map['teststatus'] + assert_nil genocolorectals2[4].attribute_map['codingdnasequencechange'] + assert_nil genocolorectals2[4].attribute_map['proteinimpact'] + assert_equal 2744, genocolorectals2[4].attribute_map['gene'] + end + + test 'process_variants_from_report_new_pc_indication_nine_genes' do # where 9 genes are indicated in the report field uv_record = build_raw_record('pseudo_id1' => 'bob') uv_record.raw_fields['indication'] = 'PC' @@ -212,14 +248,27 @@ def setup MSH2 (NM_000251.3), MSH6 (NM_000179.3) and PALB2 (NM_024675.4). MLPA of EPCAM.' uv_record.raw_fields['teststatus'] = 'Heterozygous inframe deletion variant of uncertain significance c.12_34del p.(Asp12_Leu17del) detected in the MLH1 gene' processor = variant_processor_for(uv_record) - genocolorectals3 = processor.process_variants_from_report - assert_equal 9, genocolorectals3.size - assert_equal 2744, genocolorectals3[8].attribute_map['gene'] - assert_equal 2, genocolorectals3[8].attribute_map['teststatus'] - assert_equal 3, genocolorectals3[8].attribute_map['variantpathclass'] - assert_equal 'c.12_34delp', genocolorectals3[8].attribute_map['codingdnasequencechange'] + genocolorectals = processor.process_variants_from_report + assert_equal 9, genocolorectals.size + assert_equal 2744, genocolorectals[8].attribute_map['gene'] + assert_equal 2, genocolorectals[8].attribute_map['teststatus'] + assert_equal 3, genocolorectals[8].attribute_map['variantpathclass'] + assert_equal 'c.12_34delp', genocolorectals[8].attribute_map['codingdnasequencechange'] + + normal_record = build_raw_record('pseudo_id1' => 'bob') + normal_record.raw_fields['indication'] = 'PC' + normal_record.raw_fields['overall2'] = 'Normal' + normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in ATM (NM_000051.3), BRCA1 (NM_007294.4), + BRCA2 (NM_000059.3), CHEK2 exons 2-10 plus codon 367 (NM_007194.4), MLH1 (NM_000249.4), + MSH2 (NM_000251.3), MSH6 (NM_000179.3) and PALB2 (NM_024675.4). MLPA of EPCAM.' + normal_record.raw_fields['teststatus'] = 'No evidence of a pathogenic variant in BRCA1, BRCA2, MLH1, MSH2, MSH6 or PALB2.' + processor = variant_processor_for(normal_record) + genocolorectals = processor.process_variants_from_report + assert_equal 9, genocolorectals.size + assert(genocolorectals.all? { |g| g.attribute_map['teststatus'] == 1 }) end + test 'process_variants_from_report_new_bap1_indication' do pathogenic_record = build_raw_record('pseudo_id1' => 'bob') pathogenic_record.raw_fields['indication'] = 'PC' From 4d1bbb62f42aa001187b23f6fd9e92795cf995b7 Mon Sep 17 00:00:00 2001 From: NImeson Date: Fri, 6 Mar 2026 16:20:30 +0000 Subject: [PATCH 7/8] corrected BAP1 test --- .../birmingham/birmingham_handler_colorectal_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb index 45fdaed3..1dbe52e6 100644 --- a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb +++ b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb @@ -271,7 +271,7 @@ def setup test 'process_variants_from_report_new_bap1_indication' do pathogenic_record = build_raw_record('pseudo_id1' => 'bob') - pathogenic_record.raw_fields['indication'] = 'PC' + pathogenic_record.raw_fields['indication'] = 'BAP1' pathogenic_record.raw_fields['report'] = 'Sanger sequencing analysis was used to detect the familial variant in the BAP1 gene. ' pathogenic_record.raw_fields['overall2'] = 'Pathogenic' pathogenic_record.raw_fields['teststatus'] = 'Molecular analysis shows the presence of the familial pathogenic variant c.123-1G>A in the BAP1 gene' @@ -283,10 +283,10 @@ def setup assert_equal 517, genocolorectal[0].attribute_map['gene'] normal_record = build_raw_record('pseudo_id1' => 'bob') - normal_record.raw_fields['indication'] = 'PC' + normal_record.raw_fields['indication'] = 'BAP1' normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in BAP1 (NM_004656.4) (Illumina TruSight Hereditary Cancer Panel' normal_record.raw_fields['overall2'] = 'Normal' - normal_record.raw_fields['teststatus'] = 'Molecular analysis shows no evidence of the familial pathogenic variant in the BAP1 gene' + normal_record.raw_fields['teststatus'] = 'Molecular analysis shows no evidence of the familial pathogenic variant in the BRCA2 gene' processor = variant_processor_for(normal_record) genocolorectal2 = processor.process_variants_from_report assert_equal 1, genocolorectal2.size From 0b439a0814916cfc96490d585ec5f0c73a399c87 Mon Sep 17 00:00:00 2001 From: NImeson Date: Mon, 9 Mar 2026 10:52:04 +0000 Subject: [PATCH 8/8] Update gene in test method --- .../providers/birmingham/birmingham_handler_colorectal_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb index 1dbe52e6..532d9d5a 100644 --- a/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb +++ b/test/lib/import/colorectal/providers/birmingham/birmingham_handler_colorectal_test.rb @@ -286,7 +286,7 @@ def setup normal_record.raw_fields['indication'] = 'BAP1' normal_record.raw_fields['report'] = 'Next Generation Sequencing of coding regions in BAP1 (NM_004656.4) (Illumina TruSight Hereditary Cancer Panel' normal_record.raw_fields['overall2'] = 'Normal' - normal_record.raw_fields['teststatus'] = 'Molecular analysis shows no evidence of the familial pathogenic variant in the BRCA2 gene' + normal_record.raw_fields['teststatus'] = 'Molecular analysis shows no evidence of the familial pathogenic variant in the BAP1 gene' processor = variant_processor_for(normal_record) genocolorectal2 = processor.process_variants_from_report assert_equal 1, genocolorectal2.size