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.NaaccrTranslatedCompiledRules3.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 NaaccrTranslatedCompiledRules3 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-00565' <= id && id <= 'NAACCR-00862'
}
// ID: NAACCR-00565; TAG: N1471; NAME: Comorbid/Complication 2, Date DX (COC)
public boolean naaccr00565(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.comorbidComplication2))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication2, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication2, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication2, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication2, context.NAACCR_ICD9CM, context.NAACCR_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: NAACCR-00566; TAG: N1473; NAME: Comorbid/Complication 3, Date DX (COC)
public boolean naaccr00566(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.comorbidComplication3))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication3, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication3, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication3, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication3, context.NAACCR_ICD9CM, context.NAACCR_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: NAACCR-00567; TAG: N1474; NAME: Comorbid/Complication 4, Date DX (COC)
public boolean naaccr00567(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.comorbidComplication4))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication4, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication4, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication4, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication4, context.NAACCR_ICD9CM, context.NAACCR_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: NAACCR-00568; TAG: N1475; NAME: Comorbid/Complication 5, Date DX (COC)
public boolean naaccr00568(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.comorbidComplication5))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication5, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication5, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication5, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication5, context.NAACCR_ICD9CM, context.NAACCR_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: NAACCR-00569; TAG: N1476; NAME: Comorbid/Complication 6, Date DX (COC)
public boolean naaccr00569(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.comorbidComplication6))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication6, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication6, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication6, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication6, context.NAACCR_ICD9CM, context.NAACCR_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: NAACCR-00570; TAG: N1477; NAME: Comorbid/Complication 7, Date DX (COC)
public boolean naaccr00570(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.comorbidComplication7))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication7, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication7, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication7, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication7, context.NAACCR_ICD9CM, context.NAACCR_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: NAACCR-00571; TAG: N1478; NAME: Comorbid/Complication 8, Date DX (COC)
public boolean naaccr00571(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.comorbidComplication8))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication8, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication8, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication8, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication8, context.NAACCR_ICD9CM, context.NAACCR_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: NAACCR-00572; TAG: N1479; NAME: Comorbid/Complication 9, Date DX (COC)
public boolean naaccr00572(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.comorbidComplication9))
return true
if (dx_year < 2011) {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication9, "00000,00100-13980,24000-99990", "(\\d\\d\\d\\d\\d)"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication9, "8700-8799,9300-9499", "(E\\d\\d\\d\\d)", 2, 4))
return true
else {
if (functions.GEN_INLIST(untrimmedline.comorbidComplication9, "0720-0739,1000-1590,2220-2310,2540,4400-4589,5041-5049", "(V\\d\\d\\d\\d)", 2, 4))
return true
else
return false
}
}
}
else {
if (!functions.GEN_ILOOKUP(untrimmedline.comorbidComplication9, context.NAACCR_ICD9CM, context.NAACCR_ICD9CM_CODE, [:]))
return false
}
return true
}
// ID: NAACCR-00573; TAG: N0214; NAME: CompEthn, Date of Diag (SEER IF71)
public boolean naaccr00573(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 > 1993) {
if (functions.GEN_EMPTY(untrimmedline.computedEthnicity))
return false
else
return true
}
return true
}
// ID: NAACCR-00574; TAG: N0215; NAME: Computed Ethnicity (SEER COMPETHN)
public boolean naaccr00574(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_INLIST(untrimmedline.computedEthnicity, "0-7") || functions.GEN_EMPTY(untrimmedline.computedEthnicity))
return true
else
return false
return true
}
// ID: NAACCR-00575; TAG: N0216; NAME: Computed Ethnicity Source (SEER ETHNSRC)
public boolean naaccr00575(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_INLIST(untrimmedline.computedEthnicitySource, "0-9") || functions.GEN_EMPTY(untrimmedline.computedEthnicitySource))
return true
else
return false
return true
}
// ID: NAACCR-00576; TAG: N0311; NAME: County (SEER IFCOUNTY)
public boolean naaccr00576(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] reg_county = new char[8]
functions.GEN_STRCPY(reg_county, functions.GEN_SUBSTR(untrimmedline.registryId, 9, 2))
functions.GEN_STRCAT(reg_county, untrimmedline.countyAtDx, 3)
return functions.GEN_ILOOKUP(reg_county, context.NAACCR_SEERCNTY, context.NAACCR_SEERCNTY_SEERCNTY, [:])
}
// ID: NAACCR-00577; TAG: N0151; NAME: County at DX Reported (COC)
public boolean naaccr00577(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.countyAtDx))
return true
return functions.GEN_MATCH(untrimmedline.countyAtDx, "(\\d\\d\\d)")
}
// ID: NAACCR-00578; TAG: N0354; NAME: County at DX Reported (NAACCR)
public boolean naaccr00578(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_MATCH(untrimmedline.countyAtDx, "(\\d\\d\\d)")
}
// ID: NAACCR-00580; TAG: N0368; NAME: County at DX Reported, Addr at DX--State (NAACCR)
public boolean naaccr00580(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] cnty_state = new char[6]
if (functions.GEN_EMPTY(untrimmedline.countyAtDx) || functions.GEN_EMPTY(untrimmedline.addrAtDxState))
return true
if (functions.GEN_INLIST(untrimmedline.addrAtDxState, "CD,US,XX,YY,ZZ"))
return true
if (functions.GEN_INLIST(untrimmedline.addrAtDxState, "AB,BC,MB,NB,NL,NT,NS,NU,ON,PE,QC,SK,YT"))
return true
if (functions.GEN_INLIST(untrimmedline.addrAtDxState, "AA,AE,AP"))
return true
functions.GEN_STRCPY(cnty_state, untrimmedline.countyAtDx)
functions.GEN_STRCAT(cnty_state, untrimmedline.addrAtDxState)
if (functions.GEN_LOOKUP(cnty_state, context.NAACCR_CNTYALL, context.NAACCR_CNTYALL_CNTYSTAT, [:]))
return true
return false
}
// ID: NAACCR-00581; TAG: N0343; NAME: County at DX Reported, Date of Diagnosis (COC)
public boolean naaccr00581(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 (dx_year > 1995) {
if (functions.GEN_EMPTY(untrimmedline.countyAtDx))
return false
}
return true
}
// ID: NAACCR-00582; TAG: N0237; NAME: DC State File Number, Vital Status (NAACCR)
public boolean naaccr00582(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_INLIST(untrimmedline.vitalStatus, "1")) {
if (functions.GEN_EMPTY(untrimmedline.dcStateFileNumber))
return true
else
return false
}
return true
}
// ID: NAACCR-00583; TAG: N0157; NAME: Date 1st Crs RX COC (COC)
public boolean naaccr00583(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.date1stCrsRxCoc))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.date1stCrsRxCoc))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of 1st Crs RX--COC: %DC')
return false
}
return true
}
// ID: NAACCR-00584; TAG: N1095; NAME: Date 1st Crs RX COC, Date Flag (NAACCR)
public boolean naaccr00584(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.date1stCrsRxCoc)) {
if (!functions.GEN_INLIST(untrimmedline.date1stCrsRxCocFlag, "10,11,12"))
return functions.GEN_ERROR_MSG(binding, 'If Date 1st Crs RX COC is blank, corresponding Date 1st Crs RX COC Flag must = 10, 11, or 12')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.date1stCrsRxCocFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00585; TAG: N1079; NAME: Date 1st Crs RX COC Flag (NAACCR)
public boolean naaccr00585(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.date1stCrsRxCocFlag))
return true
if (functions.GEN_INLIST(untrimmedline.date1stCrsRxCocFlag, "10,11,12"))
return true
else
return false
return true
}
// ID: NAACCR-00586; TAG: N1096; NAME: Date 1st Crs RX COC, Date Flag (NPCR)
public boolean naaccr00586(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.date1stCrsRxCoc) && functions.GEN_EMPTY(untrimmedline.date1stCrsRxCocFlag))
return true
if (functions.GEN_EMPTY(untrimmedline.date1stCrsRxCoc)) {
if (!functions.GEN_INLIST(untrimmedline.date1stCrsRxCocFlag, "10,11,12"))
return functions.GEN_ERROR_MSG(binding, 'If Date 1st Crs RX COC is blank, Date 1st Crs RX COC Flag must = 10, 11, 12, or blank')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.date1stCrsRxCocFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00587; TAG: N0798; NAME: Date 1st Crs RX COC, Date Initial RX SEER (NPCR)
public boolean naaccr00587(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.date1stCrsRxCoc) && functions.GEN_EMPTY(untrimmedline.date1stCrsRxCocFlag) && functions.GEN_EMPTY(untrimmedline.dateInitialRxSeerFlag) && functions.GEN_EMPTY(untrimmedline.dateInitialRxSeer))
return false
return true
}
// ID: NAACCR-00588; TAG: N0199; NAME: Date 1st Crs RX COC, Date of Diagnosis (COC)
public boolean naaccr00588(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dtcmp
if (functions.GEN_EMPTY(untrimmedline.date1stCrsRxCoc) || functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis))
return true
dtcmp = functions.GEN_DATECMP_IOP(binding, untrimmedline.date1stCrsRxCoc, untrimmedline.dateOfDiagnosis, ((Integer)context.NAACCR_GEN_DT_MIN))
if (dtcmp == ((Integer)context.NAACCR_GEN_DT_ERROR)) {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.date1stCrsRxCoc))
functions.GEN_ERROR_TEXT(binding, 'Date of 1st Crs RX--COC is invalid: %DC')
else {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDiagnosis))
functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis is invalid: %DC')
}
return false
}
else {
if (dtcmp >= 0)
return true
else
return false
}
return true
}
// ID: NAACCR-00589; TAG: N0200; NAME: Date 1st Crs RX COC, Date of Last Contact (COC)
public boolean naaccr00589(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dtcmp
if (functions.GEN_EMPTY(untrimmedline.dateOfLastContact) || functions.GEN_EMPTY(untrimmedline.date1stCrsRxCoc))
return true
dtcmp = functions.GEN_DATECMP_IOP(binding, untrimmedline.dateOfLastContact, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN))
if (dtcmp == ((Integer)context.NAACCR_GEN_DT_ERROR)) {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.date1stCrsRxCoc)) {
functions.GEN_ERROR_TEXT(binding, 'Date of 1st Crs RX--COC is invalid: %DC')
return false
}
else {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfLastContact)) {
functions.GEN_ERROR_TEXT(binding, 'Date of Last Contact is invalid: %DC')
return false
}
}
}
else {
if (dtcmp >= 0)
return true
else
return false
}
return true
}
// ID: NAACCR-00590; TAG: N1348; NAME: Date 1st Crs RX COC, Dates of RX (COC)
public boolean naaccr00590(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int earliest_dt
int dtcmp
if (functions.GEN_EMPTY(untrimmedline.date1stCrsRxCoc))
return true
if (functions.GEN_EMPTY(untrimmedline.rxDateSurgery) && functions.GEN_EMPTY(untrimmedline.rxDateRadiation) && functions.GEN_EMPTY(untrimmedline.rxDateOther) && functions.GEN_EMPTY(untrimmedline.rxDateSystemic)) {
return true
}
if ((!functions.GEN_EMPTY(untrimmedline.date1stCrsRxCoc)) && (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.date1stCrsRxCoc))) {
functions.GEN_ERROR_TEXT(binding, 'Date of 1st Crs RX--COC: %DC')
return false
}
if ((!functions.GEN_EMPTY(untrimmedline.rxDateSurgery)) && (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.rxDateSurgery))) {
functions.GEN_ERROR_TEXT(binding, 'RX Date Surgery: %DC')
return false
}
if ((!functions.GEN_EMPTY(untrimmedline.rxDateRadiation)) && (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.rxDateRadiation))) {
functions.GEN_ERROR_TEXT(binding, 'RX Date Radiation: %DC')
return false
}
if ((!functions.GEN_EMPTY(untrimmedline.rxDateSystemic)) && (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.rxDateSystemic))) {
functions.GEN_ERROR_TEXT(binding, 'RX Date Systemic: %DC')
return false
}
if ((!functions.GEN_EMPTY(untrimmedline.rxDateOther)) && (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.rxDateOther))) {
functions.GEN_ERROR_TEXT(binding, 'RX Date Other: %DC')
return false
}
if (functions.GEN_VAL(untrimmedline.rxDateSurgery) == functions.GEN_VAL(untrimmedline.date1stCrsRxCoc) || functions.GEN_VAL(untrimmedline.rxDateRadiation) == functions.GEN_VAL(untrimmedline.date1stCrsRxCoc) || functions.GEN_VAL(untrimmedline.rxDateSystemic) == functions.GEN_VAL(untrimmedline.date1stCrsRxCoc) || functions.GEN_VAL(untrimmedline.rxDateOther) == functions.GEN_VAL(untrimmedline.date1stCrsRxCoc))
functions.GEN_NOOP()
else {
return false
}
if (functions.GEN_DATECMP_IOP(binding, untrimmedline.rxDateSurgery, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN)) < 0 || functions.GEN_DATECMP_IOP(binding, untrimmedline.rxDateRadiation, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN)) < 0 || functions.GEN_DATECMP_IOP(binding, untrimmedline.rxDateSystemic, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN)) < 0 || functions.GEN_DATECMP_IOP(binding, untrimmedline.rxDateOther, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN)) < 0)
return false
return true
}
// ID: NAACCR-00591; TAG: N1811; NAME: Date 1st Crs RX COC, Dates of RX (NAACCR)
public boolean naaccr00591(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_INLIST(untrimmedline.rxSummTransplntEndocr, "10,11,12,20,30,40,82,85,86,87,88"))
return true
int earliest_dt
char[] rx_flag = new char[2]
int dtcmp
if ((functions.GEN_EMPTY(untrimmedline.date1stCrsRxCoc) && functions.GEN_EMPTY(untrimmedline.date1stCrsRxCocFlag)) || (functions.GEN_EMPTY(untrimmedline.rxDateSurgery) && functions.GEN_EMPTY(untrimmedline.rxDateSurgeryFlag)) || (functions.GEN_EMPTY(untrimmedline.rxDateRadiation) && functions.GEN_EMPTY(untrimmedline.rxDateRadiationFlag)) || (functions.GEN_EMPTY(untrimmedline.rxDateOther) && functions.GEN_EMPTY(untrimmedline.rxDateOtherFlag)) || (functions.GEN_EMPTY(untrimmedline.rxDateChemo) && functions.GEN_EMPTY(untrimmedline.rxDateChemoFlag)) || (functions.GEN_EMPTY(untrimmedline.rxDateHormone) && functions.GEN_EMPTY(untrimmedline.rxDateHormoneFlag)) || (functions.GEN_EMPTY(untrimmedline.rxDateBrm) && functions.GEN_EMPTY(untrimmedline.rxDateBrmFlag)))
return true
if (functions.GEN_INLIST(untrimmedline.rxDateSurgeryFlag, "11") && functions.GEN_INLIST(untrimmedline.rxDateRadiationFlag, "11,15") && functions.GEN_INLIST(untrimmedline.rxDateChemoFlag, "11,15") && functions.GEN_INLIST(untrimmedline.rxDateHormoneFlag, "11,15") && functions.GEN_INLIST(untrimmedline.rxDateBrmFlag, "11,15") && functions.GEN_INLIST(untrimmedline.rxDateOtherFlag, "11,15"))
return true
if (functions.GEN_INLIST(untrimmedline.date1stCrsRxCocFlag, "10,12")) {
if (functions.GEN_INLIST(untrimmedline.rxDateSurgeryFlag, "10,12") || functions.GEN_INLIST(untrimmedline.rxDateRadiationFlag, "10,12") || functions.GEN_INLIST(untrimmedline.rxDateChemoFlag, "10,12") || functions.GEN_INLIST(untrimmedline.rxDateHormoneFlag, "10,12") || functions.GEN_INLIST(untrimmedline.rxDateBrmFlag, "10,12") || functions.GEN_INLIST(untrimmedline.rxDateOtherFlag, "10,12"))
return true
else
return functions.GEN_ERROR_TEXT(binding, 'Verify Date 1st Crs RX Flag with all other treatment flags')
}
if (!functions.GEN_INLIST(untrimmedline.rxDateSurgeryFlag, "11") || !functions.GEN_INLIST(untrimmedline.rxDateRadiationFlag, "11") || !functions.GEN_INLIST(untrimmedline.rxDateChemoFlag, "11") || !functions.GEN_INLIST(untrimmedline.rxDateHormoneFlag, "11") || !functions.GEN_INLIST(untrimmedline.rxDateBrmFlag, "11") || !functions.GEN_INLIST(untrimmedline.rxDateOtherFlag, "11")) {
if (functions.GEN_INLIST(untrimmedline.date1stCrsRxCocFlag, "11"))
return functions.GEN_ERROR_TEXT(binding, 'Verify Date 1st Crs RX Flag with all other treatment flags')
}
if (functions.GEN_VAL(untrimmedline.rxDateSurgery) == functions.GEN_VAL(untrimmedline.date1stCrsRxCoc) || functions.GEN_VAL(untrimmedline.rxDateRadiation) == functions.GEN_VAL(untrimmedline.date1stCrsRxCoc) || functions.GEN_VAL(untrimmedline.rxDateBrm) == functions.GEN_VAL(untrimmedline.date1stCrsRxCoc) || functions.GEN_VAL(untrimmedline.rxDateChemo) == functions.GEN_VAL(untrimmedline.date1stCrsRxCoc) || functions.GEN_VAL(untrimmedline.rxDateHormone) == functions.GEN_VAL(untrimmedline.date1stCrsRxCoc) || functions.GEN_VAL(untrimmedline.rxDateOther) == functions.GEN_VAL(untrimmedline.date1stCrsRxCoc))
functions.GEN_NOOP()
else {
return false
}
if (functions.GEN_DATECMP_IOP(binding, untrimmedline.rxDateSurgery, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN)) < 0 || functions.GEN_DATECMP_IOP(binding, untrimmedline.rxDateRadiation, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN)) < 0 || functions.GEN_DATECMP_IOP(binding, untrimmedline.rxDateBrm, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN)) < 0 || functions.GEN_DATECMP_IOP(binding, untrimmedline.rxDateChemo, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN)) < 0 || functions.GEN_DATECMP_IOP(binding, untrimmedline.rxDateHormone, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN)) < 0 || functions.GEN_DATECMP_IOP(binding, untrimmedline.rxDateOther, untrimmedline.date1stCrsRxCoc, ((Integer)context.NAACCR_GEN_DT_MIN)) < 0)
return false
return true
}
// ID: NAACCR-00592; TAG: N0827; NAME: Date Case Completed (NAACCR DATEEDIT)
public boolean naaccr00592(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateCaseCompleted))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateCaseCompleted))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Case Completed: %DC')
return false
}
return true
}
// ID: NAACCR-00593; TAG: N0828; NAME: Date Case Completed, Date of Diagnosis (NAACCR)
public boolean naaccr00593(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dtcmp
if (functions.GEN_EMPTY(untrimmedline.dateCaseCompleted) || functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis))
return true
dtcmp = functions.GEN_DATECMP_IOP(binding, untrimmedline.dateCaseCompleted, untrimmedline.dateOfDiagnosis, ((Integer)context.NAACCR_GEN_DT_MIN))
if (dtcmp == ((Integer)context.NAACCR_GEN_DT_ERROR)) {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateCaseCompleted))
functions.GEN_ERROR_TEXT(binding, 'Date Case Completed is invalid: %DC')
else {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDiagnosis))
functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis is invalid: %DC')
}
return false
}
else {
if (dtcmp >= 0)
return true
else
return false
}
return true
}
// ID: NAACCR-00594; TAG: N1056; NAME: Date Case Completed--CoC (COC)
public boolean naaccr00594(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateCaseCompletedCoc))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateCaseCompletedCoc))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date Case Completed--CoC: %DC')
return false
}
return true
}
// ID: NAACCR-00595; TAG: N1057; NAME: Date Case Completed--CoC, Date of Diagnosis (COC)
public boolean naaccr00595(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_INLIST(untrimmedline.classOfCase, "00-22"))
return true
if (dx_year > 2009) {
if (functions.GEN_EMPTY(untrimmedline.dateCaseCompletedCoc))
return false
}
return true
}
// ID: NAACCR-00596; TAG: N1135; NAME: Date Case Initiated (NAACCR)
public boolean naaccr00596(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateCaseInitiated))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateCaseInitiated))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Case Case Initiated: %DC')
return false
}
return true
}
// ID: NAACCR-00597; TAG: N1136; NAME: Date Case Last Changed (NAACCR)
public boolean naaccr00597(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateCaseLastChanged))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateCaseLastChanged))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date Case Last Changed: %DC')
return false
}
return true
}
// ID: NAACCR-00598; TAG: N0612; NAME: Date Case Report Exported (NAACCR DATEEDIT)
public boolean naaccr00598(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateCaseReportExported))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateCaseReportExported))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date Case Report Exported: %DC')
return false
}
return true
}
// ID: NAACCR-00599; TAG: N0613; NAME: Date Case Report Loaded (NAACCR DATEEDIT)
public boolean naaccr00599(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateCaseReportLoaded))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateCaseReportLoaded))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date Case Report Loaded: %DC')
return false
}
return true
}
// ID: NAACCR-00600; TAG: N0489; NAME: Date Case Report Received (NAACCR DATEEDIT)
public boolean naaccr00600(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateCaseReportReceived))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date Case Report Received: %DC')
return false
}
return true
}
// ID: NAACCR-00601; TAG: N0748; NAME: Date Conclusive DX (SEER)
public boolean naaccr00601(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateConclusiveDx))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateConclusiveDx))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Conclusive DX: %DC')
return false
}
return true
}
// ID: NAACCR-00602; TAG: N1076; NAME: Date Conclusive DX Flag (NAACCR)
public boolean naaccr00602(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateConclusiveDxFlag))
return true
if (functions.GEN_INLIST(untrimmedline.dateConclusiveDxFlag, "10,11,12,15"))
return true
else
return false
return true
}
// ID: NAACCR-00603; TAG: N1132; NAME: Date Conclusive DX, Date Flag (NAACCR)
public boolean naaccr00603(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateConclusiveDx) && functions.GEN_EMPTY(untrimmedline.dateConclusiveDxFlag))
return true
if (functions.GEN_EMPTY(untrimmedline.dateConclusiveDx)) {
if (!functions.GEN_INLIST(untrimmedline.dateConclusiveDxFlag, "10,11,12,15"))
return functions.GEN_ERROR_MSG(binding, 'If date is blank, corresponding flag must = blank, 10, 11, 12, or 15')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateConclusiveDxFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00604; TAG: N1481; NAME: Date Conclusive DX, Date of DX (CCCR)
public boolean naaccr00604(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int days_diff
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 > 2007) && (dx_year < 2013)) {
if (functions.GEN_EMPTY(untrimmedline.dateConclusiveDx) && functions.GEN_EMPTY(untrimmedline.dateConclusiveDxFlag))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis = 2008-2012, then Date Conclusive DX and Date Conclusive DX Flag cannot both be blank')
}
if (dx_year < 2008) {
if (!functions.GEN_EMPTY(untrimmedline.dateConclusiveDx) || !functions.GEN_EMPTY(untrimmedline.dateConclusiveDxFlag))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis < 2008, then Date Conclusive DX and Date Conclusive DX Flag must be blank')
}
if (functions.GEN_EMPTY(untrimmedline.dateConclusiveDx))
return true
days_diff = (functions.GEN_DAYDIFF_IOP(binding, untrimmedline.dateOfDiagnosis, untrimmedline.dateConclusiveDx, ((Integer)context.NAACCR_GEN_DT_MAX)))
if (days_diff == ((Integer)context.NAACCR_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Conclusive DX: %DC')
if (days_diff > 60)
return true
else
return false
return true
}
// ID: NAACCR-00605; TAG: N0883; NAME: Date Conclusive DX, Date of DX (SEER IF164)
public boolean naaccr00605(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int days_diff
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 > 2006) && (dx_year < 2013)) {
if (functions.GEN_EMPTY(untrimmedline.dateConclusiveDx) && functions.GEN_EMPTY(untrimmedline.dateConclusiveDxFlag))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis = 2007-2012, then Date Conclusive DX and Date Conclusive DX Flag cannot both be blank')
}
if (dx_year < 2007) {
if (!functions.GEN_EMPTY(untrimmedline.dateConclusiveDx) || !functions.GEN_EMPTY(untrimmedline.dateConclusiveDxFlag))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis < 2007, then Date Conclusive DX and Date Conclusive DX Flag must be blank')
}
if (functions.GEN_EMPTY(untrimmedline.dateConclusiveDx))
return true
days_diff = (functions.GEN_DAYDIFF_IOP(binding, untrimmedline.dateOfDiagnosis, untrimmedline.dateConclusiveDx, ((Integer)context.NAACCR_GEN_DT_MAX)))
if (days_diff == ((Integer)context.NAACCR_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Conclusive DX: %DC')
if (days_diff > 60)
return true
else
return false
return true
}
// ID: NAACCR-00606; TAG: N0075; NAME: Date Initial RX SEER (NAACCR)
public boolean naaccr00606(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateInitialRxSeer))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateInitialRxSeer))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Initial RX--SEER: %DC')
return false
}
return true
}
// ID: NAACCR-00607; TAG: N1080; NAME: Date Initial RX SEER Flag (NAACCR)
public boolean naaccr00607(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateInitialRxSeerFlag))
return true
if (functions.GEN_INLIST(untrimmedline.dateInitialRxSeerFlag, "10,11,12"))
return true
else
return false
return true
}
// ID: NAACCR-00608; TAG: N0896; NAME: Date Initial RX SEER, Ca Dir RX 2003 (SEER IF180)
public boolean naaccr00608(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int scope_flag
int dx_year
int seer_init_year
scope_flag = 0
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
if (dx_year < 2003 || dx_year >= 2018)
return true
seer_init_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateInitialRxSeer)
if (seer_init_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Initial RX--SEER: %DC')
if (dx_year < 2012) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "10-90") || functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "1-7") || functions.GEN_INLIST(untrimmedline.rxSummSurgOthRegDis, "1-5") || functions.GEN_INLIST(untrimmedline.rxSummRadiation, "1-6") || functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "2-9") || functions.GEN_INLIST(untrimmedline.rxSummBrm, "01") || functions.GEN_INLIST(untrimmedline.rxSummChemo, "01-03") || functions.GEN_INLIST(untrimmedline.rxSummHormone, "01") || functions.GEN_INLIST(untrimmedline.rxSummTransplntEndocr, "10-12,20,30,40") || functions.GEN_INLIST(untrimmedline.rxSummOther, "1,2,3,6")) {
if (functions.GEN_INLIST(untrimmedline.dateInitialRxSeerFlag, "11"))
return false
else
return true
}
}
if (dx_year > 2011) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "10-90") || functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "1,3-7") || (functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "2") && functions.GEN_INLIST(untrimmedline.regionalNodesExamined, "01-98")) || functions.GEN_INLIST(untrimmedline.rxSummSurgOthRegDis, "1-5") || functions.GEN_INLIST(untrimmedline.rxSummRadiation, "1-6") || functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "2-9") || functions.GEN_INLIST(untrimmedline.rxSummBrm, "01") || functions.GEN_INLIST(untrimmedline.rxSummChemo, "01-03") || functions.GEN_INLIST(untrimmedline.rxSummHormone, "01") || functions.GEN_INLIST(untrimmedline.rxSummTransplntEndocr, "10-12,20,30,40") || functions.GEN_INLIST(untrimmedline.rxSummOther, "1,2,3,6")) {
if (functions.GEN_INLIST(untrimmedline.dateInitialRxSeerFlag, "11"))
return false
else
return true
}
}
if ((functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590-9729") && functions.GEN_INLIST(untrimmedline.primarySite, "770-779", "(C\\d\\d\\d)", 2, 3)) || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9750,9760-9764,9800-9820,9826,9831-9920,9931-9964,9980-9989") || functions.GEN_INLIST(untrimmedline.primarySite, "420,421,423,424,700-729,760-768,809", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "9"))
scope_flag = 1
}
else {
if (functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "0"))
scope_flag = 1
else {
if (functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "2") && functions.GEN_INLIST(untrimmedline.regionalNodesExamined, "00,99") && dx_year > 2011) {
scope_flag = 1
}
}
}
if (seer_init_year != ((Integer)context.NAACCR_GEN_DT_EMPTY)) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "00,98") && (scope_flag == 1) && functions.GEN_INLIST(untrimmedline.rxSummSurgOthRegDis, "0") && functions.GEN_INLIST(untrimmedline.rxSummRadiation, "0,7,8") && functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "0") && functions.GEN_INLIST(untrimmedline.rxSummBrm, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummChemo, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummHormone, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummTransplntEndocr, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummOther, "0,7,8"))
return false
}
return true
}
// ID: NAACCR-00609; TAG: N0895; NAME: Date Initial RX SEER, Ca Dir RX 98-02 (SEER IF179)
public boolean naaccr00609(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int scope_flag
int dx_year
int seer_init_year
scope_flag = 0
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if ((dx_year < 1998) || (dx_year > 2002))
return true
if ((dx_year < 2000) && functions.GEN_INLIST(untrimmedline.registryId, "0000001544", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)"))
return true
if (dx_year < 2003) {
if (functions.GEN_INLIST(untrimmedline.registryId, "0000001562", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)"))
return true
}
seer_init_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateInitialRxSeer)
if (seer_init_year == ((Integer)context.NAACCR_GEN_DT_ERROR)) {
return functions.GEN_ERROR_TEXT(binding, 'Date of Initial RX--SEER: %DC')
}
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "10-90") || functions.GEN_INLIST(untrimmedline.rxSummScopeReg9802, "1-8") || functions.GEN_INLIST(untrimmedline.rxSummSurgOth9802, "1-8") || functions.GEN_INLIST(untrimmedline.rxSummRadiation, "1-6") || functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "2-9") || functions.GEN_INLIST(untrimmedline.rxSummBrm, "01") || functions.GEN_INLIST(untrimmedline.rxSummChemo, "01-03") || functions.GEN_INLIST(untrimmedline.rxSummHormone, "01") || functions.GEN_INLIST(untrimmedline.rxSummTransplntEndocr, "10-12,20,30,40") || functions.GEN_INLIST(untrimmedline.rxSummOther, "1,2,3,6")) {
if (functions.GEN_INLIST(untrimmedline.dateInitialRxSeerFlag, "11"))
return false
else
return true
}
if (functions.GEN_INLIST(untrimmedline.primarySite, "770-779", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.rxSummScopeReg9802, "9"))
scope_flag = 1
}
else {
if (functions.GEN_INLIST(untrimmedline.rxSummScopeReg9802, "0")) {
scope_flag = 1
}
}
if (seer_init_year != ((Integer)context.NAACCR_GEN_DT_EMPTY)) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "00") && (scope_flag == 1) && functions.GEN_INLIST(untrimmedline.rxSummSurgOth9802, "0") && functions.GEN_INLIST(untrimmedline.rxSummRadiation, "0,7,8") && functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "0") && functions.GEN_INLIST(untrimmedline.rxSummBrm, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummChemo, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummHormone, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummTransplntEndocr, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummOther, "0,7,8"))
return false
}
return true
}
// ID: NAACCR-00610; TAG: N0894; NAME: Date Initial RX SEER, Ca Dir RX Pre-98 (SEER IF34)
public boolean naaccr00610(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int Surg_Flag, RadCNS_Flag, dx_year, seer_init_year
Surg_Flag = 0
RadCNS_Flag = 0
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
seer_init_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateInitialRxSeer)
if (seer_init_year == ((Integer)context.NAACCR_GEN_DT_ERROR)) {
return functions.GEN_ERROR_TEXT(binding, 'Date of Initial RX--SEER: %DC')
}
if (dx_year >= 1998)
return true
if ((dx_year < 1988) && functions.GEN_INLIST(untrimmedline.registryId, "0000001529", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)"))
return true
if (functions.GEN_INLIST(untrimmedline.registryId, "0000001541,0000001544", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)"))
return true
if ((dx_year < 1988) && (functions.GEN_INLIST(untrimmedline.rxSummSurgeryType, "00") || (functions.GEN_INLIST(untrimmedline.rxSummSurgeryType, "09") && functions.GEN_INLIST(untrimmedline.reasonForNoSurgery, "6,8"))))
Surg_Flag = 1
if ((dx_year > 1987) && (functions.GEN_INLIST(untrimmedline.rxSummSurgeryType, "00-09") && functions.GEN_INLIST(untrimmedline.reasonForNoSurgery, "1-8")))
Surg_Flag = 1
if ((dx_year > 1987) && (functions.GEN_INLIST(untrimmedline.rxSummSurgeryType, "00-09") && functions.GEN_INLIST(untrimmedline.reasonForNoSurgery, "1-8")))
Surg_Flag = 1
if (Surg_Flag == 0) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgeryType, "10-98") || functions.GEN_INLIST(untrimmedline.reasonForNoSurgery, "0"))
Surg_Flag = 2
}
if (functions.GEN_INLIST(untrimmedline.rxSummSurgeryType, "09") && functions.GEN_INLIST(untrimmedline.reasonForNoSurgery, "9"))
Surg_Flag = 3
if ((dx_year > 1987) && (functions.GEN_INLIST(untrimmedline.primarySite, "340-349", "(C\\d\\d\\d)", 2, 3) || functions.GEN_INLIST(untrimmedline.histologyIcdO2, "9800-9941"))) {
if (functions.GEN_INLIST(untrimmedline.rxSummRadToCns, "0,7,8"))
RadCNS_Flag = 1
else {
if (functions.GEN_INLIST(untrimmedline.rxSummRadToCns, "1"))
RadCNS_Flag = 2
else {
if (functions.GEN_INLIST(untrimmedline.rxSummRadToCns, "9")) {
RadCNS_Flag = 3
}
}
}
}
if ((Surg_Flag == 1) && functions.GEN_INLIST(untrimmedline.rxSummRadiation, "0,7,8") && ((RadCNS_Flag == 0) || (RadCNS_Flag == 1)) && functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "0") && functions.GEN_INLIST(untrimmedline.rxSummBrm, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummChemo, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummHormone, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummTransplntEndocr, "00,82,85-88") && functions.GEN_INLIST(untrimmedline.rxSummOther, "0,7,8")) {
if (functions.GEN_INLIST(untrimmedline.dateInitialRxSeerFlag, "11"))
return true
else
return false
}
else {
if ((Surg_Flag == 2) || functions.GEN_INLIST(untrimmedline.rxSummRadiation, "1-6") || (RadCNS_Flag == 2) || functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "2-9") || functions.GEN_INLIST(untrimmedline.rxSummBrm, "01") || functions.GEN_INLIST(untrimmedline.rxSummChemo, "01-03") || functions.GEN_INLIST(untrimmedline.rxSummHormone, "01") || functions.GEN_INLIST(untrimmedline.rxSummTransplntEndocr, "10-12,20,30,40") || functions.GEN_INLIST(untrimmedline.rxSummOther, "1,2,3,6")) {
if (functions.GEN_INLIST(untrimmedline.dateInitialRxSeerFlag, "11"))
return false
else
return true
}
else {
if ((Surg_Flag == 3) || functions.GEN_INLIST(untrimmedline.rxSummRadiation, "9") || (RadCNS_Flag == 3) || functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "0") || functions.GEN_INLIST(untrimmedline.rxSummBrm, "99") || functions.GEN_INLIST(untrimmedline.rxSummChemo, "99") || functions.GEN_INLIST(untrimmedline.rxSummHormone, "99") || functions.GEN_INLIST(untrimmedline.rxSummTransplntEndocr, "99") || functions.GEN_INLIST(untrimmedline.rxSummOther, "9")) {
if (seer_init_year == ((Integer)context.NAACCR_GEN_DT_EMPTY))
return true
else
return false
}
}
}
return true
}
// ID: NAACCR-00611; TAG: N1098; NAME: Date Initial RX SEER, Date Flag. RPTSRC (SEER)
public boolean naaccr00611(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_AT(untrimmedline.typeOfReportingSource, "6") != 0) {
if (!functions.GEN_EMPTY(untrimmedline.dateInitialRxSeer) || functions.GEN_AT(untrimmedline.dateInitialRxSeerFlag, "11") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Conflict among Date Initial RX SEER: ${untrimmedline.dateInitialRxSeer.formatDate()}, Date Initial RX SEER Flag: ${untrimmedline.dateInitialRxSeerFlag}, and Type of Reporting Source: ${untrimmedline.typeOfReportingSource}')
}
if (functions.GEN_AT(untrimmedline.typeOfReportingSource, "7") != 0) {
if (!functions.GEN_EMPTY(untrimmedline.dateInitialRxSeer) || functions.GEN_AT(untrimmedline.dateInitialRxSeerFlag, "10") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Conflict among Date Initial RX SEER: ${untrimmedline.dateInitialRxSeer.formatDate()}, Date Initial RX SEER Flag: ${untrimmedline.dateInitialRxSeerFlag}, and Type of Reporting Source: ${untrimmedline.typeOfReportingSource}')
}
if (functions.GEN_EMPTY(untrimmedline.dateInitialRxSeer)) {
if (!functions.GEN_INLIST(untrimmedline.dateInitialRxSeerFlag, "10,11,12"))
return functions.GEN_ERROR_MSG(binding, 'If Date Initial RX SEER is blank, corresponding Date Initial RX SEER Flag must = 10, 11, or 12')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateInitialRxSeerFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00612; TAG: N1099; NAME: Date Initial RX SEER, Date Flag (NPCR)
public boolean naaccr00612(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateInitialRxSeer) && functions.GEN_EMPTY(untrimmedline.dateInitialRxSeerFlag))
return true
if (functions.GEN_EMPTY(untrimmedline.dateInitialRxSeer)) {
if (!functions.GEN_INLIST(untrimmedline.dateInitialRxSeerFlag, "10,11,12"))
return functions.GEN_ERROR_MSG(binding, 'If Date Initial RX SEER is blank, Date Initial RX SEER Flag must = 10, 11, 12, or blank')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateInitialRxSeerFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00613; TAG: N0096; NAME: Date Initial RX SEER, Date Last Cont (NAACCR IF35)
public boolean naaccr00613(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dtcmp
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (functions.GEN_INLIST(untrimmedline.registryId, "0000001544", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)")) {
if (dx_year < 2000)
return true
}
if (functions.GEN_EMPTY(untrimmedline.dateOfLastContact) || functions.GEN_EMPTY(untrimmedline.dateInitialRxSeer))
return true
dtcmp = functions.GEN_DATECMP_IOP(binding, untrimmedline.dateInitialRxSeer, untrimmedline.dateOfLastContact, ((Integer)context.NAACCR_GEN_DT_MIN))
if (dtcmp == ((Integer)context.NAACCR_GEN_DT_ERROR)) {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateInitialRxSeer)) {
functions.GEN_ERROR_TEXT(binding, 'Date of Initial RX--SEER is invalid: %DC')
return false
}
else {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfLastContact)) {
functions.GEN_ERROR_TEXT(binding, 'Date of Last Contact is invalid: %DC')
return false
}
}
}
else {
if (dtcmp <= 0)
return true
else
return false
}
return true
}
// ID: NAACCR-00614; TAG: N0095; NAME: Date Initial RX SEER, Date of DX (NAACCR IF18)
public boolean naaccr00614(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dtcmp
int dx_year, dx_month, dx_day, seer_year, seer_month, seer_day
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (functions.GEN_INLIST(untrimmedline.registryId, "0000001544", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)")) {
if (dx_year < 2000)
return true
}
if (functions.GEN_EMPTY(untrimmedline.dateInitialRxSeer) || functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis))
return true
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDiagnosis))
return true
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateInitialRxSeer))
return true
dtcmp = functions.GEN_DATECMP_IOP(binding, untrimmedline.dateOfDiagnosis, untrimmedline.dateInitialRxSeer, ((Integer)context.NAACCR_GEN_DT_EXACT))
if (dtcmp <= 0)
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
dx_month = functions.GEN_DATE_MONTH_IOP(binding, untrimmedline.dateOfDiagnosis)
dx_day = functions.GEN_DATE_DAY_IOP(binding, untrimmedline.dateOfDiagnosis)
seer_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateInitialRxSeer)
seer_month = functions.GEN_DATE_MONTH_IOP(binding, untrimmedline.dateInitialRxSeer)
seer_day = functions.GEN_DATE_DAY_IOP(binding, untrimmedline.dateInitialRxSeer)
if (dx_month == ((Integer)context.NAACCR_GEN_DT_MONTH_EMPTY) || seer_month == ((Integer)context.NAACCR_GEN_DT_MONTH_EMPTY)) {
if (dx_year <= seer_year)
return true
else
return false
}
else {
if (dx_day == ((Integer)context.NAACCR_GEN_DT_DAY_EMPTY) || seer_day == ((Integer)context.NAACCR_GEN_DT_DAY_EMPTY)) {
if (dx_year < seer_year)
return true
else {
if (dx_year == seer_year && dx_month <= seer_month)
return true
else
return false
}
}
else
return false
}
return false
}
// ID: NAACCR-00615; TAG: N0614; NAME: Date Tumor Record Availbl (NAACCR DATEEDIT)
public boolean naaccr00615(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateTumorRecordAvailbl))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateTumorRecordAvailbl))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date Tumor Record Availbl: %DC')
return false
}
return true
}
// ID: NAACCR-00616; TAG: N0542; NAME: Date of 1st Contact (COC)
public boolean naaccr00616(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOf1stContact))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOf1stContact))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of 1st Contact: %DC')
return false
}
return true
}
// ID: NAACCR-00617; TAG: N1070; NAME: Date of 1st Contact Flag (NAACCR)
public boolean naaccr00617(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOf1stContactFlag))
return true
if (functions.GEN_INLIST(untrimmedline.dateOf1stContactFlag, "12"))
return true
else
return false
return true
}
// ID: NAACCR-00618; TAG: N1093; NAME: Date of 1st Contact, Date Flag (NAACCR)
public boolean naaccr00618(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOf1stContact)) {
if (!functions.GEN_INLIST(untrimmedline.dateOf1stContactFlag, "12"))
return functions.GEN_ERROR_MSG(binding, 'If date is blank, corresponding flag must = 12, indicating unknown date')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateOf1stContactFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00619; TAG: N1034; NAME: Date of Birth (NAACCR)
public boolean naaccr00619(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfBirth))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfBirth))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Birth: %DC')
return false
}
return true
}
// ID: NAACCR-00620; TAG: N1035; NAME: Date of Birth Flag (NAACCR)
public boolean naaccr00620(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfBirthFlag))
return true
if (functions.GEN_INLIST(untrimmedline.dateOfBirthFlag, "12"))
return true
else
return false
return true
}
// ID: NAACCR-00621; TAG: N1036; NAME: Date of Birth, Date Flag (NAACCR)
public boolean naaccr00621(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfBirth)) {
if (!functions.GEN_INLIST(untrimmedline.dateOfBirthFlag, "12"))
return functions.GEN_ERROR_MSG(binding, 'If date is blank, corresponding flag must = 12, indicating unknown date')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateOfBirthFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00622; TAG: N1048; NAME: Date of Birth, Date of Diagnosis (NAACCR IF47)
public boolean naaccr00622(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int months_diff, err_flag, dtcmp
if (functions.GEN_EMPTY(untrimmedline.dateOfBirth) || functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis))
return true
dtcmp = functions.GEN_DATECMP_IOP(binding, untrimmedline.dateOfBirth, untrimmedline.dateOfDiagnosis, ((Integer)context.NAACCR_GEN_DT_MIN))
if (dtcmp == ((Integer)context.NAACCR_GEN_DT_ERROR)) {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfBirth))
functions.GEN_ERROR_TEXT(binding, 'Date of Birth is invalid: %DC')
else {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDiagnosis))
functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis is invalid: %DC')
}
return false
}
if (dtcmp <= 0)
return true
err_flag = 1
// *** START function call Check_InUtero()
int dx_year_1, birth_year_1
dx_year_1 = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
birth_year_1 = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfBirth)
if (dx_year_1 >= birth_year_1)
months_diff = functions.GEN_MONTHDIFF_IOP(binding, untrimmedline.dateOfDiagnosis, untrimmedline.dateOfBirth, ((Integer)context.NAACCR_GEN_DT_MIN))
else
months_diff = functions.GEN_MONTHDIFF_IOP(binding, untrimmedline.dateOfBirth, untrimmedline.dateOfDiagnosis, ((Integer)context.NAACCR_GEN_DT_MIN))
if (months_diff <= 7) {
if (functions.GEN_INLIST(untrimmedline.overRideAgeSiteMorph, "2,3"))
err_flag = 0
else
functions.GEN_ERROR_TEXT(binding, 'Please Review: Set over-ride to 2 or 3 if case diagnosed in utero')
}
else
functions.GEN_ERROR_TEXT(binding, 'Please Review: Date of Birth cannot be more than 7 months after Diagnosis')
null// *** END function call Check_InUtero()
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-00623; TAG: N1097; NAME: Date of Death Canada, Date Flag (CCCR)
public boolean naaccr00623(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfDeathCanada) && functions.GEN_EMPTY(untrimmedline.dateOfDeathCanadaFlag))
return true
if (functions.GEN_EMPTY(untrimmedline.dateOfDeathCanada)) {
if (!functions.GEN_INLIST(untrimmedline.dateOfDeathCanadaFlag, "10,11,12"))
return functions.GEN_ERROR_MSG(binding, 'If Date of Death--Canada is blank, Date of Death--CanadaFlag must = 10, 11, 12, or blank')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateOfDeathCanadaFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00624; TAG: N0957; NAME: Date of Death--Canada (CCCR)
public boolean naaccr00624(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfDeathCanada))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDeathCanada))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Death--Canada: %DC')
return false
}
return true
}
// ID: NAACCR-00625; TAG: N1028; NAME: Date of Death--Canada, Vital Status (NAACCR)
public boolean naaccr00625(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.vitalStatus))
return true
if (functions.GEN_EMPTY(untrimmedline.dateOfDeathCanada) && functions.GEN_EMPTY(untrimmedline.dateOfDeathCanadaFlag))
return true
if (functions.GEN_INLIST(untrimmedline.vitalStatus, "1")) {
if (functions.GEN_INLIST(untrimmedline.dateOfDeathCanadaFlag, "11"))
return true
else
return false
}
else {
if (functions.GEN_INLIST(untrimmedline.dateOfDeathCanadaFlag, "11"))
return false
else
return true
}
return true
}
// ID: NAACCR-00626; TAG: N1081; NAME: Date of Death--CanadaFlag (NAACCR)
public boolean naaccr00626(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfDeathCanadaFlag))
return true
if (functions.GEN_INLIST(untrimmedline.dateOfDeathCanadaFlag, "10,11,12"))
return true
else
return false
return true
}
// ID: NAACCR-00627; TAG: N0021; NAME: Date of Diagnosis (NAACCR DATEEDIT)
public boolean naaccr00627(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDiagnosis))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
return false
}
return true
}
// ID: NAACCR-00628; TAG: N0968; NAME: Date of Diagnosis Flag (NAACCR)
public boolean naaccr00628(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfDiagnosisFlag))
return true
if (functions.GEN_INLIST(untrimmedline.dateOfDiagnosisFlag, "12"))
return true
else
return false
return true
}
// ID: NAACCR-00629; TAG: N0970; NAME: Date of Diagnosis, Date Flag (NAACCR)
public boolean naaccr00629(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis)) {
if (!functions.GEN_INLIST(untrimmedline.dateOfDiagnosisFlag, "12"))
return functions.GEN_ERROR_MSG(binding, 'If date is blank, corresponding flag must = 12, indicating unknown date')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateOfDiagnosisFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00630; TAG: N2041; NAME: Date of Diagnosis, EOD Coding Sys, EOD (SEER IF33)
public boolean naaccr00630(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int err_flag
err_flag = 0
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 ((functions.GEN_INLIST(untrimmedline.registryId, "0000001544") && (dx_year == 1998 || dx_year == 1999)) && functions.GEN_EMPTY(untrimmedline.codingSystemForEod))
return true
if ((functions.GEN_INLIST(untrimmedline.registryId, "0000001535", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)") && dx_year < 1992))
return true
if (functions.GEN_INLIST(untrimmedline.registryId, "0000001563", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)"))
return true
if ((functions.GEN_INLIST(untrimmedline.registryId, "0000001544", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)") && dx_year < 1998)) {
if (!functions.GEN_EMPTY(untrimmedline.codingSystemForEod))
return false
}
if (functions.GEN_INLIST(untrimmedline.registryId, "0000001561,0000001562", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)")) {
if (!functions.GEN_EMPTY(untrimmedline.codingSystemForEod))
return false
else
return true
}
if (dx_year < 1983) {
if (functions.GEN_INLIST(untrimmedline.codingSystemForEod, "0,1")) {
if (functions.GEN_EMPTY(untrimmedline.eodOld13Digit) && functions.GEN_EMPTY(untrimmedline.eodOld4Digit) && functions.GEN_EMPTY(untrimmedline.extentOfDisease10Dig))
return true
else
return false
}
if (functions.GEN_INLIST(untrimmedline.codingSystemForEod, "2")) {
if (functions.GEN_EMPTY(untrimmedline.eodOld2Digit) && functions.GEN_EMPTY(untrimmedline.eodOld4Digit) && functions.GEN_EMPTY(untrimmedline.extentOfDisease10Dig) && (functions.GEN_MATCH(untrimmedline.eodOld13Digit, "([^ \\t\\r\\n\\v\\f]((\\d)|(\\-)|(&))*((\\s))*)") && functions.GEN_STRLEN(functions.GEN_TRIM(untrimmedline.eodOld13Digit, ((Integer)context.NAACCR_GEN_BOTH))) == 13))
return true
else
return false
}
else
return false
}
if (dx_year < 1988 && !functions.GEN_INLIST(untrimmedline.registryId, "0000001529", "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)")) {
if (functions.GEN_INLIST(untrimmedline.codingSystemForEod, "3")) {
if (functions.GEN_EMPTY(untrimmedline.eodOld2Digit) && functions.GEN_EMPTY(untrimmedline.eodOld13Digit) && functions.GEN_EMPTY(untrimmedline.extentOfDisease10Dig) && functions.GEN_MATCH(untrimmedline.eodOld4Digit, "(\\d\\d\\d\\d)"))
return true
else
return false
}
else
return false
}
if (dx_year < 2004) {
if (functions.GEN_INLIST(untrimmedline.codingSystemForEod, "4")) {
if (functions.GEN_EMPTY(untrimmedline.eodOld2Digit) && functions.GEN_EMPTY(untrimmedline.eodOld13Digit) && functions.GEN_EMPTY(untrimmedline.eodOld4Digit) && (functions.GEN_MATCH(untrimmedline.extentOfDisease10Dig, "(\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d)") || functions.GEN_MATCH(untrimmedline.extentOfDisease10Dig, "(\\d\\d\\d\\d\\d \\d\\d\\d\\d\\d)")))
return true
else
return false
}
else
return false
}
if (dx_year > 2003) {
if (!functions.GEN_EMPTY(untrimmedline.codingSystemForEod)) {
functions.GEN_SAVE_TEXT(binding, 'If DX > 2003, Coding System for EOD must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.eodOld2Digit)) {
functions.GEN_SAVE_TEXT(binding, 'If DX > 2003, EOD--Old 2 Digit must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.eodOld13Digit)) {
functions.GEN_SAVE_TEXT(binding, 'If DX > 2003, EOD--Old 13 Digit must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.eodOld4Digit)) {
functions.GEN_SAVE_TEXT(binding, 'If DX > 2003, EOD--Old 4 Digit must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.eodTumorSize)) {
functions.GEN_SAVE_TEXT(binding, 'If DX > 2003, EOD--Tumor Size must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.eodExtension)) {
functions.GEN_SAVE_TEXT(binding, 'If DX > 2003, EOD--Extension must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.eodLymphNodeInvolv)) {
functions.GEN_SAVE_TEXT(binding, 'If DX > 2003, EOD--Lymph Node Involv must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.eodExtensionProstPath)) {
functions.GEN_SAVE_TEXT(binding, 'If DX > 2003, EOD--Extension Prost Path must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-00631; TAG: N1102; NAME: Date of Inpt Adm (NAACCR)
public boolean naaccr00631(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfInptAdm))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfInptAdm))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Inpatient Adm: %DC')
return false
}
return true
}
// ID: NAACCR-00632; TAG: N1082; NAME: Date of Inpt Adm Flag (NAACCR)
public boolean naaccr00632(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfInptAdmFlag))
return true
if (functions.GEN_INLIST(untrimmedline.dateOfInptAdmFlag, "10,11,12"))
return true
else
return false
return true
}
// ID: NAACCR-00633; TAG: N1100; NAME: Date of Inpt Adm, Date Flag (NAACCR)
public boolean naaccr00633(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfInptAdm) && functions.GEN_EMPTY(untrimmedline.dateOfInptAdmFlag))
return true
if (functions.GEN_EMPTY(untrimmedline.dateOfInptAdm)) {
if (!functions.GEN_INLIST(untrimmedline.dateOfInptAdmFlag, "10,11,12"))
return functions.GEN_ERROR_MSG(binding, 'If Date of Inpt Adm is blank, Date of Inpt Adm Flag must = 10, 11, 12, or blank')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateOfInptAdmFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00634; TAG: N1103; NAME: Date of Inpt Disch (NAACCR)
public boolean naaccr00634(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfInptDisch))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfInptDisch))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Inpatient Disch: %DC')
return false
}
return true
}
// ID: NAACCR-00635; TAG: N1083; NAME: Date of Inpt Disch Flag (NAACCR)
public boolean naaccr00635(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfInptDischFlag))
return true
if (functions.GEN_INLIST(untrimmedline.dateOfInptDischFlag, "10,11,12"))
return true
else
return false
return true
}
// ID: NAACCR-00636; TAG: N1101; NAME: Date of Inpt Disch, Date Flag (NAACCR)
public boolean naaccr00636(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfInptDisch) && functions.GEN_EMPTY(untrimmedline.dateOfInptDischFlag))
return true
if (functions.GEN_EMPTY(untrimmedline.dateOfInptDisch)) {
if (!functions.GEN_INLIST(untrimmedline.dateOfInptDischFlag, "10,11,12"))
return functions.GEN_ERROR_MSG(binding, 'If Date of Inpt Disch is blank, Date of Inpt Disch Flag must = 10, 11, 12, or blank')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateOfInptDischFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00637; TAG: N0022; NAME: Date of Last Contact (NAACCR DATEEDIT)
public boolean naaccr00637(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfLastContact))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfLastContact))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Last Contact: %DC')
return false
}
return true
}
// ID: NAACCR-00638; TAG: N1069; NAME: Date of Last Contact Flag (NAACCR)
public boolean naaccr00638(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfLastContactFlag))
return true
if (functions.GEN_INLIST(untrimmedline.dateOfLastContactFlag, "12"))
return true
else
return false
return true
}
// ID: NAACCR-00639; TAG: N0312; NAME: Date of Last Contact, Cause of Death (SEER IF12)
public boolean naaccr00639(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dolc_year
dolc_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfLastContact)
if (dolc_year == ((Integer)context.NAACCR_GEN_DT_EMPTY))
return true
if (dolc_year == ((Integer)context.NAACCR_GEN_DT_ERROR)) {
return functions.GEN_ERROR_TEXT(binding, 'Date of Last Contact: %DC')
}
if (functions.GEN_INLIST(untrimmedline.causeOfDeath, "0420-0449", "(\\d\\d\\d\\d)")) {
if ((dolc_year <= 1986) || (!functions.GEN_INLIST(untrimmedline.vitalStatus, "0")) || (!functions.GEN_INLIST(untrimmedline.icdRevisionNumber, "9")))
return false
}
if (functions.GEN_AT(untrimmedline.icdRevisionNumber, "1") != 0 && functions.GEN_AT(untrimmedline.vitalStatus, "0") != 0 && functions.GEN_AT(untrimmedline.causeOfDeath, "U070U071U072", 4) != 0) {
if (dolc_year >= 2019)
return true
else
return false
}
return true
}
// ID: NAACCR-00640; TAG: N1094; NAME: Date of Last Contact, Date Flag (NAACCR)
public boolean naaccr00640(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfLastContact)) {
if (!functions.GEN_INLIST(untrimmedline.dateOfLastContactFlag, "12"))
return functions.GEN_ERROR_MSG(binding, 'If date is blank, corresponding flag must = 12, indicating unknown date')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateOfLastContactFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00641; TAG: N0024; NAME: Date of Last Contact, Date of Diag (NAACCR IF19)
public boolean naaccr00641(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dtcmp
int dx_year, dx_month, dx_day, last_year, last_month, last_day
if (functions.GEN_EMPTY(untrimmedline.dateOfLastContact) || functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis))
return true
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDiagnosis))
return true
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfLastContact))
return true
dtcmp = functions.GEN_DATECMP_IOP(binding, untrimmedline.dateOfDiagnosis, untrimmedline.dateOfLastContact, ((Integer)context.NAACCR_GEN_DT_EXACT))
if (dtcmp <= 0)
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
dx_month = functions.GEN_DATE_MONTH_IOP(binding, untrimmedline.dateOfDiagnosis)
dx_day = functions.GEN_DATE_DAY_IOP(binding, untrimmedline.dateOfDiagnosis)
last_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfLastContact)
last_month = functions.GEN_DATE_MONTH_IOP(binding, untrimmedline.dateOfLastContact)
last_day = functions.GEN_DATE_DAY_IOP(binding, untrimmedline.dateOfLastContact)
if (dx_month == ((Integer)context.NAACCR_GEN_DT_MONTH_EMPTY) || last_month == ((Integer)context.NAACCR_GEN_DT_MONTH_EMPTY)) {
if (dx_year <= last_year)
return true
else
return false
}
else {
if (dx_day == ((Integer)context.NAACCR_GEN_DT_DAY_EMPTY) || last_day == ((Integer)context.NAACCR_GEN_DT_DAY_EMPTY)) {
if (dx_year < last_year)
return true
else {
if (dx_year == last_year && dx_month <= last_month)
return true
else
return false
}
}
else
return false
}
return false
}
// ID: NAACCR-00642; TAG: N1620; NAME: Date of Mult Tum, Lymphoma/Leukem/Unk Site (NAACCR)
public boolean naaccr00642(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
if (functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "7"))
return true
if (functions.GEN_EMPTY(untrimmedline.dateOfMultTumors) && functions.GEN_EMPTY(untrimmedline.dateOfMultTumorsFlag))
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 < 2010) {
if ((functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590-9992")) || (functions.GEN_INLIST(untrimmedline.primarySite, "809", "(C\\d\\d\\d)", 2, 3))) {
if (functions.GEN_INLIST(untrimmedline.dateOfMultTumorsFlag, "11"))
return true
else
return functions.GEN_ERROR_MSG(binding, 'For Date of Diagnosis of ${untrimmedline.dateOfDiagnosis.formatDate()}, Primary Site of ${untrimmedline.primarySite}, Histologic Type ICD-O-3 of ${untrimmedline.histologicTypeIcdO3}, Date of Mult Tumors Flag must = 11')
}
else {
if (functions.GEN_INLIST(untrimmedline.dateOfMultTumorsFlag, "11"))
return functions.GEN_ERROR_MSG(binding, 'For Date of Diagnosis of ${untrimmedline.dateOfDiagnosis.formatDate()}, Primary Site of ${untrimmedline.primarySite}, Histologic Type ICD-O-3 of ${untrimmedline.histologicTypeIcdO3}, Date of Mult Tumors Flag must not = 11')
}
return true
}
if (dx_year > 2009) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9751-9758,9765-9769,9970"))
return true
}
if (dx_year == 2010) {
if ((functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590-9729,9732-9733,9735-9738,9741-9742,9759-9764,9800-9920,9931-9967,9971-9992")) || (functions.GEN_INLIST(untrimmedline.primarySite, "809", "(C\\d\\d\\d)", 2, 3))) {
if (functions.GEN_INLIST(untrimmedline.dateOfMultTumorsFlag, "11"))
return true
else
return functions.GEN_ERROR_MSG(binding, 'For Date of Diagnosis of ${untrimmedline.dateOfDiagnosis.formatDate()}, Primary Site of ${untrimmedline.primarySite}, Histologic Type ICD-O-3 of ${untrimmedline.histologicTypeIcdO3}, Date of Mult Tumors Flag must = 11')
}
else {
if (functions.GEN_INLIST(untrimmedline.dateOfMultTumorsFlag, "11"))
return functions.GEN_ERROR_MSG(binding, 'For Date of Diagnosis of ${untrimmedline.dateOfDiagnosis.formatDate()}, Primary Site of ${untrimmedline.primarySite}, Histologic Type ICD-O-3 of ${untrimmedline.histologicTypeIcdO3}, Date of Mult Tumors Flag must not = 11')
}
}
if (dx_year == 2011) {
if ((functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590-9729,9735-9738")) && (!functions.GEN_INLIST(untrimmedline.primarySite, "421,770-779", "(C\\d\\d\\d)", 2, 3)))
return true
}
if (dx_year > 2010) {
if ((functions.GEN_INLIST(untrimmedline.primarySite, "C809")) || ((functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590-9729,9735-9738")) && (functions.GEN_INLIST(untrimmedline.primarySite, "421,770-779", "(C\\d\\d\\d)", 2, 3))) || (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9732-9733,9741-9742,9759-9764,9800-9920,9931-9967,9971-9992"))) {
if (functions.GEN_INLIST(untrimmedline.dateOfMultTumorsFlag, "11"))
return true
else
return functions.GEN_ERROR_MSG(binding, 'For Date of Diagnosis of ${untrimmedline.dateOfDiagnosis.formatDate()}, Primary Site of ${untrimmedline.primarySite}, Histologic Type ICD-O-3 of ${untrimmedline.histologicTypeIcdO3}, Date of Mult Tumors Flag must = 11')
}
else {
if (functions.GEN_INLIST(untrimmedline.dateOfMultTumorsFlag, "11"))
return functions.GEN_ERROR_MSG(binding, 'For Date of Diagnosis of ${untrimmedline.dateOfDiagnosis.formatDate()}, Primary Site of ${untrimmedline.primarySite}, Histologic Type ICD-O-3 of ${untrimmedline.histologicTypeIcdO3}, Date of Mult Tumors Flag must not = 11')
}
}
return true
}
// ID: NAACCR-00643; TAG: N0749; NAME: Date of Mult Tumors (SEER)
public boolean naaccr00643(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfMultTumors))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfMultTumors))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Multiple Tumors: %DC')
return false
}
return true
}
// ID: NAACCR-00644; TAG: N1077; NAME: Date of Mult Tumors Flag (NAACCR)
public boolean naaccr00644(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfMultTumorsFlag))
return true
if (functions.GEN_INLIST(untrimmedline.dateOfMultTumorsFlag, "11,12,15"))
return true
else
return false
return true
}
// ID: NAACCR-00645; TAG: N1134; NAME: Date of Mult Tumors, Date Flag (NAACCR)
public boolean naaccr00645(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfMultTumors) && functions.GEN_EMPTY(untrimmedline.dateOfMultTumorsFlag))
return true
if (functions.GEN_EMPTY(untrimmedline.dateOfMultTumors)) {
if (!functions.GEN_INLIST(untrimmedline.dateOfMultTumorsFlag, "11,12,15"))
return functions.GEN_ERROR_MSG(binding, 'If Date of Mult Tumors is blank, Date of Mult Tumors Flag must = blank, 11, 12, or 15')
}
else {
if (!functions.GEN_EMPTY(untrimmedline.dateOfMultTumorsFlag))
return functions.GEN_ERROR_MSG(binding, 'Either date or corresponding date flag must be blank if other is present')
}
return true
}
// ID: NAACCR-00646; TAG: N1482; NAME: Date of Mult Tumors, Date of DX (CCCR)
public boolean naaccr00646(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 > 2007) && (dx_year < 2013)) {
if (functions.GEN_EMPTY(untrimmedline.dateOfMultTumors) && functions.GEN_EMPTY(untrimmedline.dateOfMultTumorsFlag))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis = 2008-2012, then Date of Mult Tumors and Date of Mult Tumors Flag cannot both be blank')
}
if (dx_year < 2008) {
if (!functions.GEN_EMPTY(untrimmedline.dateOfMultTumors) || !functions.GEN_EMPTY(untrimmedline.dateOfMultTumorsFlag))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis < 2008, then Date of Mult Tumors and Date of Mult Tumors Flag must be blank')
}
return true
}
// ID: NAACCR-00647; TAG: N0884; NAME: Date of Mult Tumors, Date of DX (SEER IF165)
public boolean naaccr00647(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 > 2006) && (dx_year < 2013)) {
if (functions.GEN_EMPTY(untrimmedline.dateOfMultTumors) && functions.GEN_EMPTY(untrimmedline.dateOfMultTumorsFlag))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis = 2007-2012, then Date of Mult Tumors and Date of Mult Tumors Flag cannot both be blank')
}
if (dx_year < 2007) {
if (!functions.GEN_EMPTY(untrimmedline.dateOfMultTumors) || !functions.GEN_EMPTY(untrimmedline.dateOfMultTumorsFlag))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis < 2007, then Date of Mult Tumors and Date of Mult Tumors Flag must be blank')
}
return true
}
// ID: NAACCR-00648; TAG: N0830; NAME: Death Certificate Only, RX (NPCR)
public boolean naaccr00648(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int err_flag
err_flag = 0
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2006)
return true
if (!functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "7"))
return true
if (!functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "98,99", "(\\d\\d)")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & RX Summ--Surg Prim Site')
err_flag = 1
}
if (!functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "9")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & RX Summ--Scope Reg LN Sur')
err_flag = 1
}
if (!functions.GEN_INLIST(untrimmedline.rxSummSurgOthRegDis, "9")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & RX Summ--Surg Oth Reg/Dis')
err_flag = 1
}
if (!functions.GEN_INLIST(untrimmedline.reasonForNoSurgery, "9")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & Reason for No Surgery')
err_flag = 1
}
if (!functions.GEN_INLIST(untrimmedline.rxSummBrm, "99")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & RX Summ--BRM')
err_flag = 1
}
if (!functions.GEN_INLIST(untrimmedline.rxSummChemo, "99")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & RX Summ--Chemo')
err_flag = 1
}
if (!functions.GEN_INLIST(untrimmedline.rxSummHormone, "99")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & RX Summ--Hormone')
err_flag = 1
}
if (!functions.GEN_INLIST(untrimmedline.rxSummOther, "9")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & RX Summ--Other')
err_flag = 1
}
if (!functions.GEN_INLIST(untrimmedline.rxSummTransplntEndocr, "99")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & RX Summ--Transplnt/Endocr')
err_flag = 1
}
if (dx_year < 2018) {
if (!functions.GEN_INLIST(untrimmedline.radRegionalRxModality, "99")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & Rad--Regional RX Modality')
err_flag = 1
}
}
if (dx_year >= 2018) {
if (!functions.GEN_INLIST(untrimmedline.phase1RadiationTreatmentModality, "99")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & Phase I Radiation Treatment Modality')
err_flag = 1
}
}
if (!functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "0")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & RX Summ--Surg/Rad Seq')
err_flag = 1
}
if (!functions.GEN_INLIST(untrimmedline.rxSummSystemicSurSeq, "0")) {
functions.GEN_SAVE_TEXT(binding, 'Conflict between Death Certificate Only & RX Summ--Systemic/Sur Seq ')
err_flag = 1
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-00649; TAG: N0674; NAME: Derived AJCC--Flag (CS)
public boolean naaccr00649(Binding binding, Map