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.naaccr.NaaccrTranslatedCompiledRules2.groovy Maven / Gradle / Ivy
package com.imsweb.validation.edits.translated.naaccr
import com.imsweb.validation.functions.MetafileContextFunctions
import com.imsweb.validation.runtime.CompiledRules
import groovy.transform.CompileStatic
@CompileStatic
class NaaccrTranslatedCompiledRules2 implements CompiledRules {
@Override
public String getValidatorId() {
return 'naaccr-translated'
}
@Override
public String getValidatorVersion() {
return 'NAACCR-011-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]
]
}
@Override
public boolean containsRuleId(String id) {
return 'NAACCR-00293' <= id && id <= 'NAACCR-00564'
}
// ID: NAACCR-00293; TAG: N1720; NAME: CS LN, Nodes Eval, SSF 3, MerkelCellVulva (CS)
public boolean naaccr00293(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.NAACCR_GEN_DT_EMPTY)) || (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR)) || (dx_year < 2010))
return true
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor3))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "MerkelCellVulva"))
return true
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "010,105-109,114-130,600")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "000,005,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Site-Specific Factor 3')
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "010")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "2,3,6,8")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "150")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3')
}
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "105-109,114-130,600")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "0, 1, 5, 9")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "010")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3')
}
}
}
return true
}
// ID: NAACCR-00294; TAG: N1768; NAME: CS LN, RNP, Nodes Eval, SSF 3, MelanomaSkin (CS)
public boolean naaccr00294(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.NAACCR_GEN_DT_EMPTY)) || (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR)) || (dx_year < 2010))
return true
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.regionalNodesPositive) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor3))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "MelanomaSkin"))
return true
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "0,1,5,9")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "100-118,125,155")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "010")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "0,1,5,9")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "2,3,6,8")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "010") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00,97,98")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,010-100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "010") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "01-95,99")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "100-118") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,010,050,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "100-118,125,158") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "98")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,010,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "125,155") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,010,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "100-118,122-123,125,152-158") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "01-97,99")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "124") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "01,95,97,99")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "124") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "02-90")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,050,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
}
}
}
}
}
}
}
}
}
}
if (functions.GEN_EMPTY(untrimmedline.csLymphNodesEval)) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "010") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00,98")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "100-118,121-128,152-153") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00,98")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,010,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "155-158") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00,98")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,010")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "010,100-118,121-128,152-153,155-158") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "01-97")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "010,100-118,121-128,152-153") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "99")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005,100")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "155-158") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "99")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "005")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Given combination of codes will fail to derive AJCC 7 stage: CS Lymph Nodes, CS Lymph Nodes Eval, CS Site-Specific Factor 3, Regional Nodes Positive')
}
}
}
}
}
}
}
}
return true
}
// ID: NAACCR-00295; TAG: N0657; NAME: CS Lymph Nodes (CS)
public boolean naaccr00295(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
return functions.GEN_INLIST(untrimmedline.csLymphNodes, "000-999", "(\\d\\d\\d)")
}
// ID: NAACCR-00296; TAG: N0660; NAME: CS Lymph Nodes Eval (CS)
public boolean naaccr00296(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csLymphNodesEval))
return true
return functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "0-3,5,6,8,9")
}
// ID: NAACCR-00297; TAG: N1025; NAME: CS Lymph Nodes Eval, Lymph Nodes, Breast Schema (CS)
public boolean naaccr00297(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.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.csLymphNodesEval))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.csLymphNodes, "255,257,510,610,735,810")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "0,1,5,9")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "050,130,150,155,250,258,520,620,710,720,730,815")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "2,3,6,8")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00299; TAG: N1175; NAME: CS Lymph Nodes Eval, Schema (CS)
public boolean naaccr00299(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.csLymphNodesEval) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csLymphNodesEval)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 5, 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, t_schema_msg)
return false
}
return true
}
// ID: NAACCR-00300; TAG: N1346; NAME: CS Lymph Nodes, IntracranialGland Schema (CS)
public boolean naaccr00300(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 err_flag
err_flag = 0
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "IntracranialGland"))
return true
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "988,999"))
return false
return true
}
// ID: NAACCR-00301; TAG: N1721; NAME: CS Lymph Nodes, LN Nodes Eval, RNP, Testis (CS)
public boolean naaccr00301(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.NAACCR_GEN_DT_EMPTY)) || (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR)) || (dx_year < 2010))
return true
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.csLymphNodesEval) || functions.GEN_EMPTY(untrimmedline.regionalNodesPositive))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Testis"))
return true
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "100-500")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "2,3,6,8")) {
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00,98,99"))
return false
}
}
return true
}
// ID: NAACCR-00302; TAG: N1803; NAME: CS Lymph Nodes, Lymph Nodes Eval, RNP (CS)
public boolean naaccr00302(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.NAACCR_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (dx_year < 2010)
return true
if (functions.GEN_EMPTY(untrimmedline.regionalNodesExamined))
functions.GEN_NOOP()
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.csLymphNodesEval) || functions.GEN_EMPTY(untrimmedline.regionalNodesPositive))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "LymphomaOcularAdnexa,MelanomaSkin,MerkelCellPenis,MerkelCellScrotum"))
return true
if (functions.GEN_INLIST(t_schema_name, "MerkelCellSkin,MerkelCellVulva,Retinoblastoma"))
return true
if (functions.GEN_INLIST(t_schema_name, "Breast") && functions.GEN_INLIST(untrimmedline.csLymphNodes, "050"))
return true
if (functions.GEN_INLIST(t_schema_name, "EsophagusGEJunction") && functions.GEN_INLIST(untrimmedline.csLymphNodes, "100"))
return true
if (functions.GEN_INLIST(t_schema_name, "Stomach") && functions.GEN_INLIST(untrimmedline.csLymphNodes, "100,110"))
return true
if (functions.GEN_INLIST(t_schema_name, "Colon,Rectum") && functions.GEN_INLIST(untrimmedline.csLymphNodes, "050"))
return true
if (functions.GEN_INLIST(t_schema_name, "NETStomach,NETColon,NETRectum,GISTAppendix,GISTStomach,GISTColon,GISTRectum") && functions.GEN_INLIST(untrimmedline.csLymphNodes, "050,100"))
return true
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,999") && functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "3,6")) {
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00,98")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
else
return true
}
return true
}
// ID: NAACCR-00303; TAG: N1380; NAME: CS Lymph Nodes, MyelomaPlasmaCellDisorder (CS)
public boolean naaccr00303(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.csLymphNodes))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.csLymphNodes, "000,100,999")) {
if (!functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9734")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "987")) {
if (!functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9731,9732")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00304; TAG: N1060; NAME: CS Lymph Nodes, Nodes Pos, ColoAppRectal (CS)
public boolean naaccr00304(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.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.regionalNodesPositive))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Colon, Appendix, Rectum"))
return true
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "01-90")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "400,410,420,430,450,460,470,480")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "400,410,420,430,450,460,470,480")) {
if (!functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "95,97")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00305; TAG: N2361; NAME: CS Lymph Nodes, Nodes Pos, MelanomaSkin (CS)
public boolean naaccr00305(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.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.regionalNodesPositive))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "MelanomaSkin"))
return true
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "122,123,124,152,153,158")) {
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00,98"))
return functions.GEN_ERROR_MSG(binding, 'MelanomaSkin schema: If CS Lymph Nodes = ${untrimmedline.csLymphNodes}, then Regional Nodes Positive must not = ${untrimmedline.regionalNodesPositive}')
}
return true
}
// ID: NAACCR-00306; TAG: N1580; NAME: CS Lymph Nodes, Nodes Pos, MerkelCell Schemas (CS)
public boolean naaccr00306(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.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.regionalNodesPositive))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "MerkelCellPenis,MerkelCellScrotum,MerkelCellSkin,MerkelCellVulva"))
return true
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
if (functions.GEN_INLIST(t_schema_name, "MerkelCellScrotum,MerkelCellSkin")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "320,340,350")) {
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00,98")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
}
else {
if (functions.GEN_INLIST(t_schema_name, "MerkelCellPenis")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "120,140,150")) {
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00,98")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
}
else {
if (functions.GEN_INLIST(t_schema_name, "MerkelCellVulva")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "115,120,125")) {
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00,98")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
}
}
}
return true
}
// ID: NAACCR-00307; TAG: N0899; NAME: CS Lymph Nodes, Nodes Pos, SSF 3, Breast Schema (CS)
public boolean naaccr00307(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.csLymphNodes))
return true
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor3))
return true
if (functions.GEN_EMPTY(untrimmedline.regionalNodesPositive))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.csLymphNodes, "050")) {
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "000"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "710,730,735,740,745,764,770 ")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "001-097")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "001-097")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,710,730,735,740,745,764,770 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "000-089") && functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00-89")) {
if (functions.GEN_VAL(untrimmedline.regionalNodesPositive) < functions.GEN_VAL(untrimmedline.csSiteSpecificFactor3)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Breast schema: CS Site-Specific Factor 3 (${untrimmedline.csSiteSpecificFactor3}) must be less than or = Regional Nodes Positive (${untrimmedline.regionalNodesPositive})')
}
}
else
return true
}
return true
}
// ID: NAACCR-00308; TAG: N0784; NAME: CS Lymph Nodes, Regional Nodes Positive (CS)
public boolean naaccr00308(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[100], SSF4_SEER = new char[100]
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
if (functions.GEN_EMPTY(untrimmedline.regionalNodesPositive) || functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "01-97")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000"))
return false
}
return true
}
// ID: NAACCR-00309; TAG: N0703; NAME: CS Lymph Nodes, SSF 1, Head/Neck Schemas (CS)
public boolean naaccr00309(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.csLymphNodes))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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_ILOOKUP((t_schema_name), context.NAACCR_SCHEM_HN, context.NAACCR_SCHEM_HN_SCHEMA, [:]))
return true
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,999")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "000")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
else
return true
}
return true
}
// ID: NAACCR-00310; TAG: N1723; NAME: CS Lymph Nodes, SSF 17, Penis (CS)
public boolean naaccr00310(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.NAACCR_GEN_DT_EMPTY)) || (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR)) || (dx_year < 2010))
return true
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor17) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor17, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Penis"))
return true
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor17, "000")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000"))
return false
}
else {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor17, "000"))
return functions.GEN_ERROR_MSG(binding, 'Penis schema: If CS Lymph Nodes = 000, CS Site-Specific Factor17 must = 000')
}
}
return true
}
// ID: NAACCR-00311; TAG: N0704; NAME: CS Lymph Nodes, SSF 4, 5, Breast Schema (CS)
public boolean naaccr00311(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 err_flag
err_flag = 0
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.csLymphNodes, "000")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor4, "987")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict among schema, CS Lymph Nodes, and CS Site-Specific Factor 4')
err_flag = 1
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor5, "987")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict among schema, CS Lymph Nodes, and CS Site-Specific Factor 5')
err_flag = 1
}
}
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor4, "987,988") && (!functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor4))) {
functions.GEN_SAVE_TEXT(binding, 'Conflict among schema, CS Lymph Nodes, and CS Site-Specific Factor 4')
err_flag = 1
}
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor5, "987,988") && (!functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor5))) {
functions.GEN_SAVE_TEXT(binding, 'Conflict among schema, CS Lymph Nodes, and CS Site-Specific Factor 5')
err_flag = 1
}
}
if (err_flag == 1) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
return true
}
// ID: NAACCR-00312; TAG: N0964; NAME: CS Lymph Nodes, SSF 3, Nodes Eval, MelanomaSkin (CS)
public boolean naaccr00312(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.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor3))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
if (!functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8720-8790"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "MelanomaSkin"))
return true
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "000,005")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "121,128")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Site-Specific Factor 3 = ${untrimmedline.csSiteSpecificFactor3}, then CS Lymph Nodes must not = ${untrimmedline.csLymphNodes}')
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "121,128")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "0,1,5,9")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Lymph Nodes = ${untrimmedline.csLymphNodes}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "122,123,124,152,153,158")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "2,3,6,8,9")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Lymph Nodes = ${untrimmedline.csLymphNodes}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "020,043,045,048,050,100,150")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "8")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Site-Specific Factor 3 = ${untrimmedline.csSiteSpecificFactor3}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
return true
}
// ID: NAACCR-00313; TAG: N1371; NAME: CS Lymph Nodes, SSF 3, Nodes Eval, MerkelCell (CS)
public boolean naaccr00313(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.csSiteSpecificFactor3) || functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "MerkelCellPenis,MerkelCellScrotum,MerkelCellSkin,MerkelCellVulva"))
return true
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
if (functions.GEN_INLIST(t_schema_name, "MerkelCellScrotum,MerkelCellSkin")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "000,005")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,390,400")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Site-Specific Factor 3 = ${untrimmedline.csSiteSpecificFactor3}, then CS Lymph Nodes must not = ${untrimmedline.csLymphNodes}')
}
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "310")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "0,1,5,9")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Lymph Nodes = ${untrimmedline.csLymphNodes}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "320,340,350")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "2,3,6,8,9")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Lymph Nodes = ${untrimmedline.csLymphNodes}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "020")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "8")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Site-Specific Factor 3 = ${untrimmedline.csSiteSpecificFactor3}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "MerkelCellPenis")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "000,005")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,410,420")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Site-Specific Factor 3 = ${untrimmedline.csSiteSpecificFactor3}, then CS Lymph Nodes must not = ${untrimmedline.csLymphNodes}')
}
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "110")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "0,1,5,9")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Lymph Nodes = ${untrimmedline.csLymphNodes}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "120,140,150")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "2,3,6,8,9")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Lymph Nodes = ${untrimmedline.csLymphNodes}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "020")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "8")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Site-Specific Factor 3 = ${untrimmedline.csSiteSpecificFactor3}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
}
if (functions.GEN_INLIST(t_schema_name, "MerkelCellVulva")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "000,005")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,510,520")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Site-Specific Factor 3 = ${untrimmedline.csSiteSpecificFactor3}, then CS Lymph Nodes must not = ${untrimmedline.csLymphNodes}')
}
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "114")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "0,1,5,9")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Lymph Nodes = ${untrimmedline.csLymphNodes}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "150,120,125")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "2,3,6,8,9")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Lymph Nodes = ${untrimmedline.csLymphNodes}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "020")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "8")) {
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'For this schema: If CS Site-Specific Factor 3 = ${untrimmedline.csSiteSpecificFactor3}, then CS Lymph Nodes Eval must not = ${untrimmedline.csLymphNodesEval}')
}
}
}
return true
}
// ID: NAACCR-00314; TAG: N1163; NAME: CS Lymph Nodes, Schema (CS)
public boolean naaccr00314(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.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csLymphNodes)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 4, 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, t_schema_msg)
return false
}
return true
}
// ID: NAACCR-00315; TAG: N0661; NAME: CS Mets Eval (CS)
public boolean naaccr00315(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csMetsEval))
return true
return functions.GEN_INLIST(untrimmedline.csMetsEval, "0-3,5,6,8,9")
}
// ID: NAACCR-00316; TAG: N0945; NAME: CS Mets Eval, Mets at DX, CS Version Inp Orig (CS)
public boolean naaccr00316(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int w_cs_version_1st
w_cs_version_1st = functions.GEN_VAL(functions.GEN_SUBSTR(untrimmedline.csVersionInputOriginal, 1, 4))
if (w_cs_version_1st < 104)
return true
if (functions.GEN_EMPTY(untrimmedline.csMetsEval) || functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
if (functions.GEN_INLIST(untrimmedline.csMetsEval, "2,3,6")) {
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00"))
return false
}
return true
}
// ID: NAACCR-00317; TAG: N1176; NAME: CS Mets Eval, Schema (CS)
public boolean naaccr00317(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.csMetsEval) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csMetsEval)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 9, 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, t_schema_msg)
return false
}
return true
}
// ID: NAACCR-00318; TAG: N0658; NAME: CS Mets at DX (CS)
public boolean naaccr00318(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
return functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00-99", "(\\d\\d)")
}
// ID: NAACCR-00319; TAG: N1171; NAME: CS Mets at DX, Colon Schema (CS)
public boolean naaccr00319(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 tot_mets
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Colon"))
return true
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxBone, "1") || functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "1") || functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "1") || functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "1")) {
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00,08,16,18,31,33")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
tot_mets = 0
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxBone, "1"))
tot_mets = tot_mets + 1
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "1"))
tot_mets = tot_mets + 1
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "1"))
tot_mets = tot_mets + 1
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "1"))
tot_mets = tot_mets + 1
if (tot_mets > 1) {
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "26,27")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00320; TAG: N0962; NAME: CS Mets at DX, Lung, Laterality (CS)
public boolean naaccr00320(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.csMetsAtDx))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Lung"))
return true
if (functions.GEN_INLIST(untrimmedline.laterality, "4")) {
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDx, "23,25,26,36,38,40,41,42,43,50,51,52,53,70,75"))
return false
}
return true
}
// ID: NAACCR-00321; TAG: N1172; NAME: CS Mets at DX, Rectum Schema (CS)
public boolean naaccr00321(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 tot_mets
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Rectum"))
return true
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxBone, "1") || functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "1") || functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "1") || functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "1")) {
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00,08,16,18,29,31,33")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00322; TAG: N1174; NAME: CS Mets at DX, SSF 20, Breast Schema (CS)
public boolean naaccr00322(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.csMetsAtDx) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor20) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor20, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.csMetsAtDx, "00,05,07")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor20, "000,005"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "10,40,42,44,50,60")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor20, "000,005"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "99")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor20, "999"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00323; TAG: N1714; NAME: CS Mets at DX, SSF 4, MelanomaChor/Cil/Iris (CS)
public boolean naaccr00323(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.NAACCR_GEN_DT_EMPTY)) || (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR)) || (dx_year < 2010))
return true
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor4) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor4, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "MelanomaChoroid,MelanomaCiliaryBody,MelanomaIris"))
return true
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "10,40,50,52,54,56,60")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor4, "000")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00324; TAG: N1164; NAME: CS Mets at DX, Schema (CS)
public boolean naaccr00324(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.csMetsAtDx) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(cs_code, untrimmedline.csMetsAtDx)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 8, 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, t_schema_msg)
return false
}
return true
}
// ID: NAACCR-00325; TAG: N1893; NAME: CS Mets at DX-BBLL, LymphomaOcularAdnexa (CS)
public boolean naaccr00325(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 req_flag
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (functions.GEN_INLIST(untrimmedline.registryId, "0000001563", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)"))
return true
if (dx_year > 2015)
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxBone, "8") && !functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "8") && !functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "8") && !functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "8"))
return true
if (functions.GEN_VAL(untrimmedline.csVersionInputOriginal) < 20500)
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "LymphomaOcularAdnexa"))
return true
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxBone, "8"))
functions.GEN_SAVE_ERROR_TEXT(binding, 'MycosisFungoides schema: CS Mets at Dx-Bone must not = 8')
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "8"))
functions.GEN_SAVE_ERROR_TEXT(binding, 'MycosisFungoides schema: CS Mets at Dx-Brain must not = 8')
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "8"))
functions.GEN_SAVE_ERROR_TEXT(binding, 'MycosisFungoides schema: CS Mets at Dx-Liver must not = 8')
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "8"))
functions.GEN_SAVE_ERROR_TEXT(binding, 'MycosisFungoides schema: CS Mets at Dx-Lung must not = 8')
return true
}
// ID: NAACCR-00326; TAG: N1894; NAME: CS Mets at DX-BBLL, MycosisFungoides (CS)
public boolean naaccr00326(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.NAACCR_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (functions.GEN_INLIST(untrimmedline.registryId, "0000001563", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)"))
return true
if (dx_year > 2015)
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxBone, "8") && !functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "8") && !functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "8") && !functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "8"))
return true
if (functions.GEN_VAL(untrimmedline.csVersionInputOriginal) < 20500)
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.csMetsAtDxBone, "8"))
functions.GEN_SAVE_ERROR_TEXT(binding, 'MycosisFungoides schema: CS Mets at Dx-Bone must not = 8')
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "8"))
functions.GEN_SAVE_ERROR_TEXT(binding, 'MycosisFungoides schema: CS Mets at Dx-Brain must not = 8')
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "8"))
functions.GEN_SAVE_ERROR_TEXT(binding, 'MycosisFungoides schema: CS Mets at Dx-Liver must not = 8')
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "8"))
functions.GEN_SAVE_ERROR_TEXT(binding, 'MycosisFungoides schema: CS Mets at Dx-Lung must not = 8')
return true
}
// ID: NAACCR-00327; TAG: N0987; NAME: CS Mets at DX-Bone (CS)
public boolean naaccr00327(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDxBone))
return true
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxBone, "0,1,8,9"))
return false
return true
}
// ID: NAACCR-00328; TAG: N1944; NAME: CS Mets at DX-Bone, CS Mets at DX (CS)
public boolean naaccr00328(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
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDxBone) || functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxBone, "1")) {
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00,99"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at Dx-Bone = ${untrimmedline.csMetsAtDxBone}, CS Mets at DX must not = 00 or 99')
}
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00")) {
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxBone, "0"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at DX = ${untrimmedline.csMetsAtDx}, CS Mets at Dx-Bone must = 0')
}
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "98") && !functions.GEN_INLIST(t_schema_name, "IllDefinedOther")) {
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxBone, "8"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at DX = ${untrimmedline.csMetsAtDx} and schema is not IllDefinedOther, CS Mets at Dx-Bone must = 8')
}
return true
}
// ID: NAACCR-00329; TAG: N0988; NAME: CS Mets at DX-Brain (CS)
public boolean naaccr00329(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDxBrain))
return true
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "0,1,8,9"))
return false
return true
}
// ID: NAACCR-00330; TAG: N1945; NAME: CS Mets at DX-Brain, CS Mets at DX (CS)
public boolean naaccr00330(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
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDxBrain) || functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "1")) {
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00,99"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at Dx-Brain = ${untrimmedline.csMetsAtDxBrain}, CS Mets at DX must not = 00 or 99')
}
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00")) {
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "0"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at DX = ${untrimmedline.csMetsAtDx}, CS Mets at Dx-Brain must = 0')
}
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "98") && !functions.GEN_INLIST(t_schema_name, "IllDefinedOther")) {
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxBrain, "8"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at DX = ${untrimmedline.csMetsAtDx} and schema is not IllDefinedOther, CS Mets at Dx-Brain must = 8')
}
return true
}
// ID: NAACCR-00331; TAG: N0989; NAME: CS Mets at DX-Liver (CS)
public boolean naaccr00331(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDxLiver))
return true
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "0,1,8,9"))
return false
return true
}
// ID: NAACCR-00332; TAG: N1947; NAME: CS Mets at DX-Liver, CS Mets at DX (CS)
public boolean naaccr00332(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
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDxLiver) || functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "1")) {
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00,99"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at Dx-Liver = ${untrimmedline.csMetsAtDxLiver}, CS Mets at DX must not = 00 or 99')
}
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00")) {
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "0"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at DX = ${untrimmedline.csMetsAtDx}, CS Mets at Dx-Liver must = 0')
}
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "98") && !functions.GEN_INLIST(t_schema_name, "IllDefinedOther")) {
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxLiver, "8"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at DX = ${untrimmedline.csMetsAtDx} and schema is not IllDefinedOther, CS Mets at Dx-Liver must = 8')
}
return true
}
// ID: NAACCR-00333; TAG: N0990; NAME: CS Mets at DX-Lung (CS)
public boolean naaccr00333(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDxLung))
return true
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "0,1,8,9"))
return false
return true
}
// ID: NAACCR-00334; TAG: N1948; NAME: CS Mets at DX-Lung, CS Mets at DX (CS)
public boolean naaccr00334(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
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDxLung) || functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
if (functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "1")) {
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00,99"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at Dx-Lung = ${untrimmedline.csMetsAtDxLung}, CS Mets at DX must not = 00 or 99')
}
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00")) {
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "0"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at DX = ${untrimmedline.csMetsAtDx}, CS Mets at Dx-Lung must = 0')
}
if (functions.GEN_INLIST(untrimmedline.csMetsAtDx, "98") && !functions.GEN_INLIST(t_schema_name, "IllDefinedOther")) {
if (!functions.GEN_INLIST(untrimmedline.csMetsAtDxLung, "8"))
return functions.GEN_ERROR_MSG(binding, 'If CS Mets at DX = ${untrimmedline.csMetsAtDx} and schema is not IllDefinedOther, CS Mets at Dx-Lung must = 8')
}
return true
}
// ID: NAACCR-00335; TAG: N2116; NAME: CS Over-ride CS 20, Date of Diagnosis (NPCR)
public boolean naaccr00335(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.NAACCR_GEN_DT_ERROR)) {
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
}
if ((dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY)) || (dx_year < 2004)) {
if (!functions.GEN_EMPTY(untrimmedline.overRideCs20))
return functions.GEN_ERROR_MSG(binding, 'If DX Year less than 2004 or blank, Over-ride CS 20 must be blank')
}
else {
if (dx_year < 2012) {
if (!functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "3-7")) {
if (!functions.GEN_EMPTY(untrimmedline.overRideCs20))
return false
}
}
else {
if (dx_year > 2015) {
if (!functions.GEN_EMPTY(untrimmedline.overRideCs20))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis is 2016 or later, Over-ride CS 20 must be blank')
}
}
}
return true
}
// ID: NAACCR-00336; TAG: N1705; NAME: CS Over-ride CS 20, Rpt Srce, CS Fields (NPCR)
public boolean naaccr00336(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (!functions.GEN_INLIST(untrimmedline.overRideCs20, "1"))
return true
if (!functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "3-7"))
return true
if (!functions.GEN_EMPTY(untrimmedline.csExtension) || !functions.GEN_EMPTY(untrimmedline.csTumorSize) || !functions.GEN_EMPTY(untrimmedline.csTumorSizeExtEval) || !functions.GEN_EMPTY(untrimmedline.csLymphNodes) || !functions.GEN_EMPTY(untrimmedline.csLymphNodesEval) || !functions.GEN_EMPTY(untrimmedline.csMetsAtDx) || !functions.GEN_EMPTY(untrimmedline.csMetsEval) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor1) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor2) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor3) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor4) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor5) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor6) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor7) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor8) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor9) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor10) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor11) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor12) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor13) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor14) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor15) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor16) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor17) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor18) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor19) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor20) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor21) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor22) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor23) || !functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor24)) {
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor25))
functions.GEN_SAVE_ERROR_TEXT(binding, 'CS Site-Specific Factor25 cannot be left blank')
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
functions.GEN_SAVE_ERROR_TEXT(binding, 'CS Version Input Original cannot be left blank')
if (functions.GEN_EMPTY(untrimmedline.csVersionInputCurrent))
functions.GEN_SAVE_ERROR_TEXT(binding, 'CS Version Input Current cannot be left blank')
}
return true
}
// ID: NAACCR-00337; TAG: N1595; NAME: CS Over-rides (NPCR)
public boolean naaccr00337(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (!functions.GEN_EMPTY(untrimmedline.overRideCs1) || !functions.GEN_EMPTY(untrimmedline.overRideCs2) || !functions.GEN_EMPTY(untrimmedline.overRideCs3) || !functions.GEN_EMPTY(untrimmedline.overRideCs4) || !functions.GEN_EMPTY(untrimmedline.overRideCs5) || !functions.GEN_EMPTY(untrimmedline.overRideCs6) || !functions.GEN_EMPTY(untrimmedline.overRideCs7) || !functions.GEN_EMPTY(untrimmedline.overRideCs8) || !functions.GEN_EMPTY(untrimmedline.overRideCs9) || !functions.GEN_EMPTY(untrimmedline.overRideCs10) || !functions.GEN_EMPTY(untrimmedline.overRideCs11) || !functions.GEN_EMPTY(untrimmedline.overRideCs12) || !functions.GEN_EMPTY(untrimmedline.overRideCs13) || !functions.GEN_EMPTY(untrimmedline.overRideCs14) || !functions.GEN_EMPTY(untrimmedline.overRideCs15) || !functions.GEN_EMPTY(untrimmedline.overRideCs16) || !functions.GEN_EMPTY(untrimmedline.overRideCs17) || !functions.GEN_EMPTY(untrimmedline.overRideCs18) || !functions.GEN_EMPTY(untrimmedline.overRideCs19))
return functions.GEN_SAVE_ERROR_TEXT(binding, 'CS Over-ride fields 1-19 must be blank')
if (functions.GEN_EMPTY(untrimmedline.overRideCs20) || functions.GEN_INLIST(untrimmedline.overRideCs20, "1"))
return true
else
return functions.GEN_SAVE_ERROR_TEXT(binding, 'Over-ride CS 20 must be blank or = 1')
return true
}
// ID: NAACCR-00338; TAG: N1321; NAME: CS Reg Nodes Ex, Pos, Site, Hist ICDO3, Report (CS)
public boolean naaccr00338(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 rnp, rne, err_flag
int dx_year
err_flag = 0
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year < 2004 || dx_year > 2017)
return true
if (functions.GEN_EMPTY(untrimmedline.regionalNodesExamined) || functions.GEN_EMPTY(untrimmedline.regionalNodesPositive))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
rnp = functions.GEN_VAL(untrimmedline.regionalNodesPositive)
rne = functions.GEN_VAL(untrimmedline.regionalNodesExamined)
if (functions.GEN_VAL(untrimmedline.typeOfReportingSource) == 7) {
if ((rne != 99) || (rnp != 99))
return functions.GEN_ERROR_MSG(binding, 'Death Certificate Only, Regional Nodes Positive and Examined must both = 99')
else
return true
}
if (functions.GEN_INLIST(t_schema_name, "HemeRetic,Lymphoma,Brain,CNSOther,IllDefinedOther,Placenta") || functions.GEN_INLIST(t_schema_name, "IntracranialGland") || (functions.GEN_INLIST(t_schema_name, "MyelomaPlasmaCellDisorder") && !functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9734"))) {
if ((rnp != 99) || (rne != 99)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Regional Nodes Positive and Examined must both = 99 for this Schema, site/histology')
}
}
if ((dx_year < 2010) && (functions.GEN_VAL(untrimmedline.csVersionInputCurrent) == 20510)) {
if (rne == 0 && rnp != 98)
err_flag = 1
else {
if (rne >= 1 && rne <= 90) {
if (rnp == 97 || rnp == 99 || rnp <= rne)
return true
else
err_flag = 1
}
else {
if (rne == 95 || rne == 96 || rne == 97 || rne == 98) {
if ((rnp >= 0 && rnp <= 90) || (rnp == 95) || (rnp == 97) || (rnp == 99))
return true
else
err_flag = 1
}
else {
if (rne == 99) {
if (rnp == 99)
return true
else
err_flag = 1
}
}
}
}
}
else {
if (rne == 0 && rnp != 98)
err_flag = 1
else {
if (rne >= 1 && rne <= 90) {
if (rnp == 95 || rnp == 97 || rnp == 99 || rnp <= rne)
return true
else
err_flag = 1
}
else {
if (rne == 95) {
if (rnp == 0 || rnp == 95 || rnp == 99)
return true
else
err_flag = 1
}
}
}
if (rne == 96 || rne == 97 || rne == 98) {
if ((rnp >= 0 && rnp <= 90) || (rnp == 95) || (rnp == 97) || (rnp == 99))
return true
else
err_flag = 1
}
else {
if (rne == 99) {
if (rnp == 99)
return true
else
err_flag = 1
}
}
}
if (err_flag == 1) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
return true
}
// ID: NAACCR-00339; TAG: N1895; NAME: CS SSF 1, Behavior, Lung Schema (CS)
public boolean naaccr00339(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988"))
return true
if ((functions.GEN_VAL(untrimmedline.csVersionInputOriginal) < 20500) && (!functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal)))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Lung"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "000"))
return false
}
return true
}
// ID: NAACCR-00340; TAG: N1908; NAME: CS SSF 1, Brain, CNSOther, IntracranialGland (CS)
public boolean naaccr00340(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite))
return true
if ((functions.GEN_VAL(untrimmedline.csVersionInputOriginal) < 20500) && (!functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal)))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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,CNSOther,IntracranialGland"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998")) {
if (!functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "00-19"))
return false
}
return true
}
// ID: NAACCR-00341; TAG: N1538; NAME: CS SSF 1, CS SSF 3, Lower GI Schemas (CS)
public boolean naaccr00341(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor3) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "SmallIntestine,Appendix,Colon,Rectum"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "998")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "998")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
else
return true
}
return true
}
// ID: NAACCR-00342; TAG: N1539; NAME: CS SSF 1, Extension, Gyn Schemas (CS)
public boolean naaccr00342(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Cervix,CorpusAdenosarcoma,CorpusCarcinoma,CorpusSarcoma") && !functions.GEN_INLIST(t_schema_name, "FallopianTube,Vagina,Vulva"))
return true
if (functions.GEN_INLIST(untrimmedline.csExtension, "000")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "987")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00343; TAG: N1764; NAME: CS SSF 1, Extension, KidneyParenchyma Schema (CS)
public boolean naaccr00343(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "KidneyParenchyma"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "010,020,030,991")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "000,100"))
return false
}
return true
}
// ID: NAACCR-00344; TAG: N1746; NAME: CS SSF 1, Histol, Urothelial Schemas (CS)
public boolean naaccr00344(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.csSiteSpecificFactor1))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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,Bladder,Urethra"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "987")) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8020, 8031, 8050, 8082, 8120-8124, 8130-8131")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
else
return true
}
return true
}
// ID: NAACCR-00345; TAG: N1896; NAME: CS SSF 1, Lymph Nodes, CorpusAdenosarcoma (CS)
public boolean naaccr00345(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
if (functions.GEN_VAL(untrimmedline.csVersionInputOriginal) < 20500)
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "CorpusAdenosarcoma"))
return true
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,999")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "100,120,130,140,200,210,220,310,320"))
return false
}
return true
}
// ID: NAACCR-00346; TAG: N1897; NAME: CS SSF 1, Lymph Nodes, CorpusCarcinoma (CS)
public boolean naaccr00346(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
if (functions.GEN_VAL(untrimmedline.csVersionInputOriginal) < 20500)
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "CorpusCarcinoma"))
return true
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,999")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "100,110,120,200,310,320"))
return false
}
return true
}
// ID: NAACCR-00347; TAG: N1898; NAME: CS SSF 1, Lymph Nodes, CorpusSarcoma (CS)
public boolean naaccr00347(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
if (functions.GEN_VAL(untrimmedline.csVersionInputOriginal) < 20500)
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "CorpusSarcoma"))
return true
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,999")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "100,110,120,200,210,220,310,320"))
return false
}
return true
}
// ID: NAACCR-00348; TAG: N0705; NAME: CS SSF 1, RX Summ--Surg, Retinoblastoma Schema (CS)
public boolean naaccr00348(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.csSiteSpecificFactor1))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Retinoblastoma"))
return true
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "40,41")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "970")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
else
return true
}
return true
}
// ID: NAACCR-00349; TAG: N0948; NAME: CS SSF 1, SSF 2, Prostate Schema (CS)
public boolean naaccr00349(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.csSiteSpecificFactor1) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor2))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Prostate"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "998"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "998")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998"))
return true
else {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00350; TAG: N1765; NAME: CS SSF 1, SSF 2, SSF 15, SSF 16, Breast (CS)
public boolean naaccr00350(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.NAACCR_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (dx_year < 2010)
return true
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor2) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "988") || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor15) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor15, "988") || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor16) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.csSiteSpecificFactor1, "010") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "010") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor15, "010")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "111"))
return functions.GEN_ERROR_MSG(binding, 'If CS Site-Specific Factor 1 = ${untrimmedline.csSiteSpecificFactor1}, CS Site-Specific Factor 2 = ${untrimmedline.csSiteSpecificFactor2}, and CS Site-Specific Factor15 = ${untrimmedline.csSiteSpecificFactor15}, CS Site-Specific Factor16 must = 111')
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "010") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "010") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor15, "020")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "110"))
return functions.GEN_ERROR_MSG(binding, 'If CS Site-Specific Factor 1 = ${untrimmedline.csSiteSpecificFactor1}, CS Site-Specific Factor 2 = ${untrimmedline.csSiteSpecificFactor2}, and CS Site-Specific Factor15 = ${untrimmedline.csSiteSpecificFactor15}, CS Site-Specific Factor16 must = 110')
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "010") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "020") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor15, "010")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "101"))
return functions.GEN_ERROR_MSG(binding, 'If CS Site-Specific Factor 1 = ${untrimmedline.csSiteSpecificFactor1}, CS Site-Specific Factor 2 = ${untrimmedline.csSiteSpecificFactor2}, and CS Site-Specific Factor15 = ${untrimmedline.csSiteSpecificFactor15}, CS Site-Specific Factor16 must = 101')
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "010") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "020") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor15, "020")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "100"))
return functions.GEN_ERROR_MSG(binding, 'If CS Site-Specific Factor 1 = ${untrimmedline.csSiteSpecificFactor1}, CS Site-Specific Factor 2 = ${untrimmedline.csSiteSpecificFactor2}, and CS Site-Specific Factor15 = ${untrimmedline.csSiteSpecificFactor15}, CS Site-Specific Factor16 must = 100')
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "020") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "010") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor15, "010")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "011"))
return functions.GEN_ERROR_MSG(binding, 'If CS Site-Specific Factor 1 = ${untrimmedline.csSiteSpecificFactor1}, CS Site-Specific Factor 2 = ${untrimmedline.csSiteSpecificFactor2}, and CS Site-Specific Factor15 = ${untrimmedline.csSiteSpecificFactor15}, CS Site-Specific Factor16 must = 011')
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "020") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "010") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor15, "020")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "010"))
return functions.GEN_ERROR_MSG(binding, 'If CS Site-Specific Factor 1 = ${untrimmedline.csSiteSpecificFactor1}, CS Site-Specific Factor 2 = ${untrimmedline.csSiteSpecificFactor2}, and CS Site-Specific Factor15 = ${untrimmedline.csSiteSpecificFactor15}, CS Site-Specific Factor16 must = 010')
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "020") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "020") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor15, "010")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "001"))
return functions.GEN_ERROR_MSG(binding, 'If CS Site-Specific Factor 1 = ${untrimmedline.csSiteSpecificFactor1}, CS Site-Specific Factor 2 = ${untrimmedline.csSiteSpecificFactor2}, and CS Site-Specific Factor15 = ${untrimmedline.csSiteSpecificFactor15}, CS Site-Specific Factor16 must = 001')
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "020") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "020") && functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor15, "020")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "000"))
return functions.GEN_ERROR_MSG(binding, 'If CS Site-Specific Factor 1 = ${untrimmedline.csSiteSpecificFactor1}, CS Site-Specific Factor 2 = ${untrimmedline.csSiteSpecificFactor2}, and CS Site-Specific Factor15 = ${untrimmedline.csSiteSpecificFactor15}, CS Site-Specific Factor16 must = 000')
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "030,996,997,998,999") || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "030,996,997,998,999") || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor15, "030,997,998,999")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "999"))
return functions.GEN_ERROR_MSG(binding, 'If CS Site-Specific Factor 1 = ${untrimmedline.csSiteSpecificFactor1}, CS Site-Specific Factor 2 = ${untrimmedline.csSiteSpecificFactor2}, and CS Site-Specific Factor15 = ${untrimmedline.csSiteSpecificFactor15}, CS Site-Specific Factor16 must = 999')
else
return true
}
return true
}
// ID: NAACCR-00351; TAG: N1540; NAME: CS SSF 1, Skin/Scrotum/Merkel Cell Schemas (CS)
public boolean naaccr00351(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.csTumorSize) || functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Skin,Scrotum,MerkelCellPenis,MerkelCellScrotum,MerkelCellSkin,MerkelCellVulva")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "000")) {
if (!functions.GEN_INLIST(untrimmedline.csTumorSize, "000") || !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, t_schema_msg)
return false
}
}
}
return true
}
// ID: NAACCR-00352; TAG: N1541; NAME: CS SSF 1, Surg, DX/Stg, Sarcomas (CS)
public boolean naaccr00352(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.csSiteSpecificFactor1) || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite) || functions.GEN_EMPTY(untrimmedline.rxSummDxStgProc))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "HeartMediastinum,Soft Tissue,Retroperitoneum,Peritoneum"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998")) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "20-89") || functions.GEN_INLIST(untrimmedline.rxSummDxStgProc, "02,05,06", "(\\d\\d)")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00353; TAG: N1542; NAME: CS SSF 1, Surg, DX/Stg, Skin/Scrotum/Merkel (CS)
public boolean naaccr00353(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.csSiteSpecificFactor1) || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite) || functions.GEN_EMPTY(untrimmedline.rxSummDxStgProc))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Skin,Scrotum,MerkelCellPenis,MerkelCellScrotum,MerkelCellSkin,MerkelCellVulva"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998")) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "20-89") || functions.GEN_INLIST(untrimmedline.rxSummDxStgProc, "02,05,06", "(\\d\\d)")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00354; TAG: N1543; NAME: CS SSF 1, Surg, Sarcomas (CS)
public boolean naaccr00354(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.csSiteSpecificFactor1) || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "HeartMediastinum,Soft Tissue,Retroperitoneum,Peritoneum"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998")) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "20-89")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00355; TAG: N1544; NAME: CS SSF 1, Surg, Skin/Scrotum/Merkel (CS)
public boolean naaccr00355(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.csSiteSpecificFactor1) || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Skin,Scrotum,MerkelCellPenis,MerkelCellScrotum,MerkelCellSkin,MerkelCellVulva"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998")) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "20-89")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00356; TAG: N1747; NAME: CS SSF 1, Surg, Urothelial Schemas (CS)
public boolean naaccr00356(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.csSiteSpecificFactor1) || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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,Bladder,Urethra"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998")) {
if (!functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "00-19,99")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
else
return true
}
else
return true
return true
}
// ID: NAACCR-00357; TAG: N1791; NAME: CS SSF 1, Surgery, KidneyParenchyma Schema (CS)
public boolean naaccr00357(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "KidneyParenchyma"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "998")) {
if (!functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "00-27"))
return false
}
return true
}
// ID: NAACCR-00358; TAG: N1909; NAME: CS SSF 1, TS/Ext Eval, Retinoblastoma Schema (CS)
public boolean naaccr00358(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 w_cs_version_1st
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csTumorSizeExtEval) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor1))
return true
if (functions.GEN_VAL(untrimmedline.csVersionInputOriginal) < 20500)
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Retinoblastoma"))
return true
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "3,5,6")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "970"))
return functions.GEN_ERROR_MSG(binding, 'If CS Tumor Size/Ext Eval = ${untrimmedline.csTumorSizeExtEval}, CS Site-Specific Factor 1 must not = 970')
}
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "6")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "950"))
return functions.GEN_ERROR_MSG(binding, 'If CS Tumor Size/Ext Eval = ${untrimmedline.csTumorSizeExtEval}, CS Site-Specific Factor 1 must not 950')
}
return true
}
// ID: NAACCR-00359; TAG: N1545; NAME: CS SSF 1, Upper GI Schemas (CS)
public boolean naaccr00359(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.csSiteSpecificFactor1) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_EMPTY(untrimmedline.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.regionalNodesPositive))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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,EsophagusGEJunction,Stomach,NETStomach"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "000")) {
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "00")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
else
return true
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "100-400")) {
if (functions.GEN_INLIST(untrimmedline.regionalNodesPositive, "98")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
else
return true
}
}
return true
}
// ID: NAACCR-00360; TAG: N0951; NAME: CS SSF 1-9, Head and Neck Schemas (CS)
public boolean naaccr00360(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.csLymphNodes))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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_ILOOKUP((t_schema_name), context.NAACCR_SCHEM_HN, context.NAACCR_SCHEM_HN_SCHEMA, [:]))
return true
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "987,988, ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,999")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "987")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor1) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor3) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor4) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor5) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor6))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "988") || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "988") || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor4, "988") || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor5, "988") || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor6, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "999")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor1, "999") || !functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor2, "987,988,999, ") || !functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor3, "999") || !functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor4, "999") || !functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor5, "999") || !functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor6, "999") || !functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor7, "988,999, ") || !functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor8, "988,999, ") || !functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor9, "988,998,999, ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00361; TAG: N1899; NAME: CS SSF 10, Lymph Nodes, Vulva Schema (CS)
public boolean naaccr00361(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.csSiteSpecificFactor10) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "988") || functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
if (functions.GEN_VAL(untrimmedline.csVersionInputOriginal) < 20500)
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Vulva"))
return true
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,999")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "100,110,120,200"))
return false
}
return true
}
// ID: NAACCR-00362; TAG: N1546; NAME: CS SSF 10, SSF 11, Breast (CS)
public boolean naaccr00362(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.csSiteSpecificFactor10) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "988") || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor11) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.csSiteSpecificFactor10, "998")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "998")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Breast schema: If CS Site-Specific Factor10 = 998, CS Site-Specific Factor11 (${untrimmedline.csSiteSpecificFactor11}) must = 998')
}
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "998")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "998")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Breast schema: If CS Site-Specific Factor11 = 998, CS Site-Specific Factor10 (${untrimmedline.csSiteSpecificFactor10}) must = 998')
}
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "991")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "010")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Breast schema: If CS Site-Specific Factor10 = ${untrimmedline.csSiteSpecificFactor10}, CS Site-Specific Factor11 must not = ${untrimmedline.csSiteSpecificFactor11}')
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "501-980")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "020")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Breast schema: If CS Site-Specific Factor10 = ${untrimmedline.csSiteSpecificFactor10}, CS Site-Specific Factor11 must not = ${untrimmedline.csSiteSpecificFactor11}')
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "020")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "501-990,998,999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Breast schema: If CS Site-Specific Factor11 = ${untrimmedline.csSiteSpecificFactor11}, CS Site-Specific Factor10 must not = ${untrimmedline.csSiteSpecificFactor10}')
}
}
return true
}
// ID: NAACCR-00363; TAG: N1547; NAME: CS SSF 10, SSF 11, Surgery, DX/Stg, Breast (CS)
public boolean naaccr00363(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.csSiteSpecificFactor10) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "988") || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor11) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "988") || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite) || functions.GEN_EMPTY(untrimmedline.rxSummDxStgProc) || functions.GEN_EMPTY(untrimmedline.rxSummScopeRegLnSur) || functions.GEN_EMPTY(untrimmedline.rxSummSurgOthRegDis))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.rxSummSurgPrimSite, "00") && functions.GEN_INLIST(untrimmedline.rxSummDxStgProc, "00") && functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "0") && functions.GEN_INLIST(untrimmedline.rxSummSurgOthRegDis, "0")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "998") || !functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "998")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'If no surgery/BX performed, both CS Site-Specific Factor10 (${untrimmedline.csSiteSpecificFactor10}) and CS Site-Specific Factor11 (${untrimmedline.csSiteSpecificFactor11}) must = 998')
}
else
return true
}
return true
}
// ID: NAACCR-00364; TAG: N1582; NAME: CS SSF 10, SSF 16, Testis (CS)
public boolean naaccr00364(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.csSiteSpecificFactor10) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Testis"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor10, "995,996")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor16, "998,999")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Testis schema: If CS Site-Specific Factor10 = ${untrimmedline.csSiteSpecificFactor10}, CS Site-Specific Factor16 must not = ${untrimmedline.csSiteSpecificFactor16}')
}
else
return true
}
return true
}
// ID: NAACCR-00365; TAG: N1910; NAME: CS SSF 11, GISTAppendix, Colon, Rectum (CS)
public boolean naaccr00365(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.csSiteSpecificFactor11) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "988") || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite))
return true
if ((functions.GEN_VAL(untrimmedline.csVersionInputOriginal) < 20500) && (!functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal)))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "GISTAppendix,GISTColon,GISTRectum"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "998")) {
if (!functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "00-19"))
return false
}
return true
}
// ID: NAACCR-00366; TAG: N1548; NAME: CS SSF 11, Lip/OralCavity/Nasal Schemas (CS)
public boolean naaccr00366(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.csSiteSpecificFactor11) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "988") || functions.GEN_EMPTY(untrimmedline.csTumorSize) || functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "BuccalMucosa,FloorMouth,GumLower,GumOther,GumUpper ") || functions.GEN_INLIST(t_schema_name, "LipLower,LipOther,LipUpper,MouthOther") || functions.GEN_INLIST(t_schema_name, "NasalCavity,PalateHard,SinusEthmoid,SinusMaxillary") || functions.GEN_INLIST(t_schema_name, "MelanomaBuccalMucosa,MelanomaFloorMouth,MelanomaGumLower") || functions.GEN_INLIST(t_schema_name, "MelanomaGumOther,MelanomaGumUpper") || functions.GEN_INLIST(t_schema_name, "MelanomaLipLower,MelanomaLipOther,MelanomaLipUpper") || functions.GEN_INLIST(t_schema_name, "MelanomaMouthOther,MelanomaNasalCavity,MelanomaPalateHard") || functions.GEN_INLIST(t_schema_name, "MelanomaSinusEthmoid,MelanomaSinusMaxillary")) {
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "000")) {
if (!functions.GEN_INLIST(untrimmedline.csTumorSize, "000") || !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, t_schema_msg)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "998")) {
if (!functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "00-19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
}
return true
}
// ID: NAACCR-00367; TAG: N1780; NAME: CS SSF 11, Lymph Nodes, Vulva (CS)
public boolean naaccr00367(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.csSiteSpecificFactor11) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "988") || functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,2"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Vulva"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "000")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,999"))
return false
}
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "000,998,999"))
return false
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "998")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "110-800"))
return false
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "010,020,030")) {
if (functions.GEN_INLIST(untrimmedline.csLymphNodes, "000,999"))
return false
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "999")) {
if (!functions.GEN_INLIST(untrimmedline.csLymphNodes, "999"))
return false
}
return true
}
// ID: NAACCR-00368; TAG: N1420; NAME: CS SSF 11, Surg, Appendix Schema (CS)
public boolean naaccr00368(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.csSiteSpecificFactor11) || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Appendix"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "998")) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "20-90")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00369; TAG: N1366; NAME: CS SSF 11, Surg, DX/Stg Proc, Appendix Schema (CS)
public boolean naaccr00369(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.csSiteSpecificFactor11) || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite) || functions.GEN_EMPTY(untrimmedline.rxSummDxStgProc))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Appendix"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "998")) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "20-90") || functions.GEN_INLIST(untrimmedline.rxSummDxStgProc, "02,05,06", "(\\d\\d)")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00370; TAG: N1550; NAME: CS SSF 11, Surg, DX/Stg Proc, Skin Schema (CS)
public boolean naaccr00370(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.csSiteSpecificFactor11) || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite) || functions.GEN_EMPTY(untrimmedline.rxSummDxStgProc))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Skin"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "998")) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "20-90") || functions.GEN_INLIST(untrimmedline.rxSummDxStgProc, "02,05,06", "(\\d\\d)")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00371; TAG: N1549; NAME: CS SSF 11, Surg, Skin Schema (CS)
public boolean naaccr00371(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.csSiteSpecificFactor11) || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Skin"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor11, "998")) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "20-90")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NAACCR-00372; TAG: N1551; NAME: CS SSF 12, SSF 13, Breast (CS)
public boolean naaccr00372(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.csSiteSpecificFactor12) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "988") || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor13) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.csSiteSpecificFactor12, "998")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "998")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Breast schema: If CS Site-Specific Factor12 = 998, CS Site-Specific Factor13 (${untrimmedline.csSiteSpecificFactor13}) must = 998')
}
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "998")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "998")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Breast schema: If CS Site-Specific Factor13 = 998, CS Site-Specific Factor12 (${untrimmedline.csSiteSpecificFactor12}) must = 998')
}
else
return true
}
return true
}
// ID: NAACCR-00373; TAG: N1757; NAME: CS SSF 12, SSF 13, Prostate Schema (CS)
public boolean naaccr00373(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 w_cs_version_1st
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor12) || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor13))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "988") || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Prostate"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "001-101")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "991") && (functions.GEN_VAL(untrimmedline.csSiteSpecificFactor12) > functions.GEN_VAL(untrimmedline.csSiteSpecificFactor13)) && (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "999")))
return false
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "991")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "000-101,991,999"))
return false
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "998")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "998"))
return false
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "998")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "998"))
return false
else
return true
}
return true
}
// ID: NAACCR-00374; TAG: N1552; NAME: CS SSF 12, SSF 13, Surgery, DX/Stg, Breast (CS)
public boolean naaccr00374(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.csSiteSpecificFactor12) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "988") || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor13) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "988") || functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite) || functions.GEN_EMPTY(untrimmedline.rxSummDxStgProc) || functions.GEN_EMPTY(untrimmedline.rxSummScopeRegLnSur) || functions.GEN_EMPTY(untrimmedline.rxSummSurgOthRegDis))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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.rxSummSurgPrimSite, "00") && functions.GEN_INLIST(untrimmedline.rxSummDxStgProc, "00") && functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "0") && functions.GEN_INLIST(untrimmedline.rxSummSurgOthRegDis, "0")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "998") || !functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "998")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'If no surgery/BX performed, both CS Site-Specific Factor12 (${untrimmedline.csSiteSpecificFactor12}) and CS Site-Specific Factor13 (${untrimmedline.csSiteSpecificFactor13}) must = 998')
}
else
return true
}
return true
}
// ID: NAACCR-00375; TAG: N1583; NAME: CS SSF 12, SSF 13, Testis (CS)
public boolean naaccr00375(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.csSiteSpecificFactor12) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "988") || functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor13) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "988"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Testis"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "998")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "998")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Testis schema: If CS Site-Specific Factor12 = 998, CS Site-Specific Factor13 (${untrimmedline.csSiteSpecificFactor13}) must = 998')
}
else
return true
}
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "998")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor12, "998")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'Testis schema: If CS Site-Specific Factor13 = 998, CS Site-Specific Factor12 (${untrimmedline.csSiteSpecificFactor12}) must = 998')
}
else
return true
}
return true
}
// ID: NAACCR-00376; TAG: N1777; NAME: CS SSF 13, Extension, Prostate Schema (CS)
public boolean naaccr00376(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.csSiteSpecificFactor13) || functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "988") || functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1"))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
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, "Prostate"))
return true
if (functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor13, "998")) {
if (functions.GEN_INLIST(untrimmedline.csExtension, "150"))
return false
}
return true
}
// ID: NAACCR-00377; TAG: N1584; NAME: CS SSF 14, SSF 15, Testis (CS)
public boolean naaccr00377(Binding binding, Map