edits.seer.internal.rules.IF208.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.
The newest version!
<rule id="IF208" name="CS SSF 3, TS/Ext Eval, Prostate Schema (CS)" tag="N0953" java-path="lines.line" category="inter-field" depends="Behavior_Code_ICD-O-3,CS_Extension,CS_Site-Specific_Factor_3,CS_Tumor_Size_Ext_Eval,Histologic_Type_ICD-O-3,Primary_Site"> <expression><![CDATA[if (line.csSiteSpecificFactor3 == null || line.csTumorSizeExtEval == null || line.behaviorCodeIcdO3 == '0' || line.behaviorCodeIcdO3 == '1' || line.dateOfDiagnosisYear == null) return true if (line._csSchemaId == 'prostate') { if ((line.csExtension == '950' || line.csExtension == '999') && line.csSiteSpecificFactor3 >= '000' && line.csSiteSpecificFactor3 <= '750') return !(Functions.matches(line.csTumorSizeExtEval, /^[01259]$/)) if (line.dateOfDiagnosisYear >= '2010' || Functions.asInt(line.csVersionInputOriginal) >= 20100) { if (Functions.matches(line.csExtension, /^(2[0123]\d|240)$/)) { if (line.csSiteSpecificFactor3 == '960') return line.csTumorSizeExtEval == '0' || line.csTumorSizeExtEval == '9' if (line.csSiteSpecificFactor3 == '970' || line.csSiteSpecificFactor3 == '980') return line.csTumorSizeExtEval == '0' } } if (line.csTumorSizeExtEval == '3') return !(Functions.matches(line.csSiteSpecificFactor3, /^(9[5-9]0)$/)) if (line.csTumorSizeExtEval == '6') return !(Functions.matches(line.csSiteSpecificFactor3, /^(9[5-9]0|985)$/)) if (line.csTumorSizeExtEval == '8') return !(Functions.matches(line.csSiteSpecificFactor3, /^(9[6-9]0)$/)) if (line.csTumorSizeExtEval == '5' && !(Functions.matches(line.csExtension, /^(950)|(990)$/)) && !(Functions.matches(line.csSiteSpecificFactor3, /^(9[5678]\d)|(990)$/))) { if (line.csExtension >= line.csSiteSpecificFactor3) return true //CS Extension = 200-300 (T2) and CS Site-Specific Factor 3 code = 300, 320, or 400 (T2NOS) if (line.csExtension >= '200' && line.csExtension <= '300'&& Functions.matches(line.csSiteSpecificFactor3, /^(300)|(320)|(400)$/)) return true //CS Extension = 200, 240, 300 (T2NOS) and CS Site-Specific Factor 3 code = 210-230, 330-350, 402-406 (T2a, T2b, T2c) if (Functions.matches(line.csExtension, /^(200)|(240)|(300)$/) && Functions.matches(line.csSiteSpecificFactor3, /^(2[12]\d)|(230)|(3[34]\d)|(350)|(40[23456])$/)) return true //CS Extension = 210 (T2a) and CS Site-Specific Factor 3 = 330 or 402 (T2a) if (Functions.matches(line.csExtension, /^(210)$/) && Functions.matches(line.csSiteSpecificFactor3, /^(330)|(402)$/)) return true //CS Extension = 220 (T2b) and CS Site-Specific Factor 3 = 330, 402 (T2a), 340 or 404 (T2b) if (Functions.matches(line.csExtension, /^(220)$/) && Functions.matches(line.csSiteSpecificFactor3, /^(330)|(402)|(340)|(404)$/)) return true //CS Extension = 230 (T2c) and CS Site-Specific Factor 3 = 330, 402 (T2a), 340, 404 (T2b) 350 or 406 (T2c) if (Functions.matches(line.csExtension, /^(230)$/) && Functions.matches(line.csSiteSpecificFactor3, /^(330)|(402)|(340)|(404)|(350)|(406)$/)) return true //CS Extension = 410-490 (T3) and CS Site-Specific Factor 3 = 495 (T3NOS) if (Functions.matches(line.csExtension, /^(4[12345678]\d)|(490)$/) && Functions.matches(line.csSiteSpecificFactor3, /^(495)$/)) return true //CS Extension = 410 or 490 (T3NOS) and CS Site-Specific Factor 3 = 415-490 (T3a, T3b) if (Functions.matches(line.csExtension, /^(410)|(490)$/) && Functions.matches(line.csSiteSpecificFactor3, /^(41[56789])|(4[2345678]\d)|(490)$/)) return true //CS Extension = 420-445 (T3a) and CS Site-Specific Factor 3 = 430-483 (T3a) if (Functions.matches(line.csExtension, /^(4[23]\d)|(44[012345])$/) && Functions.matches(line.csSiteSpecificFactor3, /^(4[34567]\d)|(48[0123])$/)) return true //CS Extension = 450-470 (T3b) and CS Site-Specific Factor 3 = 480-483(T3a) or 485-490 (T3b) if (Functions.matches(line.csExtension, /^(4[56]\d)|(470)$/) && Functions.matches(line.csSiteSpecificFactor3, /^(48[0123])|(48[56789])|(490)$/)) return true //CS Extension = 500 - 700 (T4) and CS Site-Specific Factor 3 code = 510-750 (T4) if (Functions.matches(line.csExtension, /^([56]\d\d)|(700)$/) && Functions.matches(line.csSiteSpecificFactor3, /^(5[123456789]\d)|(6\d\d)|(7[1234]\d)|(750)$/)) return true return false } if (Functions.matches(line.csTumorSizeExtEval, /^[45]$/)) return !(Functions.matches(line.csSiteSpecificFactor3, /^(9[6-8]0|985)$/)) if (line.csSiteSpecificFactor3 >= '200' && line.csSiteSpecificFactor3 <= '750') return line.csTumorSizeExtEval != '0' && line.csTumorSizeExtEval != '1' && line.csTumorSizeExtEval != '9' } return true]]></expression> <message>CS SSF 3, TS/Ext Eval, and Prostate Schema conflict</message> <description><![CDATA[This edit verifies that for cases coded using the CS Prostate schema, if CS Tumor Size/Ext Eval indicates surgery performed, CS Site-Specific Factor 3 must not indicate no surgery performed. Likewise, if If CS Tumor Size/Ext Eval inidicates no surgery performed, then CS Site-Specific Factor 3 must not indicate surgery performed. This edit is skipped if any of the following conditions are true: 1. CS Site-Specific Factor 3 is empty 2. CS Tumor Size/Ext Eval is empty 3. Behavior Code ICD-O-3 = 0 (benign) or 1 (borderline) 4. CS Schema is invalid 5. Date of Diagnosis is blank or invalid For cases using the CS Prostate schema: 1. If CS Tumor Size/Ext Eval = 4, 5, or 6 (prostatectomy performed), then CS Site-Specific Factor 3 must not = 960, 970, 980, or 985 (prostatectomy not done or unknown). 2. If CS Extension = 950 or 999, then if CS Site-Specific Factor 3 = 000-750, then CS Tumor Size Ext/Eval must not = 0, 1, 2, 5, 9. 3. If year of Diagnosis is 2010 or later OR CS Version Input Original is 020100 or higher Then If CS Extension = 200-240 (clinically apparent only), then A. If CS Site-Specific Factor 3 = 960 (unknown if prostatectomy done), then CS Tumor Size Ext/Eval must = 0 (based on clinical information only) or 9 (unknown if prostatectomy done). B. If CS Site-Specific Factor 3 = 970 or 980 (codes indicating no prostatectomy), then CS Tumor Size Ext/Eval must = 0 (based on clinical information only). 4. If CS Tumor Size/Ext Eval = 3 or 8 (evidence derived from autopsy), then CS Site-Specific Factor 3 must not = 960, 970, 980, or 990. These codes are not appropriate for cases coded using autopsy information. 5. If CS Tumor Size/Ext Eval = 3 (evidence derived from autopsy), then CS Site-specific Factor 3 must not = 950. 6. If CS Tumor Size Ext/Eval = 6 (Prostatectomy performed AFTER neoadjuvant therapy and tumor size/extension based on pathologic evidence), CS SSF 3 must not = 950 or 990. 7. If CS Tumor Size Ext/Eval = 5 (Prostatectomy performed AFTER neoadjuvant therapy and tumor size/extension based on clinical evidence) AND CS Extension code not = 950 or 999 AND CS Site-Specific Factor 3 code not = 950-990, then CS Extension code must be equal to or greater than the CS Site-specific Factor 3 code, with the following exceptions: CS Extension = 200-300 (T2) and CS Site-Specific Factor 3 code = 300, 320, or 400 (T2NOS) CS Extension = 200, 240, 300 (T2NOS) and CS Site-Specific Factor 3 code = 210-230, 330-350, 402-406 (T2a, T2b, T2c) CS Extension = 210 (T2a) and CS Site-Specific Factor 3 = 330 or 402 (T2a) CS Extension = 220 (T2b) and CS Site-Specific Factor 3 = 330, 402 (T2a), 340 or 404 (T2b) CS Extension = 230 (T2c) and CS Site-Specific Factor 3 = 330, 402 (T2a), 340, 404 (T2b) 350 or 406 (T2c) CS Extension = 410-490 (T3) and CS Site-Specific Factor 3 = 495 (T3NOS) CS Extension = 410 or 490 (T3NOS) and CS Site-Specific Factor 3 = 415-490 (T3a, T3b) CS Extension = 420-445 (T3a) and CS Site-Specific Factor 3 = 430-483 (T3a) CS Extension = 450-470 (T3b) and CS Site-Specific Factor 3 = 480-483(T3a) or 485-490 (T3b) CS Extension = 500 - 700 (T4) and CS Site-Specific Factor 3 code = 510-750 (T4) 8. If CS Site-Specific Factor 3 = 200-750, then CS Tumor Size Ext/Eval must not = 0, 1 or 9]]></description> <history> <event version="SE12-002-01" user="murphyr" date="2010-01-07">Changed Hematopoietic SSF3 ranges.</event> <event version="SE12-002-01" user="murphyr" date="2010-03-10">Edit now using CS Schema name. Added "If CS Site-Specific Factor 3 = 985, then CS Tumor Size/Ext Eval must = 3 or 8".</event> <event version="SE12-002-01" user="murphyr" date="2010-05-26">Fixed big in CS Site-Specific Factor 3 = 985 check. Fixed documention. Also added CS Tumor Size/Ext Eval = 3 or 8 check.</event> <event version="SE12-004-01" user="murphyr" date="2011-02-14">Updated edit for CSv2 version 02.03.02.</event> <event version="SE12-005-01" user="murphyr" date="2011-07-22" ref="66464">Added logic for CS Tumor Size/Ext Eval = 5</event> <event version="SE12-007-01" user="murphyr" date="2012-03-12" ref="66690">Added logic for CS Extension = 200-240.</event> <event version="SE13-009-01" user="murphyr" date="2012-12-21" ref="66778">Added condition 8 and modified condition 3.</event> <event version="SE14-011-01" user="murphyr" date="2013-11-25" ref="67049">Added blank year of diagnosis skip condition</event> <event version="SE16-015-01" user="kirbyk" date="2016-05-04" ref="67370">Changed edit to use schema IDs instead of schema names</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-020-01" user="depryf" date="2020-02-04" ref="68281">Changed property names to align with NAACCR XML IDs.</event> </history> </rule>