edits.seer.internal.rules.SEER_IR13A.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validation-edits-seer Show documentation
Show all versions of validation-edits-seer Show documentation
Java implemenation of the SEER edits.
<rule id="SEER_IR13A" name="Duplicate Bladder Primaries for Patient (SEER IR13A)" tag="S037" java-path="lines" category="inter-record"> <expression><![CDATA[if (lines.size() < 2) return true List<Integer> allHist = (List<Integer>)Context.IR13A_Histologies List<Integer> group1Hist = (List)[8020,8022,8031,8120,8122,8130] int outerIndex = 0 while ( outerIndex < lines.size() ) { int innerIndex = outerIndex + 1 Map outerLine = lines.get(outerIndex) Integer outerHistInt = Functions.asInt(outerLine.histologicTypeIcdO3) if ( allHist.contains(outerHistInt) && Functions.between(outerLine.primarySite, 'C670', 'C679') ) { while (innerIndex < lines.size() ) { Map innerLine = lines.get(innerIndex) Integer innerHistInt = Functions.asInt(innerLine.histologicTypeIcdO3) if ( allHist.contains(innerHistInt) && Functions.between(innerLine.primarySite, 'C670', 'C679') && ( (outerLine.behaviorCodeIcdO3 == innerLine.behaviorCodeIcdO3) || (outerLine.behaviorCodeIcdO3 == '2' && innerLine.behaviorCodeIcdO3 == '3' && innerLine.dateOfDiagnosisYear < '1995')) ) { boolean innerGroup1 = group1Hist.contains(innerHistInt) || (innerHistInt == 8082 && innerLine.dateOfDiagnosisYear > '2017') boolean innerGroup2 = innerLine.histologicTypeIcdO3 == '8131' boolean outerGroup1 = group1Hist.contains(outerHistInt) || (outerHistInt == 8082 && outerLine.dateOfDiagnosisYear > '2017') boolean outerGroup2 = outerLine.histologicTypeIcdO3 == '8131' if ((innerLine.dateOfDiagnosisYear < '2018' && outerLine.dateOfDiagnosisYear < '2018') || !((innerGroup1 && outerGroup2) || (innerGroup2 && outerGroup1))) { Functions.forceFailureOnEntity(binding, innerLine) Functions.forceFailureOnEntity(binding, outerLine) return false } } innerIndex += 1 } } outerIndex += 1 } return true]]></expression> <message>Duplicate Bladder Primaries Inter-Record Error</message> <description><![CDATA[A person may not have two bladder cancers (Primary site[400] = C670-C679) with the same behavior code, with histologies of transitional cell carcinoma or papillary transitional cell carcinoma (8120-8139) or histology 8022, 8031, or 8082. In addition, a person may not have an in situ and invasive bladder cancer record (in that order) with histologies of transitional cell carcinoma or papillary transitional cell carcnioma (8120-8139) or histology 8022, 8031, or 8082 unless the invasive cancer was diagnosed after 1994. Patients are allowed to have 2 bladder cancers that fall into both groups if one is diagnosed in 2018+ (with either behavior /2 or /3) Group 1: 8020,8022,8031,8120,8122,8130 (or 8082 for diagnosis year 2018+) Group 2: 8131]]></description> <history> <event version="SE11-001-07" user="greend" date="1991-09-15">Conversion of morphology and topography codes from ICD-O-1 to ICD-O-2.</event> <event version="SE11-001-18" user="greend" date="2004-10-05">Histology range expanded from 8120-8131 for ICD-O-3 histology. Program modified to look at ICD-O-2 histology/behavior fields when all records are diagnosed before 2001. If any records are diagnosed 2001+ then the ICD-O-3 histology/behavior fields are used for all records.</event> <event version="SE11-001-20" user="greend" date="2006-07-19">Changed name from IR013 to IR013A.</event> <event version="SE14-011-04" user="depryf" date="2014-04-21" ref="67077">Now reporting all the tumors when this edit fails.</event> <event version="SE15-013-01" user="kirbyk" date="2015-01-26" ref="67112">Reports only the two tumors that fail the edit.</event> <event version="SE16-016-08" user="depryf" date="2017-11-22" ref="67674">Edit syntax updated to allow pre-compilation optimization; no change in behavior.</event> <event version="SE18-019-07" user="kirbyk" date="2020-01-08" ref="68272">Updated edit with exceptions for cases diagnosed in 2018+.</event> <event version="SE18-020-01" user="depryf" date="2020-02-04" ref="68281">Changed property names to align with NAACCR XML IDs.</event> <event version="SE18-020-01" user="beverung" date="2020-02-25" ref="68286">Updated to only allow histology 8082 for dx year 2018+.</event> <event version="SE22-022-09" user="beverung" date="2022-07-13" ref="69016">Added code 8020 to Group 1 histology list.</event> </history> </rule>