edits.seer.internal.contexts.AJCC7CodeLookup16.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.
<entry id="AJCC7CodeLookup16" type="groovy"><![CDATA[return {line -> String site = line.primarySite String hist = line.histologicTypeIcdO3 String ssf25 = line.csSiteSpecificFactor25 String ssf10 = line.csSiteSpecificFactor10 String grade = line.grade String age = line.ageAtDiagnosis String sex = line.sex Integer histNum = (hist == null || hist.length() < 4) ? -1 : Functions.asInt(hist) Integer siteNum = (site == null || site.length() < 4) ? -1 : Functions.asInt(site.substring(1)) String code = '999' if (Context.AJCC7SiteHistTable16.containsKey(siteNum) && Context.AJCC7SiteHistTable16[siteNum].containsKey(histNum)) code = Context.AJCC7SiteHistTable16[siteNum][histNum] if (Functions.expandList((List)[0..440, 442..689, 691..694, 698..809]).contains(siteNum) && Functions.expandList((List)[9590..9699, 9702..9727, 9735, 9737, 9738]).contains(histNum)) code = '57A' else if (Functions.expandList((List)[0..419, 422, 423, *425..440, 442..689, 691..694, 698..809]).contains(siteNum) && Functions.expandList((List)[9811..9818, 9823, 9827, 9837]).contains(histNum)) code = '57A' else if (code == '04C') { if (ssf25 == '020') code = '04D' else if (ssf25 != '010') code = '999' } else if (code == '008') { if (grade ==~ /^[1239]$/) { if (age <= '044') code = '08A' else if (age <= '998') code = '08B' else code = '08C' } else if (grade == '4') code = '08F' else code = '999' } else if (code == '08D') { if (grade == '4') code = '08F' else if (!(grade ==~ /^[1239]$/)) code = '999' } else if (code == '011') { if ((siteNum == 161 || siteNum == 162) && ssf25 ==~ /^0[246]0$/) if (histNum >= 8982 && histNum <= 8990) code = '999' else code = '10B' } else if (code == '16B') { if ((480 <= siteNum && siteNum <= 488) && ssf10 == '020') code = '16A' } else if (code == '021') { if (siteNum == 240) { if (ssf25 == '030') code = '020' else if (ssf25 == '040' || ssf25 == '070') code = '022' } } else if (code == '37B') { if (481 <= siteNum && siteNum <= 488 && sex != '2' && sex != '6') code = '999' } else if (code == '051') { if (siteNum == 693) code = '51A' else if (siteNum == 694) { if (ssf25 == '010') code = '51A' else if (ssf25 == '020') code = '51B' else code = '999' } } else if (code == '053') { if (ssf25 != '015') code = '999' } if (code == '999') { if (siteNum == 739 && Functions.expandList((List)[*8000..8576, *8940..8950, 8980, 8981]).contains(histNum) && line.grade == '4') code = '08F' else if (481 <= siteNum && siteNum <= 488 && Functions.expandList((List)[8800..8820, 8823..8934, 8940..9136, 9142..9582]).contains(histNum) && sex != '2' && sex != '6') code = '028' else if (481 <= siteNum && siteNum <= 488 && Functions.expandList((List)[8800..8820, 8823..8921, 9120..9136, 9142..9582]).contains(histNum) && (sex == '2' || sex == '6')) code = '028' } return code }]]></entry>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy