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.NaaccrTranslatedCompiledRules4.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 NaaccrTranslatedCompiledRules4 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-00863' <= id && id <= 'NAACCR-01134'
}
// ID: NAACCR-00863; TAG: N0785; NAME: Name--Maiden, Check for Unknown (NAACCR)
public boolean naaccr00863(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.nameMaiden))
return true
if (functions.GEN_MATCH(functions.GEN_TRIM(untrimmedline.nameMaiden, ((Integer)context.NAACCR_GEN_LEFT)), "([A-Za-z0-9])"))
return true
if (functions.GEN_LOOKUP(functions.GEN_UPPER(untrimmedline.nameMaiden), context.NAACCR_BIRTHSURNAME_UNK, context.NAACCR_BIRTHSURNAME_UNK_UNK_STR, [:]))
return true
return true
}
// ID: NAACCR-00864; TAG: N0239; NAME: Name--Middle (NPCR)
public boolean naaccr00864(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.nameMiddle))
return true
if (!functions.GEN_MATCH(untrimmedline.nameMiddle, "([A-Za-z](([A-Za-z])|(\\s)|(\\-)|('))*)"))
return false
return true
}
// ID: NAACCR-00865; TAG: N0169; NAME: Next Follow-Up Source (COC)
public boolean naaccr00865(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.nextFollowUpSource))
return true
if (functions.GEN_INLIST(untrimmedline.nextFollowUpSource, "0-5, 8, 9"))
return true
return false
}
// ID: NAACCR-00866; TAG: N0544; NAME: Next Follow-Up Source, Date of Diagnosis (COC)
public boolean naaccr00866(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_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 > 2002) {
if (functions.GEN_EMPTY(untrimmedline.nextFollowUpSource))
return false
}
return true
}
// ID: NAACCR-00867; TAG: N0735; NAME: Non-Reportable Skin ICDO2 (SEER IF116)
public boolean naaccr00867(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
if (functions.GEN_EMPTY(untrimmedline.histologyIcdO2))
return true
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 > 2000)
return true
if (functions.GEN_INLIST(untrimmedline.primarySite, "440-449", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.histologyIcdO2, "8000-8110"))
return false
return true
}
// ID: NAACCR-00868; TAG: N0736; NAME: Non-Reportable Skin ICDO3 (SEER IF117)
public boolean naaccr00868(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
if (functions.GEN_INLIST(untrimmedline.primarySite, "440-449", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8000-8110"))
return false
return true
}
// ID: NAACCR-00869; TAG: N1206; NAME: Obsolete Codes - CS Extension (CS)
public boolean naaccr00869(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "2 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csExtension)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("2", table) == 0 && functions.GEN_STRCMP(untrimmedline.csExtension, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csExtension, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && dx_year > 2009)) {
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, 'CS Extension=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Extension=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Extension=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Extension=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Extension=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Extension=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Extension=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Extension=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Extension=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Extension=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Extension=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Extension=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Extension=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Extension=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Extension=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Extension=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Extension=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00870; TAG: N1256; NAME: Obsolete Codes - CS Lymph Nodes (CS)
public boolean naaccr00870(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "4 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csLymphNodes)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("4", table) == 0 && functions.GEN_STRCMP(untrimmedline.csLymphNodes, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csLymphNodes, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && dx_year > 2009)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Lymph Nodes=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Lymph Nodes=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Lymph Nodes=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Lymph Nodes=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00871; TAG: N1260; NAME: Obsolete Codes - CS Lymph Nodes Eval (CS)
public boolean naaccr00871(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csLymphNodesEval))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "5 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csLymphNodesEval)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("5", table) == 0 && functions.GEN_STRCMP(untrimmedline.csLymphNodesEval, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csLymphNodesEval, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && dx_year > 2009)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00872; TAG: N1261; NAME: Obsolete Codes - CS Mets Eval (CS)
public boolean naaccr00872(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csMetsEval))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "9 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csMetsEval)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("9", table) == 0 && functions.GEN_STRCMP(untrimmedline.csMetsEval, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csMetsEval, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Mets Eval=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Mets Eval=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Mets Eval=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Mets Eval=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Mets Eval=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Mets Eval=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Mets Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Mets Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Mets Eval=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Mets Eval=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00873; TAG: N1257; NAME: Obsolete Codes - CS Mets at DX (CS)
public boolean naaccr00873(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "8 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csMetsAtDx)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("8", table) == 0 && functions.GEN_STRCMP(untrimmedline.csMetsAtDx, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csMetsAtDx, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Mets at DX=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Mets at DX=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Mets at DX=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Mets at DX=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Mets at DX=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Mets at DX=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Mets at DX=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Mets at DX=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Mets at DX=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Mets at DX=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00874; TAG: N1262; NAME: Obsolete Codes - CS Site-Specific Factor 1 (CS)
public boolean naaccr00874(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor1))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "10")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor1)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("10", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor1, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor1, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00875; TAG: N1263; NAME: Obsolete Codes - CS Site-Specific Factor 2 (CS)
public boolean naaccr00875(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor2))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "11")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor2)
if (functions.GEN_INLIST(t_schema_name, "MelanomaIris"))
return true
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("11", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor2, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor2, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00876; TAG: N1264; NAME: Obsolete Codes - CS Site-Specific Factor 3 (CS)
public boolean naaccr00876(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor3))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "12")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor3)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("12", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor3, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor3, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 3=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 3=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 3=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor 3=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00877; TAG: N1265; NAME: Obsolete Codes - CS Site-Specific Factor 4 (CS)
public boolean naaccr00877(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor4))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "13")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor4)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("13", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor4, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor4, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 4=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 4=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 4=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor 4=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00878; TAG: N1266; NAME: Obsolete Codes - CS Site-Specific Factor 5 (CS)
public boolean naaccr00878(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor5))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "14")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor5)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("14", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor5, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor5, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 5=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 5=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 5=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor 5=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00879; TAG: N1267; NAME: Obsolete Codes - CS Site-Specific Factor 6 (CS)
public boolean naaccr00879(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor6))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "15")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor6)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("15", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor6, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor6, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 6=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 6=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 6=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor 6=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00880; TAG: N1408; NAME: Obsolete Codes - CS Site-Specific Factor 7 (CS)
public boolean naaccr00880(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor7))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "16")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor7)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("16", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor7, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor7, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 7=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 7=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 7=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor 7=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00881; TAG: N1409; NAME: Obsolete Codes - CS Site-Specific Factor 8 (CS)
public boolean naaccr00881(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor8))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "17")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor8)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("17", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor8, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor8, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 8=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 8=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 8=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor 8=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00882; TAG: N1410; NAME: Obsolete Codes - CS Site-Specific Factor 9 (CS)
public boolean naaccr00882(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor9))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "18")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor9)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("18", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor9, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor9, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 9=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 9=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 9=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor 9=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00883; TAG: N1411; NAME: Obsolete Codes - CS Site-Specific Factor10 (CS)
public boolean naaccr00883(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor10))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "19")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor10)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("19", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor10, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor10, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor10=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor10=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor10=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor10=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00884; TAG: N1412; NAME: Obsolete Codes - CS Site-Specific Factor11 (CS)
public boolean naaccr00884(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code = new char[100], descr = new char[100], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor11))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "20")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor11)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("20", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor11, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor11, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor11=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor11=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
if (!functions.GEN_INLIST(t_schema_name, "Testis")) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor11=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor11=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00885; TAG: N1413; NAME: Obsolete Codes - CS Site-Specific Factor12 (CS)
public boolean naaccr00885(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code = new char[100], descr = new char[100], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor12))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "21")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor12)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("21", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor12, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor12, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor12=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor12=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor12=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor12=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00886; TAG: N1414; NAME: Obsolete Codes - CS Site-Specific Factor13 (CS)
public boolean naaccr00886(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code = new char[100], descr = new char[100], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor13))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "22")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor13)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("22", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor13, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor13, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor13=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor13=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor13=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor13=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00887; TAG: N1415; NAME: Obsolete Codes - CS Site-Specific Factor15 (CS)
public boolean naaccr00887(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code = new char[100], descr = new char[100], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor15))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "24")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor15)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("24", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor15, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor15, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00888; TAG: N1416; NAME: Obsolete Codes - CS Site-Specific Factor19 (CS)
public boolean naaccr00888(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code = new char[100], descr = new char[100], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor19))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "28")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor19)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("28", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor19, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor19, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor19=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor19=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor19=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor19=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00889; TAG: N1417; NAME: Obsolete Codes - CS Site-Specific Factor21 (CS)
public boolean naaccr00889(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor21))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "30")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor21)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("30", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor21, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor21, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor21=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor21=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor21=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor21=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00890; TAG: N1418; NAME: Obsolete Codes - CS Site-Specific Factor22 (CS)
public boolean naaccr00890(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor22))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "31")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor22)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("31", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor22, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor22, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor22=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor22=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor22=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor22=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00891; TAG: N1419; NAME: Obsolete Codes - CS Site-Specific Factor23 (CS)
public boolean naaccr00891(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor23))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "32")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor23)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("32", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor23, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor23, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor23=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor23=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor23=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor23=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00892; TAG: N1268; NAME: Obsolete Codes - CS Site-Specific Factor25 (CS)
public boolean naaccr00892(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor25))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "34")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor25)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("34", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor25, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor25, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00893; TAG: N1258; NAME: Obsolete Codes - CS Tumor Size (CS)
public boolean naaccr00893(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csTumorSize))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name) /*
StrCpy(t_sch_code, t_schema_name,-27);
StrCat(t_sch_code, "CS Tumor Size ");
StrCat (t_sch_code, #S"CS Tumor Size");
*/
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "1 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csTumorSize)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("1", table) == 0 && functions.GEN_STRCMP(untrimmedline.csTumorSize, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csTumorSize, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Tumor Size=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Tumor Size=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Tumor Size=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Tumor Size=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Tumor Size=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Tumor Size=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Tumor Size=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Tumor Size=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Tumor Size=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Tumor Size=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00894; TAG: N1259; NAME: Obsolete Codes - CS Tumor Size/Ext Eval (CS)
public boolean naaccr00894(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = 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
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csTumorSizeExtEval))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
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')
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) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name) /*
StrCpy(t_sch_code, t_schema_name,-27);
StrCat(t_sch_code, "CS Tumor Size/Ext Eval ");
StrCat (t_sch_code, #S"CS Tumor Size/Ext Eval");
*/
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "3 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csTumorSizeExtEval)
if (functions.GEN_RLOOKUP(t_index1, context.NAACCR_CS_OBS, context.NAACCR_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("3", table) == 0 && functions.GEN_STRCMP(untrimmedline.csTumorSizeExtEval, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csTumorSizeExtEval, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "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 functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
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, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NAACCR-00895; TAG: N1966; NAME: Obsolete Histology ICDO3, Date of DX (SEER)
public boolean naaccr00895(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] GROUP = new char[2], OBSYEAR = new char[5], HISTOBS = new char[5], HISTUSE = new char[5]
int dx_year
char[] compare_year = new char[10]
char[] message = new char[100]
char[] histo = new char[40]
char[] code = new char[7]
functions.GEN_NOOP()
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)) {
return true
}
functions.GEN_STRCPY(histo, "8444 8462 8463 8473 8965 ")
functions.GEN_STRCPY(code, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCAT(code, " ")
if (dx_year >= 2021) {
if (functions.GEN_AT(code, histo, 5) != 0)
functions.GEN_SAVE_TEXT(binding, 'Check ICD-O-3.2 and Solid Tumor Rules for reportability and histology coding.')
}
if (!functions.GEN_SQLLOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_OBSHISTO, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_OBSHISTO_HISTOBS, untrimmedline.histologicTypeIcdO3, ['GROUP':GROUP, 'OBSYEAR':OBSYEAR, 'HISTUSE':HISTUSE, 'HISTOBS':HISTOBS]))
return true
if (functions.GEN_SQLLOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_OBSHISTO, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_OBSHISTO_HISTOBS, untrimmedline.histologicTypeIcdO3, ['GROUP':GROUP, 'OBSYEAR':OBSYEAR, 'HISTUSE':HISTUSE, 'HISTOBS':HISTOBS])) {
functions.GEN_STRCPY(compare_year, OBSYEAR)
if (dx_year >= functions.GEN_VAL(compare_year)) {
functions.GEN_STRCPY(message, HISTUSE)
functions.GEN_STRCAT(message, " replaces ")
functions.GEN_STRCAT(message, HISTOBS)
functions.GEN_STRCAT(message, " for diagnosis year")
if (functions.GEN_AT(GROUP, "1") != 0)
functions.GEN_SAVE_TEXT(binding, message)
else {
if (functions.GEN_AT(GROUP, "2") != 0)
return false
}
}
}
return true
}
// ID: NAACCR-00896; TAG: N0167; NAME: Occupation Source (NPCR)
public boolean naaccr00896(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_INLIST(untrimmedline.occupationSource, "0-3,7-9", "(\\d)") || functions.GEN_EMPTY(untrimmedline.occupationSource)
}
// ID: NAACCR-00897; TAG: N0870; NAME: Over-ride Misuse (NAACCR)
public boolean naaccr00897(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int total
total = 0
if (!functions.GEN_EMPTY(untrimmedline.overRideSiteType))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideHistology))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideAgeSiteMorph))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSeqnoDxconf))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSiteLatSeqno))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSurgDxconf))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideReportSource))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideIllDefineSite))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideLeukLymphoma))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSiteBehavior))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSiteEodDxDt))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSiteLatEod))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSiteLatMorph))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSsNodespos))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSsTnmN))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSsTnmM))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideAcsnClassSeq))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideHospseqDxconf))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideCocSiteType))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideHospseqSite))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideSiteTnmStggrp))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideTnmStage))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideTnmTis))
total = total + 1
if (!functions.GEN_EMPTY(untrimmedline.overRideNameSex))
total = total + 1
if (total > 6)
return true
else
return true
return true
}
// ID: NAACCR-00898; TAG: N0714; NAME: PIN III ICDO3, Date of Diagnosis (SEER IF110)
public boolean naaccr00898(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_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 > 2000) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C619") && functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8148") && functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2"))
return false
}
return true
}
// ID: NAACCR-00899; TAG: N1162; NAME: Path Date Spec Collect 1 (NAACCR)
public boolean naaccr00899(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_pathspec = new char[15], t_date = new char[9]
if (functions.GEN_EMPTY(untrimmedline.pathDateSpecCollect1))
return true
functions.GEN_STRCPY(t_pathspec, untrimmedline.pathDateSpecCollect1)
functions.GEN_STRCPY(t_date, functions.GEN_SUBSTR(t_pathspec, 1, 8))
if (functions.GEN_VALID_DATE_IOP(binding, t_date))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date error: %DC')
return false
}
return true
}
// ID: NAACCR-00900; TAG: N1167; NAME: Path Date Spec Collect 2 (NAACCR)
public boolean naaccr00900(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_pathspec = new char[15], t_date = new char[9]
if (functions.GEN_EMPTY(untrimmedline.pathDateSpecCollect2))
return true
functions.GEN_STRCPY(t_pathspec, untrimmedline.pathDateSpecCollect2)
functions.GEN_STRCPY(t_date, functions.GEN_SUBSTR(t_pathspec, 1, 8))
if (functions.GEN_VALID_DATE_IOP(binding, t_date))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date error: %DC')
return false
}
return true
}
// ID: NAACCR-00901; TAG: N1168; NAME: Path Date Spec Collect 3 (NAACCR)
public boolean naaccr00901(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_pathspec = new char[15], t_date = new char[9]
if (functions.GEN_EMPTY(untrimmedline.pathDateSpecCollect3))
return true
functions.GEN_STRCPY(t_pathspec, untrimmedline.pathDateSpecCollect3)
functions.GEN_STRCPY(t_date, functions.GEN_SUBSTR(t_pathspec, 1, 8))
if (functions.GEN_VALID_DATE_IOP(binding, t_date))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date error: %DC')
return false
}
return true
}
// ID: NAACCR-00902; TAG: N1169; NAME: Path Date Spec Collect 4 (NAACCR)
public boolean naaccr00902(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_pathspec = new char[15], t_date = new char[9]
if (functions.GEN_EMPTY(untrimmedline.pathDateSpecCollect4))
return true
functions.GEN_STRCPY(t_pathspec, untrimmedline.pathDateSpecCollect4)
functions.GEN_STRCPY(t_date, functions.GEN_SUBSTR(t_pathspec, 1, 8))
if (functions.GEN_VALID_DATE_IOP(binding, t_date))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date error: %DC')
return false
}
return true
}
// ID: NAACCR-00903; TAG: N1170; NAME: Path Date Spec Collect 5 (NAACCR)
public boolean naaccr00903(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_pathspec = new char[15], t_date = new char[9]
if (functions.GEN_EMPTY(untrimmedline.pathDateSpecCollect5))
return true
functions.GEN_STRCPY(t_pathspec, untrimmedline.pathDateSpecCollect5)
functions.GEN_STRCPY(t_date, functions.GEN_SUBSTR(t_pathspec, 1, 8))
if (functions.GEN_VALID_DATE_IOP(binding, t_date))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date error: %DC')
return false
}
return true
}
// ID: NAACCR-00904; TAG: N1157; NAME: Path Order Phys Lic No 1 (NAACCR)
public boolean naaccr00904(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathOrderPhysLicNo1))
return true
return functions.GEN_MATCH(untrimmedline.pathOrderPhysLicNo1, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00905; TAG: N1158; NAME: Path Order Phys Lic No 2 (NAACCR)
public boolean naaccr00905(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathOrderPhysLicNo2))
return true
return functions.GEN_MATCH(untrimmedline.pathOrderPhysLicNo2, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00906; TAG: N1159; NAME: Path Order Phys Lic No 3 (NAACCR)
public boolean naaccr00906(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathOrderPhysLicNo3))
return true
return functions.GEN_MATCH(untrimmedline.pathOrderPhysLicNo3, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00907; TAG: N1160; NAME: Path Order Phys Lic No 4 (NAACCR)
public boolean naaccr00907(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathOrderPhysLicNo4))
return true
return functions.GEN_MATCH(untrimmedline.pathOrderPhysLicNo4, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00908; TAG: N1161; NAME: Path Order Phys Lic No 5 (NAACCR)
public boolean naaccr00908(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathOrderPhysLicNo5))
return true
return functions.GEN_MATCH(untrimmedline.pathOrderPhysLicNo5, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00909; TAG: N1147; NAME: Path Ordering Fac No 1 (NAACCR)
public boolean naaccr00909(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathOrderingFacNo1))
return true
return functions.GEN_MATCH(untrimmedline.pathOrderingFacNo1, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00910; TAG: N1148; NAME: Path Ordering Fac No 2 (NAACCR)
public boolean naaccr00910(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathOrderingFacNo2))
return true
return functions.GEN_MATCH(untrimmedline.pathOrderingFacNo2, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00911; TAG: N1149; NAME: Path Ordering Fac No 3 (NAACCR)
public boolean naaccr00911(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathOrderingFacNo3))
return true
return functions.GEN_MATCH(untrimmedline.pathOrderingFacNo3, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00912; TAG: N1150; NAME: Path Ordering Fac No 4 (NAACCR)
public boolean naaccr00912(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathOrderingFacNo4))
return true
return functions.GEN_MATCH(untrimmedline.pathOrderingFacNo4, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00913; TAG: N1151; NAME: Path Ordering Fac No 5 (NAACCR)
public boolean naaccr00913(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathOrderingFacNo5))
return true
return functions.GEN_MATCH(untrimmedline.pathOrderingFacNo5, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00914; TAG: N1152; NAME: Path Report Number 1 (NAACCR)
public boolean naaccr00914(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportNumber1))
return true
return functions.GEN_MATCH(untrimmedline.pathReportNumber1, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00915; TAG: N1153; NAME: Path Report Number 2 (NAACCR)
public boolean naaccr00915(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportNumber2))
return true
return functions.GEN_MATCH(untrimmedline.pathReportNumber2, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00916; TAG: N1154; NAME: Path Report Number 3 (NAACCR)
public boolean naaccr00916(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportNumber3))
return true
return functions.GEN_MATCH(untrimmedline.pathReportNumber3, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00917; TAG: N1155; NAME: Path Report Number 4 (NAACCR)
public boolean naaccr00917(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportNumber4))
return true
return functions.GEN_MATCH(untrimmedline.pathReportNumber4, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00918; TAG: N1156; NAME: Path Report Number 5 (NAACCR)
public boolean naaccr00918(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportNumber5))
return true
return functions.GEN_MATCH(untrimmedline.pathReportNumber5, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00919; TAG: N1137; NAME: Path Report Type 1 (NAACCR)
public boolean naaccr00919(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportType1))
return true
return functions.GEN_INLIST(untrimmedline.pathReportType1, "01-11,98,99", "(\\d\\d)")
}
// ID: NAACCR-00920; TAG: N1138; NAME: Path Report Type 2 (NAACCR)
public boolean naaccr00920(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportType2))
return true
return functions.GEN_INLIST(untrimmedline.pathReportType2, "01-11,98,99", "(\\d\\d)")
}
// ID: NAACCR-00921; TAG: N1139; NAME: Path Report Type 3 (NAACCR)
public boolean naaccr00921(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportType3))
return true
return functions.GEN_INLIST(untrimmedline.pathReportType3, "01-11,98,99", "(\\d\\d)")
}
// ID: NAACCR-00922; TAG: N1140; NAME: Path Report Type 4 (NAACCR)
public boolean naaccr00922(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportType4))
return true
return functions.GEN_INLIST(untrimmedline.pathReportType4, "01-11,98,99", "(\\d\\d)")
}
// ID: NAACCR-00923; TAG: N1141; NAME: Path Report Type 5 (NAACCR)
public boolean naaccr00923(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportType5))
return true
return functions.GEN_INLIST(untrimmedline.pathReportType5, "01-11,98,99", "(\\d\\d)")
}
// ID: NAACCR-00924; TAG: N1142; NAME: Path Reporting Fac ID 1 (NAACCR)
public boolean naaccr00924(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportingFacId1))
return true
return functions.GEN_MATCH(untrimmedline.pathReportingFacId1, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00925; TAG: N1143; NAME: Path Reporting Fac ID 2 (NAACCR)
public boolean naaccr00925(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportingFacId2))
return true
return functions.GEN_MATCH(untrimmedline.pathReportingFacId2, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00926; TAG: N1144; NAME: Path Reporting Fac ID 3 (NAACCR)
public boolean naaccr00926(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportingFacId3))
return true
return functions.GEN_MATCH(untrimmedline.pathReportingFacId3, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00927; TAG: N1145; NAME: Path Reporting Fac ID 4 (NAACCR)
public boolean naaccr00927(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportingFacId4))
return true
return functions.GEN_MATCH(untrimmedline.pathReportingFacId4, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00928; TAG: N1146; NAME: Path Reporting Fac ID 5 (NAACCR)
public boolean naaccr00928(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.pathReportingFacId5))
return true
return functions.GEN_MATCH(untrimmedline.pathReportingFacId5, "([^ \\t\\r\\n\\v\\f]((.))*)")
}
// ID: NAACCR-00929; TAG: N0058; NAME: Patient ID Number (SEER CASENUM)
public boolean naaccr00929(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_MATCH(untrimmedline.patientIdNumber, "(\\d\\d\\d\\d\\d\\d\\d\\d)") && functions.GEN_VAL(untrimmedline.patientIdNumber) > 0)
return true
else
return false
return true
}
// ID: NAACCR-00930; TAG: N0756; NAME: Patient System ID-Hosp (NAACCR)
public boolean naaccr00930(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.patientSystemIdHosp))
return true
if (functions.GEN_MATCH(untrimmedline.patientSystemIdHosp, "(\\d\\d\\d\\d\\d\\d\\d\\d)") && functions.GEN_VAL(untrimmedline.patientSystemIdHosp) > 0)
return true
else
return false
return true
}
// ID: NAACCR-00931; TAG: N0210; NAME: Physician 3 (COC)
public boolean naaccr00931(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.physician3))
return true
return functions.GEN_MATCH(untrimmedline.physician3, "([A-Za-z0-9]((\\s)|([A-Za-z0-9]))*)")
}
// ID: NAACCR-00932; TAG: N0211; NAME: Physician 4 (COC)
public boolean naaccr00932(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.physician4))
return true
return functions.GEN_MATCH(untrimmedline.physician4, "([A-Za-z0-9]((\\s)|([A-Za-z0-9]))*)")
}
// ID: NAACCR-00933; TAG: N0153; NAME: Physician--Follow-Up (COC)
public boolean naaccr00933(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.physicianFollowUp))
return true
return functions.GEN_MATCH(untrimmedline.physicianFollowUp, "([A-Za-z0-9]((\\s)|([A-Za-z0-9]))*)")
}
// ID: NAACCR-00934; TAG: N0381; NAME: Physician--Follow-Up, Date of Diagnosis (COC)
public boolean naaccr00934(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_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 > 1995) {
if (functions.GEN_EMPTY(untrimmedline.physicianFollowUp))
return false
}
return true
}
// ID: NAACCR-00935; TAG: N0154; NAME: Physician--Primary Surg (COC)
public boolean naaccr00935(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.physicianPrimarySurg))
return true
return functions.GEN_MATCH(untrimmedline.physicianPrimarySurg, "([A-Za-z0-9]((\\s)|([A-Za-z0-9]))*)")
}
// ID: NAACCR-00936; TAG: N0382; NAME: Physician--Primary Surg, Date of Diagnosis (COC)
public boolean naaccr00936(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_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 > 1995) {
if (functions.GEN_EMPTY(untrimmedline.physicianPrimarySurg))
return false
}
return true
}
// ID: NAACCR-00937; TAG: N0241; NAME: Place of Death (NAACCR)
public boolean naaccr00937(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.placeOfDeath))
return true
return functions.GEN_ILOOKUP(untrimmedline.placeOfDeath, context.NAACCR_DPLACE, context.NAACCR_DPLACE_CODE, [:])
}
// ID: NAACCR-00938; TAG: N1675; NAME: Place of Death--Geocode, Country, State (NAACCR)
public boolean naaccr00938(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] dplace_cntry_state = new char[9]
if (functions.GEN_EMPTY(untrimmedline.placeOfDeath) || functions.GEN_EMPTY(untrimmedline.placeOfDeathCountry) || functions.GEN_EMPTY(untrimmedline.placeOfDeathState))
return true
functions.GEN_STRCPY(dplace_cntry_state, untrimmedline.placeOfDeath)
functions.GEN_STRCAT(dplace_cntry_state, untrimmedline.placeOfDeathCountry)
functions.GEN_STRCAT(dplace_cntry_state, untrimmedline.placeOfDeathState)
if (!functions.GEN_LOOKUP(dplace_cntry_state, context.NAACCR_CNTRY_ST, context.NAACCR_CNTRY_ST_GEOCNTRYST, [:]))
return false
return true
}
// ID: NAACCR-00939; TAG: N0242; NAME: Place of Death, Vital Status (NAACCR)
public boolean naaccr00939(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_MATCH(untrimmedline.placeOfDeath, "(997)")) {
if (functions.GEN_INLIST(untrimmedline.vitalStatus, "0"))
return false
}
else {
if (functions.GEN_INLIST(untrimmedline.vitalStatus, "1"))
return false
}
return true
}
// ID: NAACCR-00940; TAG: N1670; NAME: Place of Death--Country (NAACCR)
public boolean naaccr00940(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.placeOfDeathCountry))
return true
if (!functions.GEN_LOOKUP(untrimmedline.placeOfDeathCountry, context.NAACCR_CNTRY_ST, context.NAACCR_CNTRY_ST_COUNTRY, [:]))
return false
return true
}
// ID: NAACCR-00941; TAG: N1761; NAME: Place of Death--Country, Date of Diagnosis (NAACCR)
public boolean naaccr00941(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_EMPTY))
return true
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.placeOfDeathCountry))
return true
if (dx_year > 2012) {
if (functions.GEN_INLIST(untrimmedline.placeOfDeathCountry, "XNI,XCB,XEN,XSC,XGR,XYG,XUM"))
return false
if (functions.GEN_INLIST(untrimmedline.placeOfDeathCountry, "XNF,XSD,XWF,XSF,XEF,XIF,XET,XAP,XIS"))
return false
if (functions.GEN_INLIST(untrimmedline.placeOfDeathCountry, "XCR,XOR,XSE,XMS,XCH,XML,XMC,XPL"))
return false
}
return true
}
// ID: NAACCR-00942; TAG: N1903; NAME: Place of Death--Country, Place of Death--State (NAACCR)
public boolean naaccr00942(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] cntry_state = new char[6]
if (functions.GEN_EMPTY(untrimmedline.placeOfDeathCountry) || functions.GEN_EMPTY(untrimmedline.placeOfDeathState))
return true
if (functions.GEN_INLIST(untrimmedline.placeOfDeathState, "XX") && functions.GEN_INLIST(untrimmedline.placeOfDeathCountry, "ZZX"))
return false
functions.GEN_STRCPY(cntry_state, untrimmedline.placeOfDeathCountry)
functions.GEN_STRCAT(cntry_state, untrimmedline.placeOfDeathState)
if (!functions.GEN_LOOKUP(cntry_state, context.NAACCR_CNTRY_ST, context.NAACCR_CNTRY_ST_CNTRY_ST, [:]))
return false
return true
}
// ID: NAACCR-00943; TAG: N1702; NAME: Place of Death--Country, Vital Status (NPCR)
public boolean naaccr00943(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (!functions.GEN_EMPTY(untrimmedline.placeOfDeathCountry)) {
if (!functions.GEN_INLIST(untrimmedline.vitalStatus, "0"))
return false
}
return true
}
// ID: NAACCR-00944; TAG: N1674; NAME: Place of Death--State (NAACCR)
public boolean naaccr00944(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.placeOfDeathState))
return true
if (!functions.GEN_LOOKUP(untrimmedline.placeOfDeathState, context.NAACCR_CNTRY_ST, context.NAACCR_CNTRY_ST_STATE, [:]))
return false
return true
}
// ID: NAACCR-00945; TAG: N1760; NAME: Place of Death--State, Date of Diagnosis (NAACCR)
public boolean naaccr00945(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_EMPTY))
return true
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.placeOfDeathState))
return true
if (dx_year > 2012) {
if (functions.GEN_INLIST(untrimmedline.placeOfDeathState, "NN,MM,PP,XN"))
return false
}
return true
}
// ID: NAACCR-00946; TAG: N1701; NAME: Place of Death--State, Vital Status (NPCR)
public boolean naaccr00946(Binding binding, Map