Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.imsweb.validation.edits.translated.rqrs.RqrsTranslatedCompiledRules.groovy Maven / Gradle / Ivy
package com.imsweb.validation.edits.translated.rqrs
import com.imsweb.validation.functions.MetafileContextFunctions
import com.imsweb.validation.runtime.CompiledRules
import groovy.transform.CompileStatic
@CompileStatic
class RqrsTranslatedCompiledRules implements CompiledRules {
@Override
public String getValidatorId() {
return 'rqrs-translated'
}
@Override
public String getValidatorVersion() {
return 'RQRS-001-01'
}
@Override
public Map>> getMethodParameters() {
return [
'untrimmedlines' : [Binding.class, Map.class, MetafileContextFunctions.class, List.class],
'untrimmedlines.untrimmedline' : [Binding.class, Map.class, MetafileContextFunctions.class, List.class, Map.class]
]
}
// ID: RQRS-00001; TAG: N0148; NAME: Abstracted By (COC)
public boolean rqrs00001(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.abstractedBy))
return true
return functions.GEN_MATCH(untrimmedline.abstractedBy, "([A-Za-z0-9]((\\s)|([A-Za-z0-9]))*)")
}
// ID: RQRS-00002; TAG: N0360; NAME: Abstracted By, Date of Diagnosis (COC)
public boolean rqrs00002(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year > 1995) {
if (functions.GEN_EMPTY(untrimmedline.abstractedBy))
return false
}
return true
}
// ID: RQRS-00003; TAG: N0551; NAME: Accession Number, Class of Case, Seq Number (COC)
public boolean rqrs00003(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dolc_year, dofc_year, dx_year
char[] ac_yy = new char[5]
char[] message = new char[70]
if (functions.GEN_INLIST(untrimmedline.overRideAcsnClassSeq, "1")) {
return true
}
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
dofc_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOf1stContact)
if (dofc_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of 1st Contact: %DC')
dolc_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfLastContact)
if (dolc_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Last Contact: %DC')
functions.GEN_STRCPY(message, "OR must be set if Seq Num 00, 01, 60, or 61 added after accession year")
functions.GEN_STRCPY(ac_yy, functions.GEN_SUBSTR(untrimmedline.accessionNumberHosp, 1, 4))
if (functions.GEN_INLIST(untrimmedline.classOfCase, "00,10-14")) {
if (functions.GEN_INLIST(untrimmedline.sequenceNumberHosp, "00,01,60,61")) {
if (dx_year < 1996) {
if (functions.GEN_VAL(ac_yy) < dx_year) {
functions.GEN_SAVE_TEXT(binding, 'essag')
return functions.GEN_ERROR_MSG(binding, 'Conflict among Class of Case, Accession Number--Hosp, Sequence Number--Hospital, Date of Diagnosis')
}
}
else {
if (functions.GEN_VAL(ac_yy) != dofc_year) {
functions.GEN_SAVE_TEXT(binding, 'essag')
return false
}
}
}
}
if (functions.GEN_INLIST(untrimmedline.classOfCase, "38")) {
if (functions.GEN_INLIST(untrimmedline.sequenceNumberHosp, "00,01,60,61")) {
if ((functions.GEN_VAL(ac_yy) != dofc_year) || (dolc_year != dofc_year)) {
functions.GEN_SAVE_TEXT(binding, 'essag')
return false
}
}
}
if (functions.GEN_INLIST(untrimmedline.classOfCase, "38")) {
if (!functions.GEN_INLIST(untrimmedline.sequenceNumberHosp, "00,01,60,61")) {
if (dolc_year != dofc_year) {
functions.GEN_SAVE_TEXT(binding, 'essag')
return false
}
}
}
return true
}
// ID: RQRS-00004; TAG: N0034; NAME: Accession Number--Hosp (COC)
public boolean rqrs00004(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (!functions.GEN_MATCH(untrimmedline.accessionNumberHosp, "(\\d\\d\\d\\d\\d\\d\\d\\d\\d)"))
return false
if (functions.GEN_INLIST(untrimmedline.accessionNumberHosp, "00000", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d)", 5, 5))
return false
if ((functions.GEN_VAL(functions.GEN_SUBSTR(untrimmedline.accessionNumberHosp, 1, 4)) > 1929) && (functions.GEN_VAL(functions.GEN_SUBSTR(untrimmedline.accessionNumberHosp, 1, 4)) <= functions.GEN_DATE_YEAR_IOP(binding, functions.GEN_DT_TODAY())))
return true
else
return false
return true
}
// ID: RQRS-00005; TAG: N0037; NAME: Addr at DX--City (COC)
public boolean rqrs00005(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int len
int idx
if (functions.GEN_EMPTY(untrimmedline.addressAtDxCity))
return true
if (functions.GEN_LOOKUP(functions.GEN_UPPER(untrimmedline.addressAtDxCity), context.RQRS_CITY_SPC, context.RQRS_CITY_SPC_CITY, [:]))
return true
len = (functions.GEN_STRLEN(functions.GEN_TRIM(untrimmedline.addressAtDxCity, ((Integer)context.RQRS_GEN_RIGHT))))
idx = 1
while (idx < len) {
if (functions.GEN_MATCH(functions.GEN_SUBSTR(untrimmedline.addressAtDxCity, idx, 2), "(\\s\\s)"))
return functions.GEN_ERROR_MSG(binding, 'More than one consecutive embedded space is not allowed')
idx = idx + 1
}
return functions.GEN_MATCH(untrimmedline.addressAtDxCity, "([A-Za-z]((\\s)|([A-Za-z]))*)")
}
// ID: RQRS-00006; TAG: N0341; NAME: Addr at DX--City, Date of Diagnosis (COC)
public boolean rqrs00006(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year > 1995) {
if (functions.GEN_EMPTY(untrimmedline.addressAtDxCity))
return false
}
return true
}
// ID: RQRS-00007; TAG: N1680; NAME: Addr at DX--Country (COC)
public boolean rqrs00007(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.addressAtDxCountry))
return true
if (!functions.GEN_LOOKUP(untrimmedline.addressAtDxCountry, context.RQRS_CNTRY_ST, context.RQRS_CNTRY_ST_COUNTRY, [:]))
return false
return true
}
// ID: RQRS-00008; TAG: N1681; NAME: Addr at DX--Country, Date of Diagnosis (COC)
public boolean rqrs00008(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (dx_year > 1995) {
if (functions.GEN_EMPTY(untrimmedline.addressAtDxCountry))
return false
}
functions.GEN_ERROR_MSG(binding, 'Addr at DX--Country cannot be ${untrimmedline.addressAtDxCountry} if Date of Diagnosis is greater than 2012')
if (dx_year > 2012) {
if (functions.GEN_INLIST(untrimmedline.addressAtDxCountry, "XNI,XCB,XEN,XSC,XGR,XSL,XUM"))
return false
if (functions.GEN_INLIST(untrimmedline.addressAtDxCountry, "XNF,XSD,XWF,XSF,XEF,XIF,XET,XAP,XIS"))
return false
if (functions.GEN_INLIST(untrimmedline.addressAtDxCountry, "XCR,XOR,XSE,XMS,XCH,XML,XMC,XPL"))
return false
}
return true
}
// ID: RQRS-00009; TAG: N1699; NAME: Addr at DX--Country, State (NAACCR)
public boolean rqrs00009(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] cntry_state = new char[6]
if (functions.GEN_EMPTY(untrimmedline.addressAtDxCountry) || functions.GEN_EMPTY(untrimmedline.addressAtDxState))
return true
functions.GEN_STRCPY(cntry_state, untrimmedline.addressAtDxCountry)
functions.GEN_STRCAT(cntry_state, untrimmedline.addressAtDxState)
if (!functions.GEN_LOOKUP(cntry_state, context.RQRS_CNTRY_ST, context.RQRS_CNTRY_ST_CNTRY_ST, [:]))
return false
return true
}
// ID: RQRS-00010; TAG: N0123; NAME: Addr at DX--Postal Code (NAACCR)
public boolean rqrs00010(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_MATCH(untrimmedline.addressAtDxPostalCode, "([A-Za-z0-9](([A-Za-z0-9]))*((\\s))*)")
}
// ID: RQRS-00011; TAG: N0349; NAME: Addr at DX--Postal Code, Addr at DX--State (COC)
public boolean rqrs00011(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.addressAtDxPostalCode) || functions.GEN_EMPTY(untrimmedline.addressAtDxState))
return true
if (functions.GEN_INLIST(untrimmedline.addressAtDxState, "AA,AE,AP"))
return true
if (functions.GEN_INLIST(untrimmedline.addressAtDxState, "US", "([A-Za-z0-9][A-Za-z0-9])")) {
if (functions.GEN_INLIST(untrimmedline.addressAtDxPostalCode, "99999, 999999999"))
return true
else
return false
}
if (functions.GEN_INLIST(untrimmedline.addressAtDxState, "CD", "([A-Za-z0-9][A-Za-z0-9])")) {
if (functions.GEN_INLIST(untrimmedline.addressAtDxPostalCode, "99999,999999, 999999999"))
return true
else
return false
}
if (functions.GEN_INLIST(untrimmedline.addressAtDxState, "ZZ", "([A-Za-z0-9][A-Za-z0-9])")) {
if (functions.GEN_INLIST(untrimmedline.addressAtDxPostalCode, "99999,999999, 999999999"))
return true
else
return false
}
if (functions.GEN_INLIST(untrimmedline.addressAtDxPostalCode, "88888, 888888888")) {
if (!functions.GEN_INLIST(untrimmedline.addressAtDxState, "XX,YY", "([A-Za-z0-9][A-Za-z0-9])"))
return false
else
return true
}
if (functions.GEN_INLIST(untrimmedline.addressAtDxPostalCode, "99999, 999999, 999999999")) {
if (functions.GEN_INLIST(untrimmedline.addressAtDxState, "XX,YY", "([A-Za-z0-9][A-Za-z0-9])"))
return false
}
if (functions.GEN_INLIST(untrimmedline.addressAtDxState, "XX,YY", "([A-Za-z0-9][A-Za-z0-9])"))
return true
if (functions.GEN_INLIST(untrimmedline.addressAtDxState, "AB,BC,MB,NB,NL,NT,NS,NU,ON,PE,QC,SK,YT", "([A-Za-z0-9][A-Za-z0-9])")) {
if (functions.GEN_MATCH(untrimmedline.addressAtDxPostalCode, "([A-Z]\\d[A-Z]\\d[A-Z]\\d\\s\\s\\s)") || functions.GEN_INLIST(untrimmedline.addressAtDxPostalCode, "99999,999999,999999999"))
return true
else
return false
}
else {
if (!functions.GEN_MATCH(untrimmedline.addressAtDxPostalCode, "(\\d\\d\\d\\d\\d\\d\\d\\d\\d)") && !functions.GEN_MATCH(untrimmedline.addressAtDxPostalCode, "(\\d\\d\\d\\d\\d\\s\\s\\s\\s)"))
return false
}
if (functions.GEN_VAL(functions.GEN_SUBSTR(untrimmedline.addressAtDxPostalCode, 1, 5)) < 10)
return false
return true
}
// ID: RQRS-00012; TAG: N0334; NAME: Addr at DX--State (COC)
public boolean rqrs00012(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.addressAtDxState))
return true
return functions.GEN_LOOKUP(untrimmedline.addressAtDxState, context.RQRS_STATE, context.RQRS_STATE_CODE, [:])
}
// ID: RQRS-00013; TAG: N0335; NAME: Addr at DX--State, Date of Diagnosis (COC)
public boolean rqrs00013(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year > 1995) {
if (functions.GEN_EMPTY(untrimmedline.addressAtDxState))
return false
}
return true
}
// ID: RQRS-00014; TAG: N0026; NAME: Age at Diagnosis (SEER AGEDX)
public boolean rqrs00014(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_INLIST(untrimmedline.ageAtDx, "000-120,999", "(\\d\\d\\d)")
}
// ID: RQRS-00015; TAG: N0025; NAME: Age, Birth Date, Date of Diagnosis (NAACCR IF13)
public boolean rqrs00015(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int wrk_age, diag_age
int dx_year, dx_month, dx_day, birth_year, birth_month, birth_day
if (functions.GEN_INLIST(untrimmedline.ageAtDx, "000")) {
if (functions.GEN_INLIST(untrimmedline.overRideAgeSiteMorph, "2,3"))
return true
}
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
birth_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.birthDate)
if (birth_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Birth: %DC')
diag_age = functions.GEN_VAL(untrimmedline.ageAtDx)
if (diag_age == 999) {
if ((dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY)) || (birth_year == ((Integer)context.RQRS_GEN_DT_EMPTY)))
return true
else
return false
}
if ((dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY)) || (birth_year == ((Integer)context.RQRS_GEN_DT_EMPTY))) {
if (diag_age == 999)
return true
else
return false
}
dx_month = functions.GEN_DATE_MONTH_IOP(binding, untrimmedline.dateOfDiagnosis)
birth_month = functions.GEN_DATE_MONTH_IOP(binding, untrimmedline.birthDate)
if ((birth_month == ((Integer)context.RQRS_GEN_DT_MONTH_EMPTY)) || (dx_month == ((Integer)context.RQRS_GEN_DT_MONTH_EMPTY)))
wrk_age = dx_year - birth_year
else
wrk_age = (int)(((dx_year * 12 + dx_month) - (birth_year * 12 + birth_month)) / 12)
if ((birth_month == ((Integer)context.RQRS_GEN_DT_MONTH_EMPTY)) || (dx_month == ((Integer)context.RQRS_GEN_DT_MONTH_EMPTY))) {
if (diag_age == wrk_age || diag_age == (wrk_age - 1))
return true
else
return false
}
dx_day = functions.GEN_DATE_DAY_IOP(binding, untrimmedline.dateOfDiagnosis)
birth_day = functions.GEN_DATE_DAY_IOP(binding, untrimmedline.birthDate)
if (dx_month == birth_month) {
if ((dx_day == ((Integer)context.RQRS_GEN_DT_DAY_EMPTY)) || (birth_day == ((Integer)context.RQRS_GEN_DT_DAY_EMPTY))) {
if (diag_age == wrk_age || diag_age == (wrk_age - 1))
return true
else
return false
}
else {
if (dx_day < birth_day)
wrk_age = (wrk_age - 1)
}
}
if (diag_age == wrk_age)
return true
else
return false
return true
}
// ID: RQRS-00016; TAG: N0718; NAME: Age, Primary Site, Morph ICDO3--Adult (SEER)
public boolean rqrs00016(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int agetemp
int dx_year
if (functions.GEN_INLIST(untrimmedline.overRideAgeSiteMorph, "1"))
return true
if (functions.GEN_EMPTY(untrimmedline.morphologyIcdO3))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year < 2001) {
return true
}
if (functions.GEN_INLIST(untrimmedline.ageAtDx, "999"))
return true
agetemp = functions.GEN_VAL(untrimmedline.ageAtDx)
if (agetemp < 15)
return true
if (agetemp < 20) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "150-159,170-179,199,209-218,239,240-249,250-259,384,500-509,559,540-549", "(C\\d\\d\\d)", 2, 3) || (functions.GEN_INLIST(untrimmedline.primarySite, "180-189,339,340-349", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.morphologyIcdO3, "00000-82399,82460-99999")) || (functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3) && functions.GEN_MATCH(untrimmedline.morphologyIcdO3, "(\\d\\d\\d\\d3)")))
return false
}
if (agetemp < 30) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C609") || functions.GEN_INLIST(untrimmedline.morphologyIcdO3, "9732, 9823, 9863, 9875, 9876, 9945", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp < 40) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C619") && functions.GEN_INLIST(untrimmedline.morphologyIcdO3, "8140", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 5) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "690-699", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.morphologyIcdO3, "9510-9514", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 14) {
if (functions.GEN_INLIST(untrimmedline.morphologyIcdO3, "8960,9946", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 45) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C589") && functions.GEN_INLIST(untrimmedline.morphologyIcdO3, "9100", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
return true
}
// ID: RQRS-00017; TAG: N0717; NAME: Age, Primary Site, Morph ICDO3--Pediatric (NPCR)
public boolean rqrs00017(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int agetemp
int dx_year
if (functions.GEN_INLIST(untrimmedline.overRideAgeSiteMorph, "1,3"))
return true
if (functions.GEN_EMPTY(untrimmedline.histologyIcdO3))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year < 2001)
return true
agetemp = functions.GEN_VAL(untrimmedline.ageAtDx)
if (agetemp > 14) {
return true
}
if (agetemp < 3) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9650-9667"))
return false
}
if (agetemp > 9 && agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9490,9500"))
return false
}
if (agetemp > 5 && agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9510-9514"))
return false
}
if (agetemp > 8 && agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8960,8964"))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8963") && functions.GEN_INLIST(untrimmedline.primarySite, "649,809", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 9) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8010-8041,8050-8075,8082,8120-8122,8130-8141,8143,8155,8190-8201") && functions.GEN_INLIST(untrimmedline.primarySite, "649", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8210,8211,8221-8231,8240,8241,8244-8246,8260-8263,8290,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "649", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8323,8401,8430,8440,8480-8490,8504,8510,8550,8560-8573") && functions.GEN_INLIST(untrimmedline.primarySite, "649", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8312"))
return false
}
if (agetemp > 5 && agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8970"))
return false
}
if (agetemp < 9) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8010-8041,8050-8075,8082,8120-8122,8140,8141,8143,8155,8190-8201") && functions.GEN_INLIST(untrimmedline.primarySite, "220,221", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8210,8211,8230,8231,8240,8241,8244-8246,8260-8263,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "220,221", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8323,8401,8430,8440,8480-8490,8504,8510,8550,8560-8573") && functions.GEN_INLIST(untrimmedline.primarySite, "220,221", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8160-8180"))
return false
}
if (agetemp < 6) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9180-9200"))
return false
}
if (agetemp < 6) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9220-9230"))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9231,9240") && functions.GEN_INLIST(untrimmedline.primarySite, "400-419", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 4) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9260") && functions.GEN_INLIST(untrimmedline.primarySite, "400-419,809", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9363,9364") && functions.GEN_INLIST(untrimmedline.primarySite, "400-419", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp > 7 && agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9060-9102") && functions.GEN_INLIST(untrimmedline.primarySite, "000-559,570-619,630-699,739-750,754-809", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 5) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8010-8041,8050-8075,8082,8120-8122,8130-8141,8143,8155,8190-8201") && functions.GEN_INLIST(untrimmedline.primarySite, "569,620-629", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8210,8211,8221-8241,8244-8246,8260-8263,8290,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "569,620-629", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8323,8430,8440,8480-8490,8504,8510,8550,8560-8573") && functions.GEN_INLIST(untrimmedline.primarySite, "569,620-629", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8380,8381,8441-8473"))
return false
}
if (agetemp < 6) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8010-8041,8050-8075,8082,8120-8122,8130-8141,8155,8190,8200,8201") && functions.GEN_INLIST(untrimmedline.primarySite, "739", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8211,8230,8231,8244-8246,8260-8263,8290,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "739", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8323,8430,8440,8480,8481,8500-8573") && functions.GEN_INLIST(untrimmedline.primarySite, "739", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8330-8350"))
return false
}
if (agetemp < 6) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8010-8041,8050-8075,8082,8120-8122,8130-8141,8155,8190,8200,8201") && functions.GEN_INLIST(untrimmedline.primarySite, "110-119", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8211,8230,8231,8244-8246,8260-8263,8290,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "110-119", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8323,8430,8440,8480,8481,8504,8510,8550,8560-8573") && functions.GEN_INLIST(untrimmedline.primarySite, "110-119", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 5) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8010-8041,8050-8075,8082,8090-8110,8140,8143,8147,8190,8200") && functions.GEN_INLIST(untrimmedline.primarySite, "440-449", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8240,8246,8247,8260,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "440-449", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8323,8390-8420,8430,8480,8542,8560,8570-8573,8940") && functions.GEN_INLIST(untrimmedline.primarySite, "440-449", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 5) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8010-8082,8120-8155,8190-8263,8290,8310,8314-8323") && functions.GEN_INLIST(untrimmedline.primarySite, "000-109,129-218,239-399,480-488,500-559,570-619,630-639,659-729,750-809", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8430-8440,8480-8580,8940,8941") && functions.GEN_INLIST(untrimmedline.primarySite, "000-109,129-218,239-399,480-488,500-559,570-619,630-639,659-729,750-809", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9050-9053"))
return false
}
if (agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2"))
return false
}
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9100") && functions.GEN_INLIST(untrimmedline.primarySite, "589", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.primarySite, "150-159,170-179,199,209,210-218,239", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.primarySite, "240-249,250-259,384,500-509,559,540-549,609", "(C\\d\\d\\d)", 2, 3))
return false
if (!functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8240-8245") && functions.GEN_INLIST(untrimmedline.primarySite, "180-189,339,340-349", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "3"))
return false
}
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8140") && functions.GEN_INLIST(untrimmedline.primarySite, "619", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9732,9823,9863,9875,9876,9945"))
return false
}
return true
}
// ID: RQRS-00018; TAG: N0001; NAME: Age, Primary Site, Morphology ICDO2 (SEER IF15)
public boolean rqrs00018(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int agetemp
int dx_year
if (functions.GEN_EMPTY(untrimmedline.morphologyIcdO2))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year > 2000)
return true
if (functions.GEN_INLIST(untrimmedline.overRideAgeSiteMorph, "1,3")) {
return true
}
if (functions.GEN_INLIST(untrimmedline.ageAtDx, "999"))
return true
agetemp = functions.GEN_VAL(untrimmedline.ageAtDx)
if (agetemp < 15) {
if ((functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3) && functions.GEN_MATCH(untrimmedline.morphologyIcdO2, "(\\d\\d\\d\\d2)")) || (functions.GEN_INLIST(untrimmedline.primarySite, "C589") && functions.GEN_MATCH(untrimmedline.morphologyIcdO2, "(9100\\d)")))
return false
}
if (agetemp < 20) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "150-159,170-179,199,209-218,239,240-249,250-259,384,500-509,559,540-549", "(C\\d\\d\\d)", 2, 3) || (functions.GEN_INLIST(untrimmedline.primarySite, "180-189,339,340-349", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.morphologyIcdO2, "00000-82399,82450-99999")) || (functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3) && functions.GEN_MATCH(untrimmedline.morphologyIcdO2, "(\\d\\d\\d\\d3)")))
return false
}
if (agetemp < 30) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C609") || functions.GEN_INLIST(untrimmedline.morphologyIcdO2, "9732, 9863, 9868, 9890, 9823", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp < 40) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C619") && functions.GEN_INLIST(untrimmedline.morphologyIcdO2, "8140", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 5) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "690-699", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.morphologyIcdO2, "9510-9512", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 14) {
if (functions.GEN_INLIST(untrimmedline.morphologyIcdO2, "8960", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 45) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C589") && functions.GEN_INLIST(untrimmedline.morphologyIcdO2, "9100", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
return true
}
// ID: RQRS-00019; TAG: N0741; NAME: Ambiguous Terminology DX (SEER)
public boolean rqrs00019(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.ambiguousTerminologyDx))
return true
return functions.GEN_INLIST(untrimmedline.ambiguousTerminologyDx, "0-2,9")
}
// ID: RQRS-00020; TAG: N0882; NAME: Ambiguous Terminology DX, Date of DX (SEER IF157)
public boolean rqrs00020(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if ((dx_year > 2006) && (dx_year < 2013)) {
if (functions.GEN_EMPTY(untrimmedline.ambiguousTerminologyDx))
return false
}
if (dx_year < 2007) {
if (!functions.GEN_EMPTY(untrimmedline.ambiguousTerminologyDx))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis < 2007, then Ambiguous Terminology DX must be blank')
}
return true
}
// ID: RQRS-00021; TAG: N0524; NAME: Archive FIN (COC)
public boolean rqrs00021(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.archiveFin))
return true
if (functions.GEN_INLIST(untrimmedline.archiveFin, "0010,0020, 0006", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)", 1, 4))
return true
return false
}
// ID: RQRS-00022; TAG: N0550; NAME: Archive FIN, Date of Diagnosis (COC)
public boolean rqrs00022(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year > 2002) {
if (functions.GEN_EMPTY(untrimmedline.archiveFin))
return false
}
return true
}
// ID: RQRS-00023; TAG: N0331; NAME: Behavior Code ICDO2, Sequence Number--Hosp (COC)
public boolean rqrs00023(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
if (functions.GEN_EMPTY(untrimmedline.behaviorIcdO2))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (((dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY)) || (dx_year > 2000)) && (functions.GEN_INLIST(untrimmedline.histologyIcdO2, "8931,9393,9538,9950,9960-9962,9980-9984,9989")))
return true
if (functions.GEN_INLIST(untrimmedline.sequenceNumberHosp, "00-59,99", "(\\d\\d)")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO2, "2,3"))
return true
else
return false
}
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO2, "0,1")) {
if (functions.GEN_INLIST(untrimmedline.sequenceNumberHosp, "60-88", "(\\d\\d)"))
return true
else
return false
}
return true
}
// ID: RQRS-00024; TAG: N0470; NAME: Behavior Code ICDO3, Sequence Number--Hosp (COC)
public boolean rqrs00024(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
if (functions.GEN_EMPTY(untrimmedline.behaviorIcdO3) || functions.GEN_EMPTY(untrimmedline.sequenceNumberHosp))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year < 2001 && (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8442,8451,8462,8472,8473") || functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8931,9393,9538,9950,9960-9962,9980-9984,9989")))
return true
if (functions.GEN_INLIST(untrimmedline.sequenceNumberHosp, "00-59,99", "(\\d\\d)")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2,3"))
return true
else
return false
}
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1")) {
if (functions.GEN_INLIST(untrimmedline.sequenceNumberHosp, "60-88", "(\\d\\d)"))
return true
else
return false
}
if ((dx_year > 2003) && (dx_year != ((Integer)context.RQRS_GEN_DT_EMPTY))) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2,3")) {
if (functions.GEN_INLIST(untrimmedline.sequenceNumberHosp, "00-59,99", "(\\d\\d)"))
return true
else
return false
}
}
return true
}
// ID: RQRS-00025; TAG: N0238; NAME: Behavior ICDO2 (COC)
public boolean rqrs00025(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.behaviorIcdO2))
return true
return functions.GEN_INLIST(untrimmedline.behaviorIcdO2, "0,1,2,3")
}
// ID: RQRS-00026; TAG: N0737; NAME: Behavior ICDO2, Behavior ICDO3 (SEER IF115)
public boolean rqrs00026(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO2, "2")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "3"))
return false
}
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO2, "3")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2"))
return false
}
return true
}
// ID: RQRS-00027; TAG: N0468; NAME: Behavior ICDO2, Date of Diagnosis (NAACCR)
public boolean rqrs00027(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year < 2001) {
if (functions.GEN_EMPTY(untrimmedline.behaviorIcdO2))
return false
}
return true
}
// ID: RQRS-00028; TAG: N0469; NAME: Behavior ICDO3 (COC)
public boolean rqrs00028(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.behaviorIcdO3))
return true
return functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1,2,3")
}
// ID: RQRS-00029; TAG: N0467; NAME: Behavior ICDO3, Date of Diagnosis (NAACCR)
public boolean rqrs00029(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year > 2000) {
if (functions.GEN_EMPTY(untrimmedline.behaviorIcdO3))
return false
}
return true
}
// ID: RQRS-00030; TAG: N1688; NAME: Birthplace--Country (COC)
public boolean rqrs00030(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.birthplaceCountry))
return true
if (!functions.GEN_LOOKUP(untrimmedline.birthplaceCountry, context.RQRS_CNTRY_ST, context.RQRS_CNTRY_ST_COUNTRY, [:]))
return false
return true
}
// ID: RQRS-00031; TAG: N1689; NAME: Birthplace--Country, Date of Diagnosis (COC)
public boolean rqrs00031(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (dx_year > 2002) {
if (functions.GEN_EMPTY(untrimmedline.birthplaceCountry))
return false
}
functions.GEN_ERROR_MSG(binding, 'Birthplace--Country cannot be ${untrimmedline.birthplaceCountry} if Date of Diagnosis is greater than 2012')
return true
}
// ID: RQRS-00032; TAG: N1694; NAME: Birthplace--State (COC)
public boolean rqrs00032(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.birthplaceState))
return true
if (!functions.GEN_LOOKUP(untrimmedline.birthplaceState, context.RQRS_CNTRY_ST, context.RQRS_CNTRY_ST_STATE, [:]))
return false
return true
}
// ID: RQRS-00033; TAG: N1692; NAME: Birthplace--State, Date of Diagnosis (COC)
public boolean rqrs00033(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (dx_year > 2002) {
if (functions.GEN_EMPTY(untrimmedline.birthplaceState))
return false
}
functions.GEN_ERROR_MSG(binding, 'Birthplace--State cannot be ${untrimmedline.birthplaceState} if Date of Diagnosis is greater than 2012')
if (dx_year > 2012) {
if (functions.GEN_INLIST(untrimmedline.birthplaceState, "NN,MM,PP,XN"))
return false
}
return true
}
// ID: RQRS-00034; TAG: N0650; NAME: Bladder, RX Hosp--Surg Prim Site, BRM (COC)
public boolean rqrs00034(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_INLIST(untrimmedline.primarySite, "670-679", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.rxHospSurgPrimSite, "16")) {
if (functions.GEN_INLIST(untrimmedline.rxHospBrm, "01"))
return true
else
return false
}
}
return true
}
// ID: RQRS-00035; TAG: N0646; NAME: Bladder, RX Summ--Surg Prim Site, BRM (COC)
public boolean rqrs00035(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite) || functions.GEN_EMPTY(untrimmedline.rxSummBrm))
return true
if (functions.GEN_INLIST(untrimmedline.primarySite, "670-679", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "16")) {
if (functions.GEN_INLIST(untrimmedline.rxSummBrm, "01"))
return true
else
return false
}
}
return true
}
// ID: RQRS-00036; TAG: N0088; NAME: Cancer Status (COC)
public boolean rqrs00036(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_INLIST(untrimmedline.cancerStatus, "1,2,9")
}
// ID: RQRS-00037; TAG: 37; NAME: Class of Case (NCDB)
public boolean rqrs00037(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_INLIST(untrimmedline.classOfCase, "00,10,11,12,13,14,20,21,22"))
return true
else
return false
return true
}
// ID: RQRS-00038; TAG: 38; NAME: Class of Case, RX (COC)
public boolean rqrs00038(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (!functions.GEN_INLIST(untrimmedline.classOfCase, "00"))
return true
if (functions.GEN_INLIST(untrimmedline.rxHospBrm, "01") || functions.GEN_INLIST(untrimmedline.rxHospChemo, "01,02,03") || functions.GEN_INLIST(untrimmedline.rxHospHormone, "01") || functions.GEN_INLIST(untrimmedline.rxHospOther, "1,2") || functions.GEN_INLIST(untrimmedline.rxHospPalliativeProc, "1-3,5,6") || functions.GEN_INLIST(untrimmedline.rxHospSurgOthRegDis, "1-5") || functions.GEN_INLIST(untrimmedline.rxHospSurgPrimSite, "10-90") || functions.GEN_INLIST(untrimmedline.radLocationOfRx, "1-3"))
return false
return true
}
// ID: RQRS-00039; TAG: N1119; NAME: Class of Case, Date of 1st Cont, Date of DX (COC)
public boolean rqrs00039(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dtcmp
if (!functions.GEN_INLIST(untrimmedline.classOfCase, "30-32"))
return true
if (functions.GEN_EMPTY(untrimmedline.dateOf1stContact) || functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis))
return true
dtcmp = functions.GEN_DATECMP_IOP(binding, untrimmedline.dateOf1stContact, untrimmedline.dateOfDiagnosis, ((Integer)context.RQRS_GEN_DT_MIN))
if (dtcmp == ((Integer)context.RQRS_GEN_DT_ERROR)) {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOf1stContact))
functions.GEN_ERROR_TEXT(binding, 'Date of 1st Contact is invalid: %DC')
else {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDiagnosis))
functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis is invalid: %DC')
}
return false
}
else {
if (dtcmp >= 0)
return true
else
return false
}
return true
}
// ID: RQRS-00040; TAG: N1373; NAME: Class of Case,Prim Site,Hist, Beh,DX (COC)
public boolean rqrs00040(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (!functions.GEN_INLIST(untrimmedline.classOfCase, "00-22"))
return true
if (functions.GEN_INLIST(untrimmedline.primarySite, "440-449", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8000-8110"))
return false
if (functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2"))
return false
if (functions.GEN_INLIST(untrimmedline.primarySite, "530-539,619, 510-519, 529, 210-218", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8077,8148"))
return false
if (!(functions.GEN_INLIST(untrimmedline.primarySite, "700-709,710-719,720-729,751-753", "(C\\d\\d\\d)", 2, 3)) && functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return false
if (functions.GEN_INLIST(untrimmedline.primarySite, "700-709,710-719,720-729,751-753", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1") && dx_year < 2004)
return false
return true
}
// ID: RQRS-00041; TAG: N0853; NAME: COC Coding Sys--Curr, COC Coding Sys--Orig (COC)
public boolean rqrs00041(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.cocCodingSysCurrent) || functions.GEN_EMPTY(untrimmedline.cocCodingSysOriginal))
return true
if (functions.GEN_INLIST(untrimmedline.cocCodingSysCurrent, "99") || functions.GEN_INLIST(untrimmedline.cocCodingSysOriginal, "99"))
return true
if (functions.GEN_STRCMP(untrimmedline.cocCodingSysCurrent, untrimmedline.cocCodingSysOriginal) >= 0)
return true
else
return false
return true
}
// ID: RQRS-00042; TAG: N0035; NAME: COC Coding Sys--Current (COC)
public boolean rqrs00042(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_INLIST(untrimmedline.cocCodingSysCurrent, "09", "(\\d\\d)")
}
// ID: RQRS-00043; TAG: N0036; NAME: COC Coding Sys--Original (COC)
public boolean rqrs00043(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.cocCodingSysOriginal))
return true
return functions.GEN_INLIST(untrimmedline.cocCodingSysOriginal, "00-09,99", "(\\d\\d)")
}
// ID: RQRS-00044; TAG: N0581; NAME: COC Coding Sys--Original, Date of Diagnosis (COC)
public boolean rqrs00044(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year > 2002) {
if (functions.GEN_EMPTY(untrimmedline.cocCodingSysOriginal))
return false
}
return true
}
// ID: RQRS-00045; TAG: N1762; NAME: Comorbid/Compl 1, Secondary DX 1, Date DX (COC)
public boolean rqrs00045(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY) || dx_year == ((Integer)context.RQRS_GEN_DT_ERROR) || dx_year > 2017)
return true
if (dx_year > 2002) {
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication1) && functions.GEN_EMPTY(untrimmedline.secondaryDiagnosis1))
return false
}
return true
}
// ID: RQRS-00046; TAG: N0747; NAME: Comorbid/Complication 1 - 10 (COC)
public boolean rqrs00046(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_INLIST(untrimmedline.comorbidComplication1, "00000") || functions.GEN_EMPTY(untrimmedline.comorbidComplication1)) {
if (!functions.GEN_EMPTY(untrimmedline.comorbidComplication2))
return functions.GEN_ERROR_MSG(binding, 'If Comorbid/Complication 1=00000 or blank, then subsequent Comorbid/Complication items must be blank')
}
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication2)) {
if (!functions.GEN_EMPTY(untrimmedline.comorbidComplication3))
return functions.GEN_ERROR_MSG(binding, 'If any Comorbid/Complication items are blank, subsequent items must be blank')
}
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication3)) {
if (!functions.GEN_EMPTY(untrimmedline.comorbidComplication4))
return functions.GEN_ERROR_MSG(binding, 'If any Comorbid/Complication items are blank, subsequent items must be blank')
}
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication4)) {
if (!functions.GEN_EMPTY(untrimmedline.comorbidComplication5))
return functions.GEN_ERROR_MSG(binding, 'If any Comorbid/Complication items are blank, subsequent items must be blank')
}
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication5)) {
if (!functions.GEN_EMPTY(untrimmedline.comorbidComplication6))
return functions.GEN_ERROR_MSG(binding, 'If any Comorbid/Complication items are blank, subsequent items must be blank')
}
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication6)) {
if (!functions.GEN_EMPTY(untrimmedline.comorbidComplication7))
return functions.GEN_ERROR_MSG(binding, 'If any Comorbid/Complication items are blank, subsequent items must be blank')
}
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication7)) {
if (!functions.GEN_EMPTY(untrimmedline.comorbidComplication8))
return functions.GEN_ERROR_MSG(binding, 'If any Comorbid/Complication items are blank, subsequent items must be blank')
}
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication8)) {
if (!functions.GEN_EMPTY(untrimmedline.comorbidComplication9))
return functions.GEN_ERROR_MSG(binding, 'If any Comorbid/Complication items are blank, subsequent items must be blank')
}
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication9)) {
if (!functions.GEN_EMPTY(untrimmedline.comorbidComplication10))
return functions.GEN_ERROR_MSG(binding, 'If any Comorbid/Complication items are blank, subsequent items must be blank')
}
return true
}
// ID: RQRS-00047; TAG: N0504; NAME: Comorbid/Complication 1, Date DX (COC)
public boolean rqrs00047(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
if (functions.GEN_INLIST(untrimmedline.comorbidComplication1, "00000") || functions.GEN_EMPTY(untrimmedline.comorbidComplication1))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication1, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication1, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication1, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return functions.GEN_ERROR_MSG(binding, 'Comorbid/Complication 1 and Date of Diagnosis conflict')
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication1, context.RQRS_ICD9CM, context.RQRS_ICD9CM_CODE, [:]))
return functions.GEN_ERROR_MSG(binding, 'Comorbid/Complication 1 and Date of Diagnosis conflict')
}
return true
}
// ID: RQRS-00048; TAG: N1480; NAME: Comorbid/Complication 10, Date DX (COC)
public boolean rqrs00048(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication10))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication10, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication10, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication10, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication10, context.RQRS_ICD9CM, context.RQRS_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: RQRS-00049; TAG: N1471; NAME: Comorbid/Complication 2, Date DX (COC)
public boolean rqrs00049(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication2))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication2, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication2, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication2, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication2, context.RQRS_ICD9CM, context.RQRS_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: RQRS-00050; TAG: N1473; NAME: Comorbid/Complication 3, Date DX (COC)
public boolean rqrs00050(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication3))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication3, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication3, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication3, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication3, context.RQRS_ICD9CM, context.RQRS_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: RQRS-00051; TAG: N1474; NAME: Comorbid/Complication 4, Date DX (COC)
public boolean rqrs00051(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication4))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication4, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication4, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication4, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication4, context.RQRS_ICD9CM, context.RQRS_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: RQRS-00052; TAG: N1475; NAME: Comorbid/Complication 5, Date DX (COC)
public boolean rqrs00052(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication5))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication5, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication5, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication5, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication5, context.RQRS_ICD9CM, context.RQRS_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: RQRS-00053; TAG: N1476; NAME: Comorbid/Complication 6, Date DX (COC)
public boolean rqrs00053(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication6))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication6, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication6, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication6, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication6, context.RQRS_ICD9CM, context.RQRS_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: RQRS-00054; TAG: N1477; NAME: Comorbid/Complication 7, Date DX (COC)
public boolean rqrs00054(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication7))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication7, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication7, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication7, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication7, context.RQRS_ICD9CM, context.RQRS_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: RQRS-00055; TAG: N1478; NAME: Comorbid/Complication 8, Date DX (COC)
public boolean rqrs00055(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication8))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication8, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication8, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication8, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication8, context.RQRS_ICD9CM, context.RQRS_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: RQRS-00056; TAG: N1479; NAME: Comorbid/Complication 9, Date DX (COC)
public boolean rqrs00056(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.comorbidComplication9))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication9, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication9, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication9, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication9, context.RQRS_ICD9CM, context.RQRS_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: RQRS-00057; TAG: 57; NAME: County at DX (COC)
public boolean rqrs00057(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.addressAtDxCounty))
return true
return functions.GEN_MATCH(untrimmedline.addressAtDxCounty, "(\\d\\d\\d)")
}
// ID: RQRS-00058; TAG: 58; NAME: County at DX, Addr at DX--State (NAACCR)
public boolean rqrs00058(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] cnty_state = new char[6]
if (functions.GEN_EMPTY(untrimmedline.addressAtDxCounty) || functions.GEN_EMPTY(untrimmedline.addressAtDxState))
return true
if (functions.GEN_INLIST(untrimmedline.addressAtDxState, "CD,US,XX,YY,ZZ"))
return true
if (functions.GEN_INLIST(untrimmedline.addressAtDxState, "AB,BC,MB,NB,NL,NT,NS,NU,ON,PE,QC,SK,YT"))
return true
if (functions.GEN_INLIST(untrimmedline.addressAtDxState, "AA,AE,AP"))
return true
functions.GEN_STRCPY(cnty_state, untrimmedline.addressAtDxCounty)
functions.GEN_STRCAT(cnty_state, untrimmedline.addressAtDxState)
if (functions.GEN_LOOKUP(cnty_state, context.RQRS_CNTYALL, context.RQRS_CNTYALL_CNTYSTAT, [:]))
return true
return false
}
// ID: RQRS-00059; TAG: 59; NAME: County at DX, Date of Diagnosis (COC)
public boolean rqrs00059(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year > 1995) {
if (functions.GEN_EMPTY(untrimmedline.addressAtDxCounty))
return false
}
return true
}
// ID: RQRS-00060; TAG: N0907; NAME: CS Eval Items, Class of Case (CS)
public boolean rqrs00060(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY) || dx_year == ((Integer)context.RQRS_GEN_DT_ERROR) || dx_year > 2017)
return true
if (functions.GEN_EMPTY(untrimmedline.classOfCase))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "8") || functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "8") || functions.GEN_INLIST(untrimmedline.csMetsEval, "8")) {
if (!functions.GEN_INLIST(untrimmedline.classOfCase, "38"))
return false
}
return true
}
// ID: RQRS-00061; TAG: N0906; NAME: CS Eval Items, Vital Status (CS)
public boolean rqrs00061(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY) || dx_year == ((Integer)context.RQRS_GEN_DT_ERROR) || dx_year > 2017)
return true
if (functions.GEN_EMPTY(untrimmedline.vitalStatus))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "8") || functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "8") || functions.GEN_INLIST(untrimmedline.csMetsEval, "8")) {
if (!functions.GEN_INLIST(untrimmedline.vitalStatus, "0"))
return false
}
if (functions.GEN_INLIST(t_schema_name, "Prostate")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "3")) {
if (!functions.GEN_INLIST(untrimmedline.vitalStatus, "0"))
return false
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "2")) {
if (!functions.GEN_INLIST(untrimmedline.vitalStatus, "0"))
return false
}
}
return true
}
// ID: RQRS-00062; TAG: N0944; NAME: CS Ext, Histol ICDO3, Breast Schema (CS)
public boolean rqrs00062(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Breast"))
return true
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8530")) {
if (!functions.GEN_INLIST(untrimmedline.csExtension, "710,715, 725, 730, 750")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00063; TAG: N1433; NAME: CS Ext, LN, Mets at DX, SSF 1, Retinoblastoma (CS)
public boolean rqrs00063(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor1) || functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1,"))
return true
if (!functions.GEN_INLIST(t_schema_name, "Retinoblastoma"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "950")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "300-810,999") && !functions.GEN_INLIST(untrimmedline.csLymphNodes, "100-800") && !functions.GEN_INLIST(untrimmedline.csMetsAtDx, "10-80")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "950")) {
if (!functions.GEN_INLIST(untrimmedline.csExtension, "110-800") && !functions.GEN_INLIST(untrimmedline.csLymphNodes, "100-800") && !functions.GEN_INLIST(untrimmedline.csMetsAtDx, "10-80")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00064; TAG: N1432; NAME: CS Ext, LN, Mets at DX, SSF 3, Prostate (CS)
public boolean rqrs00064(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor3) || functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1,"))
return true
if (!functions.GEN_INLIST(t_schema_name, "Prostate"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "950")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "000,200-750,990") && !functions.GEN_INLIST(untrimmedline.csLymphNodes, "100-800") && !functions.GEN_INLIST(untrimmedline.csMetsAtDx, "11-60")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "950")) {
if (!functions.GEN_INLIST(untrimmedline.csExtension, "000-750") && !functions.GEN_INLIST(untrimmedline.csLymphNodes, "100-800") && !functions.GEN_INLIST(untrimmedline.csMetsAtDx, "11-60")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00065; TAG: N1707; NAME: CS Ext,TS/Ext Eval, SSF 1, MelanomaConjunc (CS)
public boolean rqrs00065(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if ((dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY)) || (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR)) || (dx_year < 2010))
return true
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "MelanomaConjunctiva"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "300,310,315,320,330,335,445,450,470,475,480,485,490,500") && functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "2,3,6,8")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "000,998"))
return functions.GEN_ERROR_MSG(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Extension, CS Tumor Size/Ext Eval, CS Site-Specific Factor 1')
}
if (functions.GEN_INLIST(untrimmedline.csExtension, "325,495")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "2,3,6,8"))
return functions.GEN_ERROR_MSG(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Extension, CS Tumor Size/Ext Eval')
}
return true
}
// ID: RQRS-00066; TAG: N0656; NAME: CS Extension (CS)
public boolean rqrs00066(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
return functions.GEN_INLIST(untrimmedline.csExtension, "000-999", "(\\d\\d\\d)")
}
// ID: RQRS-00067; TAG: 67; NAME: CS Extension, Brain Schema (CS)
public boolean rqrs00067(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Brain"))
return true
if (functions.GEN_INLIST(untrimmedline.primarySite, "711-715", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "110,120,200,510")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.primarySite, "716-717", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "100,500")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00068; TAG: N0683; NAME: CS Extension, CS Lymph Nodes, CS Mets at DX (CS)
public boolean rqrs00068(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (!functions.GEN_INLIST(t_schema_name, "Prostate,Retinoblastoma")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "950")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000") && functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Breast")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "000")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,050") && functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
else
return true
}
if (functions.GEN_INLIST(t_schema_name, "IntracranialGland")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "000")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,988") && functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
else
return true
}
if (functions.GEN_INLIST(t_schema_name, "Bladder")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "010,030,060")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000") && functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
else
return true
}
if (functions.GEN_INLIST(t_schema_name, "KidneyRenalPelvis")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050,060")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000") && functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
else
return true
}
if (functions.GEN_INLIST(t_schema_name, "Urethra")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050,060,070,080")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000") && functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
else
return true
}
if (functions.GEN_INLIST(t_schema_name, "UrinaryOther")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050,060")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000") && functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csExtension, "000")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000") && functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00069; TAG: 69; NAME: CS Extension, CS Tumor Size, Breast Schema (CS)
public boolean rqrs00069(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.csTumorSize))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Breast"))
return true
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "997")) {
if (!functions.GEN_INLIST(untrimmedline.csExtension, "050,070")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "996")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "400-950")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csExtension, "170")) {
if (!functions.GEN_INLIST(untrimmedline.csTumorSize, "990,991,992")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csExtension, "180")) {
if (!functions.GEN_INLIST(untrimmedline.csTumorSize, "995")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00070; TAG: N1867; NAME: CS Extension, CS Tumor Size, MycosisFungoides (CS)
public boolean rqrs00070(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.csTumorSize))
return true
if (functions.GEN_VAL(untrimmedline.csVersionOriginal) < 20500)
return true
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "MycosisFungoides"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "110,120,130,150,210,220,230,300")) {
if (!functions.GEN_INLIST(untrimmedline.csTumorSize, "000,999"))
return false
}
else {
if (functions.GEN_INLIST(untrimmedline.csExtension, "600")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "990,991"))
return false
}
}
return true
}
// ID: RQRS-00071; TAG: N0698; NAME: CS Extension, CS Tumor Size, Site, Hist ICDO3 (CS)
public boolean rqrs00071(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.csTumorSize))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "KaposiSarcoma,MelanomaSkin,Conjunctiva") && !functions.GEN_INLIST(t_schema_name, "MelanomaConjunctiva,MelanomaChoroid,MelanomaIris") && !functions.GEN_INLIST(t_schema_name, "MelanomaCiliaryBody,LymphomaOcularAdnexa,Prostate")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "950")) {
if (!functions.GEN_INLIST(untrimmedline.csTumorSize, "000")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Prostate")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "950") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "950")) {
if (!functions.GEN_INLIST(untrimmedline.csTumorSize, "000")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize}), CS Site-Specific Factor 3 (${untrimmedline.csSiteSpecificFactor3})')
}
}
}
if (!functions.GEN_ILOOKUP((t_schema_name), context.RQRS_MEL_HN, context.RQRS_MEL_HN_SCHEMA, [:]) && !functions.GEN_INLIST(t_schema_name, "IllDefinedOther") && !functions.GEN_INLIST(t_schema_name, "MycosisFungoides")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "000")) {
if (!functions.GEN_INLIST(untrimmedline.csExtension, "950")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "AdrenalGland")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "200,250")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Anus")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "310,320,330")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Bone")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "310,350")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Breast")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "110,130,140,170,180")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "CarcinoidAppendix")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "320,330,335")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "GISTPeritoneum")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "350,360,370,380")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "GISTStomach")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "340,390,395,398")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Hypopharynx")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "305")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "HeartMediastinum")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "350,373")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "KidneyParenchyma")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "310,320,330,340,350,360")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "LacrimalGland")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "610,620,630")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Lung")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "115,120,125")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "MerkelCellPenis")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "330,560,570")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "MerkelCellScrotum")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "310,320,330")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "MerkelCellSkin")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "600,610,620")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "MerkelCellVulva")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "450,460,470")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "NetAmpulla")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "310,430")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "NETSmallIntestine,NETStomach")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "170")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Orbit")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "200,300")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "ParotidGland")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "305,310")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "PharyngealTonsil")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "330,350")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Scrotum")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "310")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Skin")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "510")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "SoftTissue")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "302,312,322")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Thyroid")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "405,410,415,420")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "BuccalMucosa,FloorMouth,GumLower,GumOther,GumUpper") || functions.GEN_INLIST(t_schema_name, "LipLower,LipOther,LipUpper,MouthOther") || functions.GEN_INLIST(t_schema_name, "PalateHard,TongueAnterior")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "405,410,415")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "PalateSoft,TongueBase")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "405,410")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "GISTAppendix,GISTColon,GISTEsophagus,GISTRectum,GISTSmallIntestine")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "170,210,250,270")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "NETColon,NETRectum")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "170,180,190")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "PancreasBodyTail,PancreasHead,PancreasOther")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "150,200")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Peritoneum,Retroperitoneum")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "350,375")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Oropharynx,SalivaryGlandOther,SubmandibularGland")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "305,310")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSize, "999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, "stated as" CS Extension (${untrimmedline.csExtension}), CS Tumor Size (${untrimmedline.csTumorSize})')
}
}
}
return true
}
// ID: RQRS-00072; TAG: N0760; NAME: CS Extension, Hematopoietic (CS)
public boolean rqrs00072(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "7"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "HemeRetic"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "100,999")) {
if (!functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9740, 9750, 9751, 9755-9758, 9930")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00073; TAG: N1571; NAME: CS Extension, Hist, Grade, Esophagus Schema (CS)
public boolean rqrs00073(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.grade))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Esophagus"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "000")) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8000-8576,8940-8950,8980-8981")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "1,9")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
return true
}
// ID: RQRS-00074; TAG: 74; NAME: CS Extension, Hist, Grade, EsophagusGEJunction(CS)
public boolean rqrs00074(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.grade))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "EsophagusGEJunction"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "000")) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8000-8046, 8051-8131, 8148-8152, 8154-8157, 8170-8175") || functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8230-8231, 8243-8245, 8247-8248, 8508-8513, 8560-8570, 8575, 8950, 8980-8981")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "1,9")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
return true
}
// ID: RQRS-00075; TAG: N1715; NAME: CS Extension, Histology, Grade, Thyroid (CS)
public boolean rqrs00075(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if ((dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY)) || (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR)) || (dx_year < 2010))
return true
if (functions.GEN_EMPTY(untrimmedline.grade) || functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Thyroid"))
return true
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
if ((functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8000-8019,8022-8029,8033,8074,8153,8240,8300,8392,8413") || functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8525,8576,8490,8950,8980,8981")) && (functions.GEN_INLIST(untrimmedline.grade, "4"))) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "405,410,415,420,490"))
return false
}
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8020,8021,8030,8031,8032")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "405,410,415,420,490"))
return false
}
return true
}
// ID: RQRS-00076; TAG: N0710; NAME: CS Extension, KidneyRenalPelvis Schema (CS)
public boolean rqrs00076(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "KidneyRenalPelvis"))
return true /* Ureter cnnont have ext of 600 or 665 or 670 */
if (functions.GEN_INLIST(untrimmedline.primarySite, "669", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "600,665,670")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'KidneyRenalPelvis schema: CS Extension (${untrimmedline.csExtension}) allowed only for C659 (Renal Pelvis)')
}
}
if (functions.GEN_INLIST(untrimmedline.primarySite, "659", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "685,690,695")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'KidneyRenalPelvis schema: CS Extension (${untrimmedline.csExtension}) allowed only for C669 (Ureter)')
}
}
return true
}
// ID: RQRS-00077; TAG: N0923; NAME: CS Extension, Lymphoma Schema (CS)
public boolean rqrs00077(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "7"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Lymphoma"))
return true
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.csExtension, "100")) {
if (!functions.GEN_INLIST(untrimmedline.primarySite, "770-775,779,024,090-099,111,142,172,181,379", "(C\\d\\d\\d)", 2, 3)) {
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csExtension, "110")) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "770-775,779,379,422", "(C\\d\\d\\d)", 2, 3)) {
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csExtension, "120")) {
if (!functions.GEN_INLIST(untrimmedline.primarySite, "422", "(C\\d\\d\\d)", 2, 3)) {
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.primarySite, "778", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_VAL(untrimmedline.csExtension) >= 200)
return true
else {
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.primarySite, "422", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "120,220,230,320,330,800,999"))
return true
else {
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00078; TAG: N0955; NAME: CS Extension, Morphology, Bladder ICDO3 (CS)
public boolean rqrs00078(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Bladder"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "100")) {
if (functions.GEN_INLIST(untrimmedline.morphologyIcdO3, "81302")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.morphologyIcdO3, "81302")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "100")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00079; TAG: N0963; NAME: CS Extension, Mycosis Fungoides Schema (CS)
public boolean rqrs00079(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "MycosisFungoides"))
return true
if (functions.GEN_INLIST(untrimmedline.primarySite, "440-448", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "300")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00080; TAG: N1377; NAME: CS Extension, MyelomaPlasmaCellDisorder (CS)
public boolean rqrs00080(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "MyelomaPlasmaCellDisorder"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "100,400")) {
if (!functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9731, 9734")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csExtension, "110,200,500")) {
if (!functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9731")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csExtension, "300")) {
if (!functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9734")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csExtension, "810,820")) {
if (!functions.GEN_INLIST(untrimmedline.histologyIcdO3, "9732")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00081; TAG: N0685; NAME: CS Extension, Primary Site, Behavior ICDO3 (CS)
public boolean rqrs00081(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "7"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (!functions.GEN_INLIST(t_schema_name, "Prostate")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "000")) {
if (!functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Stomach,SmallIntestine,GISTStomach,EsophagusGEJunction") || functions.GEN_INLIST(t_schema_name, "GISTSmallIntestine,NETStomach,NETSmallIntestine")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Colon,Rectum,GISTColon,GISTRectum,NETColon,NETRectum")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Colon,Rectum,GISTColon,GISTRectum,NETColon,NETRectum")) {
if (functions.GEN_INLIST(untrimmedline.histologyIcdO3, "8210,8261,8263") && functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return functions.GEN_ERROR_MSG(binding, 'Conflict among schema, Histologic Type ICD-O-3 (${untrimmedline.histologyIcdO3}), Behavior Code ICD-O-3 (${untrimmedline.behaviorIcdO3}), CS Extension (${untrimmedline.csExtension})')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Breast")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "000,050,070"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Cervix")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "010")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Penis")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "EndocrineOther") && (functions.GEN_INLIST(untrimmedline.primarySite, "754,755", "(C\\d\\d\\d)", 2, 3))) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "000")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
if (functions.GEN_INLIST(t_schema_name, "KidneyRenalPelvis,UrinaryOther")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050,060"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "KidneyRenalPelvis,UrinaryOther")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050,060")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Urethra")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050,060,070,080"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Urethra")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "050,060,070,080")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Bladder")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "010,030,060,100"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "Bladder")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "010,030,060")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
}
if (functions.GEN_INLIST(t_schema_name, "MelanomaConjunctiva")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "005")) {
if (!functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "3")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csExtension, "100,120")) {
if (!functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "2,3")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
else
return true
}
}
}
if (functions.GEN_INLIST(untrimmedline.csExtension, "100-999")) {
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "3"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
}
return true
}
// ID: RQRS-00082; TAG: N1116; NAME: CS Extension, Schema (CS)
public boolean rqrs00082(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologyIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csExtension)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 2, 1, CS_code)
if (t_result <= 0) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, '_schema_ms')
return false
}
return true
}
// ID: RQRS-00083; TAG: N1708; NAME: CS Extension, SSF 1, Conjunctiva Schema (CS)
public boolean rqrs00083(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if ((dx_year == ((Integer)context.RQRS_GEN_DT_EMPTY)) || (dx_year == ((Integer)context.RQRS_GEN_DT_ERROR)) || (dx_year < 2010))
return true
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologyIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Conjunctiva"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "110,120,140,150,350")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "000"))
return false
}
return true
}
// ID: RQRS-00084; TAG: N1868; NAME: CS Extension, SSF 1, Head and Neck Schemas (CS)
public boolean rqrs00084(Binding binding, Map