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.NaaccrTranslatedCompiledRules9.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 NaaccrTranslatedCompiledRules9 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-02255' <= id && id <= 'NAACCR-02544'
}
// ID: NAACCR-02255; TAG: N3969; NAME: Reason for No Radiation, PhI Radiation Treatment Modality (NAACCR)
public boolean naaccr02255(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.phase1RadiationTreatmentModality) || functions.GEN_EMPTY(untrimmedline.reasonForNoRadiation))
return true
if (functions.GEN_AT(untrimmedline.reasonForNoRadiation, "0") != 0) {
if (!functions.GEN_INLIST(untrimmedline.phase1RadiationTreatmentModality, "01-16,98"))
return false
}
if (functions.GEN_AT(untrimmedline.reasonForNoRadiation, "12567", 1) != 0) {
if (functions.GEN_AT(untrimmedline.phase1RadiationTreatmentModality, "00") == 0)
return false
}
if (functions.GEN_AT(untrimmedline.reasonForNoRadiation, "8", 1) != 0) {
if (functions.GEN_AT(untrimmedline.phase1RadiationTreatmentModality, "0099", 2) == 0)
return false
}
if (functions.GEN_AT(untrimmedline.reasonForNoRadiation, "9", 1) != 0) {
if (functions.GEN_AT(untrimmedline.phase1RadiationTreatmentModality, "99") == 0)
return false
}
return true
}
// ID: NAACCR-02256; TAG: N3972; NAME: Summary Stage 2018, Date of DX (SEER)
public boolean naaccr02256(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018) {
if (!functions.GEN_EMPTY(untrimmedline.summaryStage2018))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Summary Stage 2018 must be blank for cases diagnosed before 2018')
}
return true
}
// ID: NAACCR-02257; TAG: N3974; NAME: Oncotype Dx Risk Level-DCIS, Breast, Behavior (NAACCR)
public boolean naaccr02257(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (dx_year < 2018)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00480") == 0)
return true
if (functions.GEN_EMPTY(untrimmedline.oncotypeDxRiskLevelDcis) || functions.GEN_AT(untrimmedline.oncotypeDxRiskLevelDcis, "8") != 0)
return true
if (functions.GEN_EMPTY(untrimmedline.behaviorCodeIcdO3) || functions.GEN_AT(untrimmedline.behaviorCodeIcdO3, "01", 1) != 0)
return true
if (functions.GEN_AT(untrimmedline.behaviorCodeIcdO3, "3") != 0) {
if (functions.GEN_AT(untrimmedline.oncotypeDxRiskLevelDcis, "6", 1) == 0)
return false
}
if (functions.GEN_AT(untrimmedline.behaviorCodeIcdO3, "2") != 0) {
if (functions.GEN_AT(untrimmedline.oncotypeDxRiskLevelDcis, "6", 1) != 0)
return false
}
return true
}
// ID: NAACCR-02258; TAG: N3975; NAME: Oncotype Dx Risk Level-Invasive, Breast, Behavior (NAACCR)
public boolean naaccr02258(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
functions.GEN_NOOP()
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))
return true
if (dx_year < 2018)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00480") == 0)
return true
if (functions.GEN_EMPTY(untrimmedline.oncotypeDxRiskLevelInvasive) || functions.GEN_AT(untrimmedline.oncotypeDxRiskLevelInvasive, "8") != 0)
return true
if (functions.GEN_EMPTY(untrimmedline.behaviorCodeIcdO3) || functions.GEN_AT(untrimmedline.behaviorCodeIcdO3, "01", 1) != 0)
return true
if (functions.GEN_AT(untrimmedline.behaviorCodeIcdO3, "2") != 0) {
if (functions.GEN_AT(untrimmedline.oncotypeDxRiskLevelInvasive, "6", 1) == 0)
return false
}
if (functions.GEN_STRCMP(untrimmedline.behaviorCodeIcdO3, "3") == 0) {
if (functions.GEN_AT(untrimmedline.oncotypeDxRiskLevelInvasive, "6") != 0)
return false
}
return true
}
// ID: NAACCR-02259; TAG: N3976; NAME: RX Date Surgery, Date Flag, Date DX, CoC Flag (SEER)
public boolean naaccr02259(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (dx_year > 2017 && functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") != 0) {
if (functions.GEN_EMPTY(untrimmedline.rxDateSurgery) && functions.GEN_EMPTY(untrimmedline.rxDateSurgeryFlag))
return false
}
return true
}
// ID: NAACCR-02260; TAG: N3977; NAME: RX Date Radiation, Date Flag, Date DX, CoC Flag (SEER)
public boolean naaccr02260(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (dx_year > 2017 && functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") != 0) {
if (functions.GEN_EMPTY(untrimmedline.rxDateRadiation) && functions.GEN_EMPTY(untrimmedline.rxDateRadiationFlag))
return false
}
return true
}
// ID: NAACCR-02261; TAG: N3978; NAME: RX Date Chemo, Date Flag, Date DX, CoC Flag (SEER)
public boolean naaccr02261(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (dx_year > 2017 && functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") != 0) {
if (functions.GEN_EMPTY(untrimmedline.rxDateChemo) && functions.GEN_EMPTY(untrimmedline.rxDateChemoFlag))
return false
}
return true
}
// ID: NAACCR-02262; TAG: N3979; NAME: RX Date Hormone, Date Flag, Date DX, CoC Flag (SEER)
public boolean naaccr02262(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (dx_year > 2017 && functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") != 0) {
if (functions.GEN_EMPTY(untrimmedline.rxDateHormone) && functions.GEN_EMPTY(untrimmedline.rxDateHormoneFlag))
return false
}
return true
}
// ID: NAACCR-02263; TAG: N3980; NAME: RX Date BRM, Date Flag, Date DX, CoC Flag (SEER)
public boolean naaccr02263(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (dx_year > 2017 && functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") != 0) {
if (functions.GEN_EMPTY(untrimmedline.rxDateBrm) && functions.GEN_EMPTY(untrimmedline.rxDateBrmFlag))
return false
}
return true
}
// ID: NAACCR-02264; TAG: N3981; NAME: RX Date Other, Date Flag, Date DX, CoC Flag (SEER)
public boolean naaccr02264(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (dx_year > 2017 && functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") != 0) {
if (functions.GEN_EMPTY(untrimmedline.rxDateOther) && functions.GEN_EMPTY(untrimmedline.rxDateOtherFlag))
return false
}
return true
}
// ID: NAACCR-02265; TAG: N3982; NAME: RX Date Systemic, Date Flag, Date DX, CoC Flag (SEER)
public boolean naaccr02265(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") == 0)
return true
if (functions.GEN_EMPTY(untrimmedline.rxDateSystemic) && functions.GEN_EMPTY(untrimmedline.rxDateSystemicFlag))
return true
if (functions.GEN_EMPTY(untrimmedline.rxDateSystemic) && !functions.GEN_EMPTY(untrimmedline.rxDateSystemicFlag)) {
if (functions.GEN_AT(untrimmedline.rxDateSystemicFlag, "10111215", 2) == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'RX Date Systemic Flag must = 10, 11, or 12')
}
if (!functions.GEN_EMPTY(untrimmedline.rxDateSystemic) && !functions.GEN_EMPTY(untrimmedline.rxDateSystemicFlag))
return false
return true
}
// ID: NAACCR-02266; TAG: N3106; NAME: EOD--Old 4 digit (SEER IF264DIG_P1)
public boolean naaccr02266(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_MATCH(untrimmedline.eodOld4Digit, "(((\\s\\s)|(\\d\\d))((\\s)|(\\d))((\\s)|(\\d)))")
}
// ID: NAACCR-02267; TAG: N3973; NAME: TNM Edition Number, Date of Diagnosis (CCCR)
public boolean naaccr02267(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.tnmEditionNumber))
return true
if (functions.GEN_EMPTY(untrimmedline.ajccId))
return true
if (dx_year > 2017 && (functions.GEN_AT(functions.GEN_TRIM(untrimmedline.ajccId, ((Integer)context.NAACCR_GEN_RIGHT)), "203658", 2) != 0 || functions.GEN_AT(untrimmedline.ajccId, "48.148.2", 4) != 0)) {
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "000888", 2) == 0)
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis is 2018+, then TNM Edition Number must = 00, 08, or 88')
}
return true
}
// ID: NAACCR-02268; TAG: N3970; NAME: Date of Sentinel Lymph Node Biopsy, Schema ID, Date DX (SEER)
public boolean naaccr02268(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)
char[] ID = new char[14]
char[] code = new char[7]
if (dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (dx_year < 2018) {
if (!functions.GEN_EMPTY(untrimmedline.dateSentinelLymphNodeBiopsy) || !functions.GEN_EMPTY(untrimmedline.dateSentinelLymphNodeBiopsyFlag)) {
functions.GEN_SAVE_ERROR_TEXT(binding, 'Date of Sentinel Lymph Node Biopsy and Date of Sentinel Lymph Node Biopsy Flag must be blank for cases diagnosed before 2018')
}
}
functions.GEN_STRCPY(ID, "00470 00480 ")
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (dx_year > 2017) {
if (functions.GEN_AT(code, ID, 6) != 0) {
if (functions.GEN_EMPTY(untrimmedline.dateSentinelLymphNodeBiopsy) && functions.GEN_EMPTY(untrimmedline.dateSentinelLymphNodeBiopsyFlag))
return functions.GEN_ERROR_MSG(binding, 'For Date of Diagnosis 2018+ and Schema ID: ${untrimmedline.schemaId}, either Date of Sentinel Lymph Node Biopsy or Date of Sentinel Lymph Node Biopsy Flag must be reported.')
}
}
return true
}
// ID: NAACCR-02269; TAG: N3971; NAME: Sentinel Lymph Nodes Pos/Ex, Schema ID, Date DX (SEER)
public boolean naaccr02269(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
char[] ID = new char[14]
char[] code = new char[7]
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_NOOP()
if (dx_year < 2018) {
if (!functions.GEN_EMPTY(untrimmedline.sentinelLymphNodesExamined) || !functions.GEN_EMPTY(untrimmedline.sentinelLymphNodesPositive)) {
functions.GEN_SAVE_ERROR_TEXT(binding, 'Sentinel Lymph Nodes Examined and Sentinel Lymph Nodes Positive must be blank for cases diagnosed before 2018')
}
}
functions.GEN_STRCPY(ID, "00470 00480 ")
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, ID, 6) != 0) {
if (functions.GEN_EMPTY(untrimmedline.sentinelLymphNodesExamined) || functions.GEN_EMPTY(untrimmedline.sentinelLymphNodesPositive))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Sentinel Lymph Nodes Examined and Sentinel Lymph Nodes Positive must be reported for Melanoma of Skin and Breast')
if (functions.GEN_AT(untrimmedline.typeOfReportingSource, "6", 1) != 0) {
if (functions.GEN_AT(untrimmedline.sentinelLymphNodesExamined, "00") == 0 || functions.GEN_AT(untrimmedline.sentinelLymphNodesPositive, "98") == 0)
return functions.GEN_ERROR_MSG(binding, 'Conflict between Sentinel Lymph Nodes Examined: ${untrimmedline.sentinelLymphNodesExamined}, Sentinel Lymph Nodes Positive: ${untrimmedline.sentinelLymphNodesPositive}, and Type of Reporting Source: ${untrimmedline.typeOfReportingSource}')
}
if (functions.GEN_AT(untrimmedline.typeOfReportingSource, "6", 1) != 0) {
if (functions.GEN_AT(untrimmedline.sentinelLymphNodesExamined, "99") == 0 || functions.GEN_AT(untrimmedline.sentinelLymphNodesPositive, "99") == 0)
return functions.GEN_ERROR_MSG(binding, 'Conflict between Sentinel Lymph Nodes Examined: ${untrimmedline.sentinelLymphNodesExamined}, Sentinel Lymph Nodes Positive: ${untrimmedline.sentinelLymphNodesPositive}, and Type of Reporting Source: ${untrimmedline.typeOfReportingSource}')
}
}
return true
}
// ID: NAACCR-02270; TAG: N3988; NAME: SEER Site-Specific Fact 1, Date DX (SEER)
public boolean naaccr02270(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (dx_year < 2018) {
if (!functions.GEN_EMPTY(untrimmedline.seerSiteSpecificFact1))
functions.GEN_SAVE_ERROR_TEXT(binding, 'SEER Site-Specific Fact 1 must be blank for cases diagnosed before 2018')
}
if (functions.GEN_EMPTY(untrimmedline.seerSiteSpecificFact1))
return true
if (functions.GEN_AT(untrimmedline.seerSiteSpecificFact1, "0123456789", 1) == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, '${untrimmedline.seerSiteSpecificFact1} not valid code for SEER Site-Specific Fact 1')
return true
}
// ID: NAACCR-02271; TAG: N3989; NAME: SEER Site-Specific Fact 1, Schema ID, Required (SEER)
public boolean naaccr02271(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.schemaId))
return true
if (functions.GEN_AT(untrimmedline.typeOfReportingSource, "7") != 0)
return true
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))
return true
if (dx_year < 2018)
return true
char[] ID = new char[70]
char[] code = new char[7]
functions.GEN_STRCPY(ID, "00071 00072 00073 00074 00075 00076 00077 00100 00111 00112 ")
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, ID, 6) != 0) {
if (functions.GEN_EMPTY(untrimmedline.seerSiteSpecificFact1))
return false
}
return true
}
// ID: NAACCR-02272; TAG: N3990; NAME: SSDI for Breast, Blank for Other Schemas (NAACCR)
public boolean naaccr02272(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00480") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00480") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.estrogenReceptorPercntPosOrRange)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Estrogen Receptor Percent Pos or Range must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.estrogenReceptorSummary)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Estrogen Receptor Summary must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.estrogenReceptorTotalAllredScore)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Estrogen Receptor Total Allred Score must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2IhcSummary)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, HER2 IHC Summary must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2IshDualProbeCopyNumber)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, HER2 ISH Dual Probe Copy Number must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2IshDualProbeRatio)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, HER2 ISH Dual Probe Ratio must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2IshSingleProbeCopyNumber)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, HER2 ISH Single Probe Copy Number must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2IshSummary)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, HER2 ISH Summary must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnPositiveAxillaryLevel1To2)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, LN Positive Axillary Level I-II must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.multigeneSignatureMethod)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Multigene Signature Method must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.multigeneSignatureResults)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Multigene Signature Results must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.oncotypeDxRecurrenceScoreDcis)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Oncotype Dx Recurrence Score-DCIS must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.oncotypeDxRecurrenceScoreInvasiv)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Oncotype Dx Recurrence Score-Invasive must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.oncotypeDxRiskLevelDcis)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Oncotype Dx Risk Level-DCIS must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.oncotypeDxRiskLevelInvasive)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Oncotype Dx Risk Level-Invasive must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.progesteroneRecepPrcntPosOrRange)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Progesterone Recept Percent Pos or Range must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.progesteroneRecepSummary)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Progesterone Receptor Summary must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.progesteroneRecepTotalAllredScor)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Progesterone Receptor Total Allred Score must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.responseToNeoadjuvantTherapy)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Response to Neoadjuvant Therapy must be blank')
err_flag = 1
}
if (dx_year >= 2018 && dx_year <= 2020) {
if (!functions.GEN_EMPTY(untrimmedline.her2OverallSummary)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, HER2 Overall Summary must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ki67)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Breast, Ki-67 must be blank')
err_flag = 1
}
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02273; TAG: N3991; NAME: SSDI for Prostate, Blank for Other Schemas (NAACCR)
public boolean naaccr02273(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00580") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00580") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.gleasonPatternsClinical)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Prostate, Gleason Patterns Clinical must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.gleasonPatternsPathological)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Prostate, Gleason Patterns Pathological must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.gleasonScoreClinical)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Prostate, Gleason Score Clinical must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.gleasonScorePathological)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Prostate, Gleason Score Pathological must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.gleasonTertiaryPattern)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Prostate, Gleason Tertiary Pattern must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfCoresExamined)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Prostate, Number of Cores Examined must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfCoresPositive)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Prostate, Number of Cores Positive must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.psaLabValue)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Prostate, PSA Lab Value must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02274; TAG: N3992; NAME: SSDI for Testis, Blank for Other Schemas (NAACCR)
public boolean naaccr02274(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00590") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00590") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.afpPostOrchiectomyLabValue)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, AFP Post-Orchiectomy Lab Value must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.afpPostOrchiectomyRange)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, AFP Post-Orchiectomy Range must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.afpPreOrchiectomyLabValue)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, AFP Pre-Orchiectomy Lab Value must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.afpPreOrchiectomyRange)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, AFP Pre-Orchiectomy Range must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.hcgPostOrchiectomyLabValue)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, hCG Post-Orchiectomy Lab Value must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.hcgPostOrchiectomyRange)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, hCG Post-Orchiectomy Range must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.hcgPreOrchiectomyLabValue)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, hCG Pre-Orchiectomy Lab Value must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.hcgPreOrchiectomyRange)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, hCG Pre-Orchiectomy Range must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ldhPostOrchiectomyRange)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, LDH Post-Orchiectomy Range must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ldhPreOrchiectomyRange)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, LDH Pre-Orchiectomy Range must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.sCategoryClinical)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, S Category Clinical must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.sCategoryPathological)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Testis, S Category Pathological must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02275; TAG: N3993; NAME: SSDI for Kidney, Blank for Other Schemas (NAACCR)
public boolean naaccr02275(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00600") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00600") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.invasionBeyondCapsule)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Kidney, Invasion Beyond Capsule must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ipsilateralAdrenalGlandInvolve)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Kidney, Ipsilateral Adrenal Gland Involvement must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.majorVeinInvolvement)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Kidney, Major Vein Involvement must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.sarcomatoidFeatures)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Kidney, Sarcomatoid Features must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02276; TAG: N3994; NAME: SSDI for Liver & Biliary, Blank for Other Schemas (NAACCR)
public boolean naaccr02276(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00220 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.afpPretreatmentInterpretation)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Liver, AFP Pretreatment Interpretation must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.afpPretreatmentLabValue)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Liver, AFP Pretreatment Lab Value must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.bilirubinPretxTotalLabValue)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Liver, Bilirubin Pretreatment Total Lab Value must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.bilirubinPretxUnitOfMeasure)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Liver, Bilirubin Pretreatment Unit of Measure must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.creatininePretreatmentLabValue)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Liver, Creatinine Pretreatment Lab Value must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.creatininePretxUnitOfMeasure)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Liver, Creatinine Pretreatment Unit of Measure must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.iNRProthrombinTime)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Liver, Internatl Norm Ratio Prothrombin Time must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, "00220 00230 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.fibrosisScore)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Liver or Intrehepatic Bile Duct, Fibrosis Score must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, "00230 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.tumorGrowthPattern)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Intrahepatic Bile Duct, Tumor Growth Pattern must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, "00230 00250 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.primarySclerosingCholangitis)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Intrahep,Perihilar Duct, Prim Scleros Cholang must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02277; TAG: N3995; NAME: SSDI for Head & Neck, Blank for Other Schemas (NAACCR)
public boolean naaccr02277(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] ID = new char[70]
char[] IDPlus1 = new char[140]
char[] IDPlus2 = new char[150]
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(ID, "00071 00072 00073 00074 00075 00076 00077 00100 00111 00112 ")
functions.GEN_STRCPY(IDPlus1, ID)
functions.GEN_STRCAT(IDPlus1, "00060 00080 00090 00121 00122 00131 00132 00133 00130 00140 ")
functions.GEN_STRCPY(IDPlus2, IDPlus1)
functions.GEN_STRCAT(IDPlus2, "00150 ")
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00060 00140 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.lnHeadAndNeckLevels1To3)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Cerv Nodes,Melanoma H&N, LN H&N Levels I-III must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnHeadAndNeckLevels4To5)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Cerv Nodes,Melanoma H&N, LN H&N Levels IV-V must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnHeadAndNeckLevels6To7)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Cerv Nodes,Melanoma H&N, LN H&N Levels VI-VII must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnHeadAndNeckOther)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Cerv Nodes,Melanoma H&N, LN H&N Other must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, ID, 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.seerSiteSpecificFact1)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not H&N, SEER Site-Specific Fact 1 must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, IDPlus1, 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.extranodalExtensionHeadNeckClin)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not H&N, Extranodal Extension H&N Clinical must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.extranodalExtensionHeadNeckPath)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not H&N, Extranodal Extension H&N Pathological must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, IDPlus2, 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.lnSize)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not H&N or SCC of H&N, LN Size must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02278; TAG: N3996; NAME: SSDI for Esophagus, Blank for Other Schemas (NAACCR)
public boolean naaccr02278(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00161") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00161") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.esophagusAndEgjTumorEpicenter)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Esophagus (Squam), Esophagus,EGJ Tumor Epicenter must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02279; TAG: N3997; NAME: SSDI for Appendix & Colorectal, Blank for Other Schemas (NAACCR)
public boolean naaccr02279(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00190 00200 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.ceaPretreatmentInterpretation)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Appendix,Colorectal, CEA Pretreat Interpretation must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ceaPretreatmentLabValue)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Appendix,Colorectal, CEA Pretreat Lab Value must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, "00200 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.brafMutationalAnalysis)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Colon & Rectum, BRAF Mutational Analysis must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.circumferentialResectionMargin)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Colon & Rectum, Circumferential Resection Margin must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.kras)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Colon & Rectum, KRAS must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.microsatelliteInstability)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Colon & Rectum, Microsatellite Instability (MSI) must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.nrasMutationalAnalysis)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Colon & Rectum, NRAS Mutational Analysis must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tumorDeposits)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Colon & Rectum, Tumor Deposits must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02280; TAG: N3998; NAME: SSDI for Lung & Pleura, Blank for Other Schemas (NAACCR)
public boolean naaccr02280(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId))
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00360") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.alkRearrangement)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lung, ALK Rearrangement must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.egfrMutationalAnalysis)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lung, EGFR Mutational Analysis must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.separateTumorNodules)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lung, Separate Tumor Nodules must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.visceralParietalPleuralInvasion)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lung, Visceral and Parietal Pleural Invasion must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(untrimmedline.schemaId, "00370") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.pleuralEffusion)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Pleural Mesothelioma, Pleural Effusion must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02281; TAG: N3999; NAME: SSDI for Bone, Blank for Other Schemas (NAACCR)
public boolean naaccr02281(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00381 00382 00383 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.percentNecrosisPostNeoadjuvant)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Bone, Percent Necrosis Post Neoadjuvant must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02282; TAG: N4000; NAME: SSDI for Soft Tissue, Blank for Other Schemas (NAACCR)
public boolean naaccr02282(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[50]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00400 00410 00421 00422 00440 00450 00459 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.boneInvasion)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Soft Tissue, Bone Invasion must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02283; TAG: N4001; NAME: SSDI for GIST, Blank for Other Schemas (NAACCR)
public boolean naaccr02283(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00430") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00430") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.kitGeneImmunohistochemistry)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not GIST, KIT Gene Immunohistochemistry must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02284; TAG: N4002; NAME: SSDI for Skin, Blank for Other Schemas (NAACCR)
public boolean naaccr02284(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId))
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00150") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.highRiskHistologicFeatures)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Cutaneous SCC H&N, High Risk Histologic Features must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(untrimmedline.schemaId, "00460") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.lnIsolatedTumorCells)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Merkel Cell, LN Isolated Tumor Cells (ITC) must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.profoundImmuneSuppression)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Merkel Cell, Profound Immune Suppression must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(untrimmedline.schemaId, "00470") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.breslowTumorThickness)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Melanoma of Skin, Breslow Tumor Thickness must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ldhPretreatmentLabValue)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Melanoma of Skin, LDH Lab Value must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ldhUpperLimitsOfNormal)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Melanoma of Skin, LDH Upper Limits of Normal must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.mitoticRateMelanoma)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Melanoma of Skin, Mitotic Rate Melanoma must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ulceration)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Melanoma of Skin, Ulceration must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02285; TAG: N4003; NAME: SSDI for Vulva, Vagina, Cervix, Blank for Other Schemas (NAACCR)
public boolean naaccr02285(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00500 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.lnLaterality)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Vulva, LN Laterality must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, "09520 ") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.p16)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Cervix 9th Edtion, p16 must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, "00500 00510 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.lnStatusFemoralInguinal)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Vulva or Vagina,LN Status: Femoral-Inguinal must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, "00500 00510 00520 09520 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.lnAssessMethodFemoralInguinal)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Vulva or Vagina, LN Assess Meth Femoral-Inguinal must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnAssessMethodParaaortic)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Vagina or Cervix, LN Assess Method Para-aortic must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnAssessMethodPelvic)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Vulva, Vagina, or Cervix, LN Assess Method Pelvic must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnStatusPelvic)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Vulva, Vagina, or Cervix, LN Status: Pelvic must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, "00510 00520 09520 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.lnDistantAssessMethod)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Vagina or Cervix, LN Distant Assessment Method must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnDistantMediastinalScalene)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Vagina, or Cervix, LN Distant: Mediastinal, Scalene must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnStatusParaAortic)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Vagina or Cervix, LN Status: Para-Aortic must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02286; TAG: N4004; NAME: SSDI for Corpus Uteri, Blank for Other Schemas (NAACCR)
public boolean naaccr02286(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00528 00530 00541 00542 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.numberOfPositiveParaAorticNodes)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Corpus Uteri, Number Pos Para-Aortic Nodes must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfExaminedParaAorticNodes)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Corpus Uteri, Number Exam Para-Aortic Nodes must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfPositivePelvicNodes)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Corpus Uteri, Number of Positive Pelvic Nodes must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfExaminedPelvicNodes)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Corpus Uteri, Number of Examined Pelvic Nodes must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.peritonealCytology)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Corpus Uteri, Peritoneal Cytology must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02287; TAG: N4005; NAME: SSDI for Ovary, Fallopian Tube, Primary Peritoneal, Blank for Other Schemas (NAACCR)
public boolean naaccr02287(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00551 00552 00553 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.ca125PretreatmentInterpretation)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Ovarian, CA-125 Pretreatment Interpretation must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.residualTumVolPostCytoreduction)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Ovarian, Residual Tumor Volume Post Cytoreduction must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02288; TAG: N4006; NAME: SSDI for Placenta, Blank for Other Schemas (NAACCR)
public boolean naaccr02288(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00560") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00560") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.gestationalTrophoblasticPxIndex)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Placenta, Gest Trophoblast Prognost Scoring Ind must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02289; TAG: N4007; NAME: SSDI for Ophthalmic Melanoma, Blank for Other Schemas (NAACCR)
public boolean naaccr02289(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00660 00671 00672 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.measuredThickness)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Ophthalmic Melanoma, Measured Thickness must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, "00671 00672 ") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.chromosome3Status)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Uveal Melanoma, Chromosome 3 Status must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.chromosome8qStatus)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Uveal Melanoma, Chromosome 8q Status must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.extravascularMatrixPatterns)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Uveal Melanoma, Extravascular Matrix Patterns must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.measuredBasalDiameter)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Uveal Melanoma, Measured Basal Diameter must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.microvascularDensity)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Uveal Melanoma, Microvascular Density must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.mitoticCountUvealMelanoma)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Uveal Melanoma, Mitotic Count Uveal Melanoma must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02290; TAG: N4008; NAME: SSDI for Retinoblastoma, Blank for Other Schemas (NAACCR)
public boolean naaccr02290(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00680") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00680") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.heritableTrait)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Retinoblastoma, Heritable Trait must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02291; TAG: N4009; NAME: SSDI for Lacrimal Gland, Blank for Other Schemas (NAACCR)
public boolean naaccr02291(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00690") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00690") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.adenoidCysticBasaloidPattern)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lacrimal Gland, Adenoid Cystic Basaloid Pattern must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02292; TAG: N4010; NAME: SSDI for Brain, CNS, Blank for Other Schemas (NAACCR)
public boolean naaccr02292(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00721 00722 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.brainMolecularMarkers)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Brain,CNS, Brain Molecular Markers must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.chromosome1pLossHeterozygosity)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Brain,CNS, Chromosome 1p: Loss of Heterozygosity must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.chromosome19qLossHeterozygosity)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Brain,CNS, Chromosome 19q: Loss of Heterozygosity must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.methylationOfO6MGMT)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Brain,CNS, Methylat O6-Methylguanine-Methyltransf must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02293; TAG: N4011; NAME: SSDI for Lymphoma, Blank for Other Schemas (NAACCR)
public boolean naaccr02293(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00790 00795 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.bSymptoms)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lymphoma, B Symptoms must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.hivStatus)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lymphoma, HIV Status must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.nccnInternationalPrognosticIndex)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lymphoma, NCCN International Prognostic Index must be blank')
err_flag = 1
}
}
if (functions.GEN_AT(code, "00795 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.adenopathy)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lymphoma CLL/SLL, Adenopathy must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.anemia)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lymphoma CLL/SLL, Anemia must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lymphocytosis)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lymphoma CLL/SLL, Lymphocytosis must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.organomegaly)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lymphoma CLL/SLL, Organomegaly must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.thrombocytopenia)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lymphoma CLL/SLL, Thrombocytopenia must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.derivedRaiStage)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Lymphoma CLL/SLL, Derived RAI Stage must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02294; TAG: N4012; NAME: SSDI for Plasma Cell Myeloma, Blank for Other Schemas (NAACCR)
public boolean naaccr02294(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00821") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00821", 5) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.highRiskCytogenetics)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Myeloma, High Risk Cytogenetics must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.serumAlbuminPretreatmentLevel)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Myeloma, Serum Albumin Pretreatment Level must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.serumBeta2MicroglobulinPretxLvl)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Myeloma, Serum Beta-2 Microglob Pretreat Level must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02295; TAG: N4013; NAME: SSDI for HemeRetic, Blank for Other Schemas (NAACCR)
public boolean naaccr02295(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00830") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00830") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.jak2)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not HemeRetic, JAK2 must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02296; TAG: N4014; NAME: SSDI Perineural Invasion, Blank for Other Schemas (NAACCR)
public boolean naaccr02296(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00150 00200 00640 00690 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.perineuralInvasion)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema not CutH&N,Colorect,SkinEyelid,LacGland, Perineur Inv must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02297; TAG: N4015; NAME: SSDI Extranodal Extension non-H&N, Blank for Other Schemas (NAACCR)
public boolean naaccr02297(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[6]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00460 00570 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.extranodalExtensionClin)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema not Merkel Cell,Penis, Extranodal Extens Clin (non-H&N) must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.extranodalExtensionPath)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema not Merkel Cell,Penis, Extranodal Extens Path (non-H&N) must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02298; TAG: N4016; NAME: SSDI LDH Level, Blank for Other Schemas (NAACCR)
public boolean naaccr02298(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[7]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00470 00821 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.ldhPretreatmentLevel)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema not Melanoma of Skin or Myeloma, LDH Level must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02299; TAG: N4017; NAME: SSDI FIGO Stage, Blank for Other Schemas (NAACCR)
public boolean naaccr02299(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
char[] code = new char[6]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, "00500 00510 00520 00528 00530 00541 00542 00551 00552 00553 00560 09520 ", 6) == 0) {
if (!functions.GEN_EMPTY(untrimmedline.figoStage)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Gynecologic, FIGO Stage must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02300; TAG: N4018; NAME: SSDI for Mycosis Fungoides, Blank for Other Schemas (NAACCR)
public boolean naaccr02300(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId) || functions.GEN_AT(untrimmedline.schemaId, "00811") != 0)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00811") == 0) {
if (!functions.GEN_EMPTY(untrimmedline.peripheralBloodInvolvement)) {
functions.GEN_SAVE_TEXT(binding, 'If Schema is not Mycosis Fungoides, Peripheral Blood Involvement must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02301; TAG: N3987; NAME: TNM Edition Number, AJCC ID (COC)
public boolean naaccr02301(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.tnmEditionNumber))
return true
if (functions.GEN_EMPTY(untrimmedline.ajccId))
return true
if (functions.GEN_AT(functions.GEN_TRIM(untrimmedline.ajccId, ((Integer)context.NAACCR_GEN_RIGHT)), "XX") != 0) {
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "88") == 0)
return false
}
if (dx_year >= 2022) {
if (functions.GEN_AT(functions.GEN_TRIM(untrimmedline.ajccId, ((Integer)context.NAACCR_GEN_RIGHT)), "XX") == 0 && !functions.GEN_EMPTY(untrimmedline.ajccId)) {
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "88") != 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'TNM Edition Number must not = 88 for AJCC ID: ${untrimmedline.ajccId}')
}
}
return true
}
// ID: NAACCR-02302; TAG: N2665; NAME: Chromosome 3 Status, Date DX (NAACCR)
public boolean naaccr02302(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (dx_year < 2018) {
if (!functions.GEN_EMPTY(untrimmedline.chromosome3Status))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Chromosome 3 Status must be blank for cases diagnosed before 2018')
}
if (functions.GEN_EMPTY(untrimmedline.chromosome3Status))
return true
if (functions.GEN_AT(untrimmedline.chromosome3Status, "0123789", 1) == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, '${untrimmedline.chromosome3Status} not valid code for Chromosome 3 Status')
return true
}
// ID: NAACCR-02303; TAG: N4019; NAME: Lymphovascular Invasion, Schema ID (NAACCR)
public boolean naaccr02303(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] SCHEMA_ID = new char[6], SCHEMA_NAME = new char[31]
int dx_year
char[] ID1 = new char[385]
char[] ID2 = new char[200]
char[] code = new char[7]
char[] name = new char[50]
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 < 2018)
return true
if (functions.GEN_AT(untrimmedline.typeOfReportingSource, "7") != 0)
return true
if (functions.GEN_EMPTY(untrimmedline.lymphVascularInvasion))
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId)) {
return true
}
if (functions.GEN_SQLLOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SCHEMA_ID_NAMES, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SCHEMA_ID_NAMES_SCHEMA_ID, untrimmedline.schemaId, ['SCHEMA_ID':SCHEMA_ID, 'SCHEMA_NAME':SCHEMA_NAME]))
functions.GEN_STRCPY(name, "Schema ")
functions.GEN_STRCAT(name, untrimmedline.schemaId)
functions.GEN_STRCAT(name, ": ")
functions.GEN_STRCAT(name, functions.GEN_TRIM(SCHEMA_NAME, ((Integer)context.NAACCR_GEN_RIGHT)))
functions.GEN_STRCPY(ID1, "00071 00072 00073 00074 00075 00076 00077 00080 00111 00112 ")
functions.GEN_STRCAT(ID1, "00121 00122 00130 00131 00132 00133 00161 00169 00170 00180 ")
functions.GEN_STRCAT(ID1, "00190 00200 00301 00302 00320 00340 00460 00470 00530 00541 ")
functions.GEN_STRCAT(ID1, "00542 00570 00590 00620 00500 00510 00520 00560 ")
functions.GEN_STRCAT(ID1, "00100 00230 00250 00260 00270 00280 00290 00330 00350 00360 ")
functions.GEN_STRCAT(ID1, "09520 00528 ")
functions.GEN_STRCPY(ID2, "00710 00790 00795 00811 00812 00821 00822 00830 ")
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, ID1, 6) != 0) {
if (functions.GEN_AT(untrimmedline.lymphVascularInvasion, "012349", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, name)
functions.GEN_SAVE_ERROR_TEXT(binding, 'If Schema ID = ${untrimmedline.schemaId}, Lymphovascular Invasion must not = 8')
}
}
if (dx_year >= 2018 && dx_year <= 2020) {
if (functions.GEN_AT(code, "00730 00740 ") != 0) {
if (functions.GEN_AT(untrimmedline.lymphVascularInvasion, "012349", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, name)
functions.GEN_SAVE_ERROR_TEXT(binding, 'If Schema ID = ${untrimmedline.schemaId}, Lymphovascular Invasion must not = 8')
}
}
if (functions.GEN_AT(code, "00760 ") != 0) {
if (functions.GEN_AT(untrimmedline.lymphVascularInvasion, "0123489", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, name)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Lymphovascular Invasion: ${untrimmedline.lymphVascularInvasion} not valid for Schema ID: ${untrimmedline.schemaId}')
}
}
}
if (dx_year >= 2021) {
if (functions.GEN_AT(code, "00730 00740 00760 ", 6) != 0) {
if (functions.GEN_AT(untrimmedline.lymphVascularInvasion, "02349", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, name)
functions.GEN_SAVE_ERROR_TEXT(binding, 'If Schema ID = ${untrimmedline.schemaId}, Lymphovascular Invasion must not = 1 or 8')
}
}
}
if (functions.GEN_AT(code, ID2, 6) != 0) {
if (functions.GEN_AT(untrimmedline.lymphVascularInvasion, "8", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, name)
functions.GEN_SAVE_ERROR_TEXT(binding, 'If Schema ID = ${untrimmedline.schemaId}, Lymphovascular Invasion must = 8')
}
}
if (functions.GEN_AT(untrimmedline.schemaId, "00430") != 0) {
if (dx_year <= 2020) {
if (functions.GEN_AT(untrimmedline.lymphVascularInvasion, "0123489", 1) != 0)
return true
else
functions.GEN_SAVE_ERROR_TEXT(binding, 'Lymphovascular Invasion: ${untrimmedline.lymphVascularInvasion} not valid for Schema ID: ${untrimmedline.schemaId}')
}
else {
if (dx_year >= 2018) {
if (functions.GEN_AT(untrimmedline.lymphVascularInvasion, "8") != 0)
return true
else
functions.GEN_SAVE_ERROR_TEXT(binding, 'Lymphovascular Invasion: ${untrimmedline.lymphVascularInvasion} not valid for Schema ID: ${untrimmedline.schemaId}')
}
}
}
if (functions.GEN_AT(code, ID2, 6) == 0 && functions.GEN_AT(code, ID1, 6) == 0) {
if (functions.GEN_AT(untrimmedline.lymphVascularInvasion, "0123489", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, name)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Lymphovascular Invasion: ${untrimmedline.lymphVascularInvasion} not valid for Schema ID: ${untrimmedline.schemaId}')
}
}
return true
}
// ID: NAACCR-02304; TAG: N2958; NAME: Measured Basal Diameter, Schema ID, Required (NAACCR)
public boolean naaccr02304(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.schemaId))
return true
if (functions.GEN_AT(untrimmedline.typeOfReportingSource, "7") != 0)
return true
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))
return true
if (dx_year < 2018)
return true
char[] ID = new char[14]
char[] code = new char[7]
functions.GEN_STRCPY(ID, "00671 00672 ")
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, ID, 6) != 0) {
if (functions.GEN_EMPTY(untrimmedline.measuredBasalDiameter) || functions.GEN_AT(untrimmedline.measuredBasalDiameter, "XX.8") != 0)
return false
}
return true
}
// ID: NAACCR-02305; TAG: N2959; NAME: Measured Thickness, Schema ID, Required (NAACCR)
public boolean naaccr02305(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.schemaId))
return true
if (functions.GEN_AT(untrimmedline.typeOfReportingSource, "7") != 0)
return true
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))
return true
if (dx_year < 2018)
return true
char[] ID = new char[20]
char[] code = new char[7]
functions.GEN_STRCPY(ID, "00660 00671 00672 ")
functions.GEN_STRCPY(code, untrimmedline.schemaId)
functions.GEN_STRCAT(code, " ")
if (functions.GEN_AT(code, ID, 6) != 0) {
if (functions.GEN_EMPTY(untrimmedline.measuredThickness) || functions.GEN_AT(untrimmedline.measuredThickness, "XX.8") != 0)
return false
}
return true
}
// ID: NAACCR-02306; TAG: N4900; NAME: Summary Stage 2018, Schema ID (NAACCR)
public boolean naaccr02306(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] SCHEMA_ID = new char[6], SCHEMA_NAME = new char[31], SS2018 = new char[2]
int dx_year
char[] group_SS2018 = new char[10]
char[] name = new char[50]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId))
return true
if (functions.GEN_EMPTY(untrimmedline.summaryStage2018)) {
return true
}
if (functions.GEN_SQLLOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SCHEMA_ID_NAMES, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SCHEMA_ID_NAMES_SCHEMA_ID, untrimmedline.schemaId, ['SCHEMA_ID':SCHEMA_ID, 'SCHEMA_NAME':SCHEMA_NAME]))
functions.GEN_STRCPY(name, "Schema ID ")
functions.GEN_STRCAT(name, untrimmedline.schemaId)
functions.GEN_STRCAT(name, ": ")
functions.GEN_STRCAT(name, functions.GEN_TRIM(SCHEMA_NAME, ((Integer)context.NAACCR_GEN_RIGHT)))
functions.GEN_STRCPY(group_SS2018, untrimmedline.schemaId)
functions.GEN_STRCAT(group_SS2018, untrimmedline.summaryStage2018)
if (!functions.GEN_SQLLOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SUMST2018, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SUMST2018_SCHEMA_IDSS2018, group_SS2018, ['SCHEMA_ID':SCHEMA_ID, 'SS2018':SS2018])) {
functions.GEN_SAVE_TEXT(binding, name)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Summary Stage 2018: ${untrimmedline.summaryStage2018} not valid for Schema ID: ${untrimmedline.schemaId}')
}
return true
}
// ID: NAACCR-02307; TAG: N4901; NAME: AJCC TNM Path, AJCC TNM Clin (COC)
public boolean naaccr02307(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "08") == 0)
return true
if (functions.GEN_EMPTY(untrimmedline.ajccTnmPathT) && functions.GEN_EMPTY(untrimmedline.ajccTnmPathN))
return true
char[] t_code = new char[16]
char[] n_code = new char[16]
functions.GEN_STRCPY(t_code, functions.GEN_TRIM(untrimmedline.ajccTnmPathT, ((Integer)context.NAACCR_GEN_RIGHT)))
functions.GEN_STRCPY(n_code, functions.GEN_TRIM(untrimmedline.ajccTnmPathN, ((Integer)context.NAACCR_GEN_RIGHT)))
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinT)) {
if (functions.GEN_STRCMP(t_code, "c", 1) == 0 && functions.GEN_STRCMP(untrimmedline.ajccTnmClinT, "c", 1) == 0) {
if (functions.GEN_STRCMP(t_code, functions.GEN_TRIM(untrimmedline.ajccTnmClinT, ((Integer)context.NAACCR_GEN_RIGHT))) != 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'AJCC TNM Clin and Path categories must be equal when "c" prefix assigned to both categories')
}
}
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinN)) {
if (functions.GEN_STRCMP(n_code, "c", 1) == 0 && functions.GEN_STRCMP(untrimmedline.ajccTnmClinN, "c", 1) == 0) {
if (functions.GEN_STRCMP(n_code, functions.GEN_TRIM(untrimmedline.ajccTnmClinN, ((Integer)context.NAACCR_GEN_RIGHT))) != 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'AJCC TNM Clin and Path categories must be equal when "c" prefix assigned to both categories')
}
}
return true
}
// ID: NAACCR-02308; TAG: N4902; NAME: TNM Clin Staged By, Date of Diagnosis (COC)
public boolean naaccr02308(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY))
return true
if (dx_year > 2015 && dx_year < 2018) {
if (functions.GEN_EMPTY(untrimmedline.tnmClinStagedBy))
return false
}
return true
}
// ID: NAACCR-02309; TAG: N4903; NAME: TNM Items, DX Post 2017 (NAACCR)
public boolean naaccr02309(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
err_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 > 2017) {
if (!functions.GEN_EMPTY(untrimmedline.tnmClinT)) {
functions.GEN_SAVE_TEXT(binding, 'If DX >2017, TNM Clin T must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tnmClinN)) {
functions.GEN_SAVE_TEXT(binding, 'If DX >2017, TNM Clin N must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tnmClinM)) {
functions.GEN_SAVE_TEXT(binding, 'If DX >2017, TNM Clin M must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tnmClinStageGroup)) {
functions.GEN_SAVE_TEXT(binding, 'If DX >2017, TNM Clin Stage Group must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tnmClinDescriptor)) {
functions.GEN_SAVE_TEXT(binding, 'If DX >2017, TNM Clin Descriptor must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tnmPathT)) {
functions.GEN_SAVE_TEXT(binding, 'If DX >2017, TNM Path T must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tnmPathN)) {
functions.GEN_SAVE_TEXT(binding, 'If DX >2017, TNM Path N must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tnmPathM)) {
functions.GEN_SAVE_TEXT(binding, 'If DX >2017, TNM Path M must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tnmPathStageGroup)) {
functions.GEN_SAVE_TEXT(binding, 'If DX >2017, TNM Path Stage Group must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tnmPathDescriptor)) {
functions.GEN_SAVE_TEXT(binding, 'If DX >2017, TNM Path Descriptor must be blank')
err_flag = 1
}
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02310; TAG: N4904; NAME: Derived EOD 2018, Date of DX (SEER)
public boolean naaccr02310(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
int err_flag
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 < 2018) {
if (!functions.GEN_EMPTY(untrimmedline.derivedEod2018T) || !functions.GEN_EMPTY(untrimmedline.derivedEod2018N) || !functions.GEN_EMPTY(untrimmedline.derivedEod2018M) || !functions.GEN_EMPTY(untrimmedline.derivedEod2018StageGroup))
return false
}
return true
}
// ID: NAACCR-02311; TAG: N4905; NAME: RX Date Mst Defn Srg, Date Flag, Date DX, CoC Flag (SEER)
public boolean naaccr02311(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (dx_year > 2017 && functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") != 0) {
if (functions.GEN_EMPTY(untrimmedline.rxDateMostDefinSurg) && functions.GEN_EMPTY(untrimmedline.rxDateMostDefinSurgFlag))
return false
}
return true
}
// ID: NAACCR-02312; TAG: N4906; NAME: Summary Stage 2000, Date of Diagnosis (SEER)
public boolean naaccr02312(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (dx_year == 2016 || dx_year == 2017) {
if (functions.GEN_EMPTY(untrimmedline.seerSummaryStage2000) && functions.GEN_EMPTY(untrimmedline.derivedSs2000))
return functions.GEN_ERROR_MSG(binding, 'If Year of Date of Diagnosis = ${untrimmedline.dateOfDiagnosis.formatDate()}, then either SEER Summary Stage 2000 or Derived SS2000 must not be blank')
}
if (dx_year >= 2018) {
if (!functions.GEN_EMPTY(untrimmedline.seerSummaryStage2000))
return functions.GEN_ERROR_MSG(binding, 'If year of Date of Diagnosis >= 2018, then SEER Summary Stage 2000 must be blank')
}
return true
}
// ID: NAACCR-02313; TAG: N4907; NAME: AJCC TNM, TNM Edition Number, AJCC ID (SEER)
public boolean naaccr02313(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018) {
return true
}
if (functions.GEN_EMPTY(untrimmedline.tnmEditionNumber)) {
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinT) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinN) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinM) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinStageGroup) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathT) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathN) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathM) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathStageGroup) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinT) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinN) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinM) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyT) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyN) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyM) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyStageGroup) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyNSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'IF TNM Edition Number = blank, all AJCC TNM data items must be blank')
}
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "0809", 2) != 0) {
if ((functions.GEN_INLIST(untrimmedline.ajccTnmClinStageGroup, "88") && !functions.GEN_INLIST(untrimmedline.ajccId, "14,16.3,18.2,38.2,38.3,40,42,45,65,66,67.1,69,70") && !functions.GEN_INLIST(untrimmedline.ajccId, "71,72,75,81.2,82.1,82.2,83.0,83.1,83.2,83.3,83.4")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPathStageGroup, "88") && !functions.GEN_INLIST(untrimmedline.ajccId, "14,16.3,18.2,38.2,38.3,40,42,45,65,66,67.1,69,70") && !functions.GEN_INLIST(untrimmedline.ajccId, "71,72,75,81.1,81.2,82.1,82.2,83.0,83.1,83.2,83.3,83.4")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyStageGroup, "88") && !functions.GEN_INLIST(untrimmedline.ajccId, "14,16.3,18.2,38.2,38.3,40,42,45,65,66,67.1,69,70,48.1,48.2,71,72,75,") && !functions.GEN_INLIST(untrimmedline.ajccId, "79.0,79.1,79.2,79.3,79.4,79.5,79.6,79.7,81.1,81.2,82.1,82.2,83.0,83.1,83.2,83.3,83.4")) || (functions.GEN_INLIST(untrimmedline.ajccTnmClinT, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,82,83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmClinN, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,56,72,79,82,83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmClinM, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,82,83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPathT, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPathN, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,56,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPathM, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83,")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyT, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyN, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,56,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyM, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinT, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinN, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,56,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinM, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")))
functions.GEN_SAVE_ERROR_TEXT(binding, 'If TNM Edition Number = 08 or 09, AJCC TNM fields must indicate staging assigned')
}
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "88") != 0) {
if (!functions.GEN_INLIST(untrimmedline.ajccTnmClinT, "88") || !functions.GEN_INLIST(untrimmedline.ajccTnmClinN, "88") || !functions.GEN_INLIST(untrimmedline.ajccTnmClinM, "88") || !functions.GEN_INLIST(untrimmedline.ajccTnmClinStageGroup, "88") || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathT) && !functions.GEN_INLIST(untrimmedline.ajccTnmPathT, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathN) && !functions.GEN_INLIST(untrimmedline.ajccTnmPathN, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathM) && !functions.GEN_INLIST(untrimmedline.ajccTnmPathM, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathStageGroup) && !functions.GEN_INLIST(untrimmedline.ajccTnmPathStageGroup, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyT) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyT, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyN) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyN, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyM) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyM, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyStageGroup) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyStageGroup, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinT) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinT, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinN) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinN, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinM) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinM, "88")) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinNSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'if TNM Edition Number = 88, AJCC TNM fields must indicate no staging applicable')
}
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "00") != 0) {
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinT) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinN) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinM) || !functions.GEN_INLIST(untrimmedline.ajccTnmClinStageGroup, "99") || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathT) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathN) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathM) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathStageGroup) && !functions.GEN_INLIST(untrimmedline.ajccTnmPathStageGroup, "99")) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyT) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyN) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyM) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyStageGroup) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyStageGroup, "99")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinT) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinT, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinN) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinN, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinM) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinM, "88")) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyNSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'If TNM Edition Number = 00, all AJCC TNM fields must indicate no staging assigned')
}
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "09") != 0) {
if (functions.GEN_AT(functions.GEN_TRIM(untrimmedline.ajccId, ((Integer)context.NAACCR_GEN_RIGHT)), "52") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'TNM Edition Number: ${untrimmedline.tnmEditionNumber} is valid only for AJCC ID 53, Cervix Uteri')
}
return true
}
// ID: NAACCR-02314; TAG: N4909; NAME: Lymphovascular Invasion (SEER)
public boolean naaccr02314(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.lymphVascularInvasion))
return true
if (functions.GEN_AT(untrimmedline.lymphVascularInvasion, "0123489", 1) == 0)
return false
return true
}
// ID: NAACCR-02315; TAG: N4910; NAME: Derived Summary Stage 2018, Schema ID (SEER)
public boolean naaccr02315(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] SCHEMA_ID = new char[6], SCHEMA_NAME = new char[31], SS2018 = new char[2]
int dx_year
char[] group_SS2018 = new char[10]
char[] name = new char[50]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId))
return true
if (functions.GEN_EMPTY(untrimmedline.derivedSummaryStage2018)) {
return true
}
if (functions.GEN_SQLLOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SCHEMA_ID_NAMES, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SCHEMA_ID_NAMES_SCHEMA_ID, untrimmedline.schemaId, ['SCHEMA_ID':SCHEMA_ID, 'SCHEMA_NAME':SCHEMA_NAME]))
functions.GEN_STRCPY(name, "Schema ")
functions.GEN_STRCAT(name, untrimmedline.schemaId)
functions.GEN_STRCAT(name, ": ")
functions.GEN_STRCAT(name, functions.GEN_TRIM(SCHEMA_NAME, ((Integer)context.NAACCR_GEN_RIGHT)))
functions.GEN_STRCPY(group_SS2018, untrimmedline.schemaId)
functions.GEN_STRCAT(group_SS2018, untrimmedline.derivedSummaryStage2018)
if (!functions.GEN_SQLLOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SUMST2018, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SUMST2018_SCHEMA_IDSS2018, group_SS2018, ['SCHEMA_ID':SCHEMA_ID, 'SS2018':SS2018])) {
functions.GEN_SAVE_TEXT(binding, name)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Derived Summary Stage 2018: ${untrimmedline.derivedSummaryStage2018} not valid for Schema ID: ${untrimmedline.schemaId}')
}
return true
}
// ID: NAACCR-02316; TAG: N4911; NAME: Histologic Type ICDO3, Primary Site, Date of Diagnosis (NAACCR)
public boolean naaccr02316(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] Group = new char[2], SITE_LOW = new char[5], SITE_HIGH = new char[5], HISTO_USE = new char[5], NOT_USE = new char[5]
char[] SITE_USE = new char[15]
char[] SITE_NO = new char[15]
char[] message = new char[100]
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year < 2018 || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY))
return true
if (functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
if (dx_year >= 2018) {
if (functions.GEN_AT(untrimmedline.primarySite, "C739") != 0) {
if (functions.GEN_AT(untrimmedline.histologicTypeIcdO3, "8510") != 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3} is not valid for Primary Site: ${untrimmedline.primarySite} for Date of Diagnosis >= 2018')
}
if (functions.GEN_AT(untrimmedline.histologicTypeIcdO3, "8550", 4) != 0) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "340-349", "(C\\d\\d\\d)", 2, 3))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3} is not valid for Primary Site: ${untrimmedline.primarySite} for Date of Diagnosis >= 2018')
}
}
if (dx_year >= 2019) {
if (functions.GEN_AT(untrimmedline.histologicTypeIcdO3, "8253825482568257", 4) != 0) {
if (!functions.GEN_INLIST(untrimmedline.primarySite, "340-349", "(C\\d\\d\\d)", 2, 3))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3} is not valid for Primary Site: ${untrimmedline.primarySite} for Date of Diagnosis >= 2019')
}
if (functions.GEN_AT(untrimmedline.histologicTypeIcdO3, "9150") != 0) {
if (functions.GEN_AT(untrimmedline.gradeClinical, "4") != 0 || functions.GEN_AT(untrimmedline.gradePathological, "4") != 0) {
return true
}
}
if (functions.GEN_SQLRANGELOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SOLID_TUMOR_RULES, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SOLID_TUMOR_RULES_SITE_LOW, untrimmedline.primarySite, ['GROUP':Group, 'SITE_LOW':SITE_LOW, 'SITE_HIGH':SITE_HIGH, 'HISTO_USE':HISTO_USE, 'NOT_USE':NOT_USE])) {
if (functions.GEN_STRCMP(untrimmedline.primarySite, SITE_LOW) >= 0 && functions.GEN_STRCMP(untrimmedline.primarySite, SITE_HIGH) <= 0) {
functions.GEN_STRCPY(SITE_USE, SITE_LOW)
functions.GEN_STRCAT(SITE_USE, SITE_HIGH)
functions.GEN_STRCAT(SITE_USE, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(SITE_NO, SITE_LOW)
functions.GEN_STRCAT(SITE_NO, SITE_HIGH)
functions.GEN_STRCAT(SITE_NO, untrimmedline.histologicTypeIcdO3)
}
if (functions.GEN_SQLRANGELOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SOLID_TUMOR_RULES, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SOLID_TUMOR_RULES_SITE_LOWSITE_HIGHHISTO_USE, SITE_USE, ['GROUP':Group, 'SITE_LOW':SITE_LOW, 'SITE_HIGH':SITE_HIGH, 'HISTO_USE':HISTO_USE, 'NOT_USE':NOT_USE])) {
if (functions.GEN_STRCMP(untrimmedline.primarySite, SITE_LOW) >= 0 && functions.GEN_STRCMP(untrimmedline.primarySite, SITE_HIGH) <= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTO_USE) == 0)
return true
else {
if (functions.GEN_SQLRANGELOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SOLID_TUMOR_RULES, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SOLID_TUMOR_RULES_SITE_LOWSITE_HIGHNOT_USE, SITE_NO, ['GROUP':Group, 'SITE_LOW':SITE_LOW, 'SITE_HIGH':SITE_HIGH, 'HISTO_USE':HISTO_USE, 'NOT_USE':NOT_USE])) {
if (functions.GEN_STRCMP(untrimmedline.primarySite, SITE_LOW) >= 0 && functions.GEN_STRCMP(untrimmedline.primarySite, SITE_HIGH) <= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, NOT_USE) == 0) {
functions.GEN_STRCPY(message, HISTO_USE)
functions.GEN_STRCAT(message, " is preferred over ")
functions.GEN_STRCAT(message, NOT_USE)
functions.GEN_STRCAT(message, " for ")
functions.GEN_STRCAT(message, untrimmedline.primarySite)
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-02317; TAG: N4912; NAME: Grade Path, Grade Post Therapy, Post Therapy Stage (NAACCR)
public boolean naaccr02317(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY) || dx_year < 2018)
return true
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "0088", 2) != 0)
return true
if (functions.GEN_EMPTY(untrimmedline.tnmEditionNumber))
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00790007950081100812008210082200830", 5) != 0)
return true
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyStageGroup) && (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyT) && functions.GEN_AT(functions.GEN_TRIM(untrimmedline.ajccTnmPostTherapyT, ((Integer)context.NAACCR_GEN_RIGHT)), "88") == 0)) {
if (functions.GEN_AT(untrimmedline.gradePathological, "9") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Grade Pathological must = 9 if AJCC TNM Post Therapy Path (yp) Stage Group is not blank and AJCC TNM Post Therapy Path (yp) T not blank and not = 88')
if (functions.GEN_EMPTY(untrimmedline.gradePostTherapy))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Conflict between Grade Post Therapy Path (yp): ${untrimmedline.gradePostTherapy} and AJCC TNM Post Therapy Path (yp) Stage Group: ${untrimmedline.ajccTnmPostTherapyStageGroup}')
}
if (functions.GEN_AT(functions.GEN_TRIM(untrimmedline.ajccTnmPostTherapyT, ((Integer)context.NAACCR_GEN_RIGHT)), "ypT0") != 0 && functions.GEN_AT(untrimmedline.ajccId, "48.148.2", 4) == 0) {
if (functions.GEN_AT(untrimmedline.gradePostTherapy, "9") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Conflict between Grade Post Therapy Path (yp): ${untrimmedline.gradePostTherapy} and AJCC TNM Post Therapy Path (yp) T: ${untrimmedline.ajccTnmPostTherapyT}')
}
if (functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyStageGroup) && (functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyT) || functions.GEN_AT(functions.GEN_TRIM(untrimmedline.ajccTnmPostTherapyT, ((Integer)context.NAACCR_GEN_RIGHT)), "88") != 0)) {
if (!functions.GEN_EMPTY(untrimmedline.gradePostTherapy))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Conflict between Grade Post Therapy Path (yp): ${untrimmedline.gradePostTherapy} and AJCC TNM Post Therapy Path (yp) Stage Group: ${untrimmedline.ajccTnmPostTherapyStageGroup}')
}
return true
}
// ID: NAACCR-02319; TAG: N4914; NAME: Grade Path, Grade Post Therapy (NAACCR)
public boolean naaccr02319(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year == ((Integer)context.NAACCR_GEN_DT_EMPTY) || dx_year < 2018)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00790007950081100812008210082200830", 5) != 0)
return true
if (!functions.GEN_EMPTY(untrimmedline.gradePostTherapy)) {
if (functions.GEN_AT(untrimmedline.gradePathological, "9") == 0)
return false
}
return true
}
// ID: NAACCR-02323; TAG: N3967; NAME: NPCR Derived AJCC 8 TNM, Date of Diagnosis (NPCR)
public boolean naaccr02323(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (dx_year < 2020) {
if (!functions.GEN_EMPTY(untrimmedline.npcrDerivedAjcc8TnmClinStgGrp) || !functions.GEN_EMPTY(untrimmedline.npcrDerivedAjcc8TnmPathStgGrp) || !functions.GEN_EMPTY(untrimmedline.npcrDerivedAjcc8TnmPostStgGrp))
return false
}
return true
}
// ID: NAACCR-02324; TAG: N2828; NAME: Radiation Phases, Date DX (COC)
public boolean naaccr02324(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (dx_year > 2017) {
if (functions.GEN_EMPTY(untrimmedline.numberPhasesOfRadTxToVolume))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Number of Phases of Rad Treatment to This Volume must be reported for diagnosis date 2018+')
if (functions.GEN_EMPTY(untrimmedline.phase1RadiationPrimaryTxVolume))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Phase I Radiation Primary Treatment Volume must be reported for diagnosis date 2018+')
if (functions.GEN_EMPTY(untrimmedline.totalDose))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Total Dose must be reported for diagnosis date 2018+')
if (functions.GEN_EMPTY(untrimmedline.radiationTxDiscontinuedEarly))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Radiation Treatment Discontinued Early must be reported for diagnosis date 2018+')
}
return true
}
// ID: NAACCR-02325; TAG: N4918; NAME: PhI, II, III Radiation Primary Treatment Volume (COC)
public boolean naaccr02325(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.phase1RadiationPrimaryTxVolume) && functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume) && functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume))
return true
if (!functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume)) {
if (functions.GEN_EMPTY(untrimmedline.phase1RadiationPrimaryTxVolume))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Phase I Radiation Primary Treatment Volume: ${untrimmedline.phase1RadiationPrimaryTxVolume} conflicts with Phase II Radiation Primary Treatment Volume: ${untrimmedline.phase2RadiationPrimaryTxVolume}')
}
if (functions.GEN_AT(untrimmedline.phase1RadiationPrimaryTxVolume, "00", 2) != 0) {
if (functions.GEN_AT(untrimmedline.phase2RadiationPrimaryTxVolume, "00") == 0 && !functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Phase I Radiation Primary Treatment Volume: ${untrimmedline.phase1RadiationPrimaryTxVolume} conflicts with Phase II Radiation Primary Treatment Volume: ${untrimmedline.phase2RadiationPrimaryTxVolume}')
}
if (!functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume)) {
if (functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Phase II Radiation Primary Treatment Volume: ${untrimmedline.phase2RadiationPrimaryTxVolume} conflicts with Phase III Radiation Primary Treatment Volume: ${untrimmedline.phase3RadiationPrimaryTxVolume}')
}
if (functions.GEN_AT(untrimmedline.phase2RadiationPrimaryTxVolume, "00", 2) != 0) {
if (functions.GEN_AT(untrimmedline.phase3RadiationPrimaryTxVolume, "00") == 0 && !functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Phase II Radiation Primary Treatment Volume: ${untrimmedline.phase2RadiationPrimaryTxVolume} conflicts with Phase III Radiation Primary Treatment Volume: ${untrimmedline.phase3RadiationPrimaryTxVolume}')
}
return true
}
// ID: NAACCR-02326; TAG: N4921; NAME: TNM Edition Number (SEER)
public boolean naaccr02326(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.tnmEditionNumber))
return true
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "000102030405060708098899U7", 2) == 0)
return false
return true
}
// ID: NAACCR-02327; TAG: N2565; NAME: Reason for No Radiation, PhI, II, III Radiation (COC)
public boolean naaccr02327(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.reasonForNoRadiation))
return true
if (functions.GEN_EMPTY(untrimmedline.phase1RadiationPrimaryTxVolume))
return true
if (functions.GEN_AT(untrimmedline.reasonForNoRadiation, "0") != 0) {
if (!functions.GEN_INLIST(untrimmedline.phase1RadiationPrimaryTxVolume, "01-99"))
return false
}
if (functions.GEN_AT(untrimmedline.reasonForNoRadiation, "12567", 1) != 0) {
if (functions.GEN_AT(untrimmedline.phase1RadiationPrimaryTxVolume, "00") != 0 && (functions.GEN_AT(untrimmedline.phase2RadiationPrimaryTxVolume, "00") != 0 || functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume)) && (functions.GEN_AT(untrimmedline.phase3RadiationPrimaryTxVolume, "00") != 0 || functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume)))
return true
else
return false
}
if (functions.GEN_AT(untrimmedline.reasonForNoRadiation, "8", 1) != 0) {
if (functions.GEN_AT(untrimmedline.phase1RadiationPrimaryTxVolume, "0099", 2) != 0 && (functions.GEN_AT(untrimmedline.phase2RadiationPrimaryTxVolume, "0099", 2) != 0 || functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume)) && (functions.GEN_AT(untrimmedline.phase3RadiationPrimaryTxVolume, "0099", 2) != 0 || functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume)))
return true
else
return false
}
if (functions.GEN_AT(untrimmedline.reasonForNoRadiation, "9", 1) != 0) {
if (functions.GEN_AT(untrimmedline.phase1RadiationPrimaryTxVolume, "99") != 0 && (functions.GEN_EMPTY(untrimmedline.phase1RadiationTreatmentModality) || functions.GEN_AT(untrimmedline.phase1RadiationTreatmentModality, "99") != 0) && functions.GEN_EMPTY(untrimmedline.phase1RadiationToDrainingLN) && functions.GEN_EMPTY(untrimmedline.phase1RadiationExternalBeamTech) && functions.GEN_EMPTY(untrimmedline.phase1DosePerFraction) && functions.GEN_EMPTY(untrimmedline.phase1NumberOfFractions) && functions.GEN_EMPTY(untrimmedline.phase1TotalDose) && (functions.GEN_AT(untrimmedline.phase2RadiationPrimaryTxVolume, "99") != 0 || functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume)) && (functions.GEN_AT(untrimmedline.phase3RadiationPrimaryTxVolume, "99") != 0 || functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume)))
return true
else {
if (functions.GEN_AT(untrimmedline.phase1RadiationPrimaryTxVolume, "99") != 0 && functions.GEN_AT(untrimmedline.phase1RadiationTreatmentModality, "99") != 0 && functions.GEN_AT(untrimmedline.phase1RadiationToDrainingLN, "99") != 0 && functions.GEN_AT(untrimmedline.phase1RadiationExternalBeamTech, "99") != 0 && functions.GEN_AT(untrimmedline.phase1DosePerFraction, "99999") != 0 && functions.GEN_AT(untrimmedline.phase1NumberOfFractions, "999") != 0 && functions.GEN_AT(untrimmedline.phase1TotalDose, "999999") != 0 && (functions.GEN_AT(untrimmedline.phase2RadiationPrimaryTxVolume, "99") != 0 || functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume)) && (functions.GEN_AT(untrimmedline.phase3RadiationPrimaryTxVolume, "99") != 0 || functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume)))
return true
else
return false
}
}
return true
}
// ID: NAACCR-02328; TAG: N2562; NAME: Number of Phases of Radiation, PhI, II, III Radiation Phase (COC)
public boolean naaccr02328(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
char[] radiation_msg = new char[100]
if (functions.GEN_EMPTY(untrimmedline.numberPhasesOfRadTxToVolume))
return true
if (functions.GEN_EMPTY(untrimmedline.phase1RadiationPrimaryTxVolume))
return true
if (functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "00", 2) != 0) {
if (functions.GEN_AT(untrimmedline.phase1RadiationPrimaryTxVolume, "00") != 0 && (functions.GEN_AT(untrimmedline.phase2RadiationPrimaryTxVolume, "00") != 0 || functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume)) && (functions.GEN_AT(untrimmedline.phase3RadiationPrimaryTxVolume, "00") != 0 || functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume)))
return true
else
functions.GEN_SAVE_ERROR_TEXT(binding, 'Number of Phases of Rad Treatment to This Volume: ${untrimmedline.numberPhasesOfRadTxToVolume} conflicts with Phase I Radiation Primary Treatment Volume: ${untrimmedline.phase1RadiationPrimaryTxVolume}, Phase II Radiation Primary Treatment Volume: ${untrimmedline.phase2RadiationPrimaryTxVolume}, and Phase III Radiation Primary Treatment Volume: ${untrimmedline.phase3RadiationPrimaryTxVolume}')
}
if (functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "01", 2) != 0) {
if (functions.GEN_INLIST(untrimmedline.phase1RadiationPrimaryTxVolume, "01-99") && (functions.GEN_AT(untrimmedline.phase2RadiationPrimaryTxVolume, "00") != 0 || functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume)) && (functions.GEN_AT(untrimmedline.phase3RadiationPrimaryTxVolume, "00") != 0 || functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume)))
return true
else {
functions.GEN_STRCPY(radiation_msg, "Phase I radiation items are coded if 1 phase given")
functions.GEN_SAVE_TEXT(binding, radiation_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Number of Phases of Rad Treatment to This Volume: ${untrimmedline.numberPhasesOfRadTxToVolume} conflicts with Phase I Radiation Primary Treatment Volume: ${untrimmedline.phase1RadiationPrimaryTxVolume}, Phase II Radiation Primary Treatment Volume: ${untrimmedline.phase2RadiationPrimaryTxVolume}, and Phase III Radiation Primary Treatment Volume: ${untrimmedline.phase3RadiationPrimaryTxVolume}')
}
}
if (functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "02", 2) != 0) {
if ((functions.GEN_INLIST(untrimmedline.phase1RadiationPrimaryTxVolume, "01-99") && functions.GEN_INLIST(untrimmedline.phase2RadiationPrimaryTxVolume, "01-99") && functions.GEN_AT(untrimmedline.phase3RadiationPrimaryTxVolume, "00") != 0) || functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume))
return true
else {
functions.GEN_STRCPY(radiation_msg, "Phase I and II radiation items are coded if 2 phases given")
functions.GEN_SAVE_TEXT(binding, radiation_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Number of Phases of Rad Treatment to This Volume: ${untrimmedline.numberPhasesOfRadTxToVolume} conflicts with Phase I Radiation Primary Treatment Volume: ${untrimmedline.phase1RadiationPrimaryTxVolume}, Phase II Radiation Primary Treatment Volume: ${untrimmedline.phase2RadiationPrimaryTxVolume}, and Phase III Radiation Primary Treatment Volume: ${untrimmedline.phase3RadiationPrimaryTxVolume}')
}
}
if (functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "0304", 2) != 0) {
if (functions.GEN_INLIST(untrimmedline.phase1RadiationPrimaryTxVolume, "01-99") && functions.GEN_INLIST(untrimmedline.phase2RadiationPrimaryTxVolume, "01-99") && functions.GEN_INLIST(untrimmedline.phase3RadiationPrimaryTxVolume, "01-99"))
return true
else {
functions.GEN_STRCPY(radiation_msg, "Phase I, II, and III radiation items are coded if 3 or 4 phases given")
functions.GEN_SAVE_TEXT(binding, radiation_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Number of Phases of Rad Treatment to This Volume: ${untrimmedline.numberPhasesOfRadTxToVolume} conflicts with Phase I Radiation Primary Treatment Volume: ${untrimmedline.phase1RadiationPrimaryTxVolume}, Phase II Radiation Primary Treatment Volume: ${untrimmedline.phase2RadiationPrimaryTxVolume}, and Phase III Radiation Primary Treatment Volume: ${untrimmedline.phase3RadiationPrimaryTxVolume}')
}
}
return true
}
// ID: NAACCR-02329; TAG: N4917; NAME: Phase I Radiation (COC)
public boolean naaccr02329(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.phase1RadiationPrimaryTxVolume))
return true
if (functions.GEN_AT(untrimmedline.phase1RadiationPrimaryTxVolume, "00") != 0) {
if ((functions.GEN_EMPTY(untrimmedline.phase1RadiationTreatmentModality) || functions.GEN_AT(untrimmedline.phase1RadiationTreatmentModality, "00") != 0) && functions.GEN_EMPTY(untrimmedline.phase1RadiationToDrainingLN) && functions.GEN_EMPTY(untrimmedline.phase1RadiationExternalBeamTech) && functions.GEN_EMPTY(untrimmedline.phase1DosePerFraction) && functions.GEN_EMPTY(untrimmedline.phase1NumberOfFractions) && functions.GEN_EMPTY(untrimmedline.phase1TotalDose) && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "00") != 0 && functions.GEN_AT(untrimmedline.radiationTxDiscontinuedEarly, "00") != 0 && functions.GEN_AT(untrimmedline.totalDose, "000000") != 0)
return true
else {
if (functions.GEN_AT(untrimmedline.phase1RadiationTreatmentModality, "00") == 0 || functions.GEN_AT(untrimmedline.phase1RadiationToDrainingLN, "00") == 0 || functions.GEN_AT(untrimmedline.phase1RadiationExternalBeamTech, "00") == 0 || functions.GEN_AT(untrimmedline.phase1DosePerFraction, "00000") == 0 || functions.GEN_AT(untrimmedline.phase1NumberOfFractions, "000") == 0 || functions.GEN_AT(untrimmedline.phase1TotalDose, "000000") == 0 || functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "00", 2) == 0 || functions.GEN_AT(untrimmedline.radiationTxDiscontinuedEarly, "00") == 0 || functions.GEN_AT(untrimmedline.totalDose, "000000") == 0)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.phase1RadiationPrimaryTxVolume, "01-98")) {
if (!functions.GEN_INLIST(untrimmedline.phase1RadiationTreatmentModality, "01-16,98") || !functions.GEN_INLIST(untrimmedline.phase1RadiationToDrainingLN, "00-08, 88, 99") || !functions.GEN_INLIST(untrimmedline.phase1RadiationExternalBeamTech, "01-10, 88, 98") || !functions.GEN_INLIST(untrimmedline.phase1DosePerFraction, "00001-99999") || !functions.GEN_INLIST(untrimmedline.phase1NumberOfFractions, "001-999") || !functions.GEN_INLIST(untrimmedline.phase1TotalDose, "000001-999999") || !functions.GEN_INLIST(untrimmedline.numberPhasesOfRadTxToVolume, "01-04,99") || !functions.GEN_INLIST(untrimmedline.radiationTxDiscontinuedEarly, "01-99") || !functions.GEN_INLIST(untrimmedline.totalDose, "000001-999999"))
return false
}
if (functions.GEN_AT(untrimmedline.phase1RadiationPrimaryTxVolume, "99", 2) != 0) {
if ((functions.GEN_EMPTY(untrimmedline.phase1RadiationTreatmentModality) || functions.GEN_AT(untrimmedline.phase1RadiationTreatmentModality, "99") != 0) && functions.GEN_EMPTY(untrimmedline.phase1RadiationToDrainingLN) && functions.GEN_EMPTY(untrimmedline.phase1RadiationExternalBeamTech) && functions.GEN_EMPTY(untrimmedline.phase1DosePerFraction) && functions.GEN_EMPTY(untrimmedline.phase1NumberOfFractions) && functions.GEN_EMPTY(untrimmedline.phase1TotalDose) && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "99") != 0 && functions.GEN_AT(untrimmedline.radiationTxDiscontinuedEarly, "99") != 0 && functions.GEN_AT(untrimmedline.totalDose, "999999") != 0)
return true
else {
if (functions.GEN_AT(untrimmedline.phase1RadiationTreatmentModality, "99") != 0 && functions.GEN_AT(untrimmedline.phase1RadiationToDrainingLN, "99") != 0 && functions.GEN_AT(untrimmedline.phase1RadiationExternalBeamTech, "99") != 0 && functions.GEN_AT(untrimmedline.phase1DosePerFraction, "99999") != 0 && functions.GEN_AT(untrimmedline.phase1NumberOfFractions, "999") != 0 && functions.GEN_AT(untrimmedline.phase1TotalDose, "999999") != 0 && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "99") != 0 && functions.GEN_AT(untrimmedline.radiationTxDiscontinuedEarly, "99") != 0 && functions.GEN_AT(untrimmedline.totalDose, "999999") != 0)
return true
else {
if (!functions.GEN_INLIST(untrimmedline.phase1RadiationTreatmentModality, "01-16,98") || !functions.GEN_INLIST(untrimmedline.phase1RadiationToDrainingLN, "00-08,99") || !functions.GEN_INLIST(untrimmedline.phase1RadiationExternalBeamTech, "01-10, 88, 98") || !functions.GEN_INLIST(untrimmedline.phase1DosePerFraction, "00001-99999") || !functions.GEN_INLIST(untrimmedline.phase1NumberOfFractions, "001-999") || !functions.GEN_INLIST(untrimmedline.phase1TotalDose, "000001-999999") || !functions.GEN_INLIST(untrimmedline.numberPhasesOfRadTxToVolume, "01-04,99") || !functions.GEN_INLIST(untrimmedline.radiationTxDiscontinuedEarly, "01-99") || !functions.GEN_INLIST(untrimmedline.totalDose, "000001-999999"))
return false
}
}
}
return true
}
// ID: NAACCR-02330; TAG: N4919; NAME: Phase II Radiation (COC)
public boolean naaccr02330(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.phase2RadiationPrimaryTxVolume)) {
if ((functions.GEN_EMPTY(untrimmedline.phase2RadiationTreatmentModality) || functions.GEN_AT(untrimmedline.phase2RadiationTreatmentModality, "0099", 2) != 0) && functions.GEN_EMPTY(untrimmedline.phase2RadiationToDrainingLN) && functions.GEN_EMPTY(untrimmedline.phase2RadiationExternalBeamTech) && functions.GEN_EMPTY(untrimmedline.phase2DosePerFraction) && functions.GEN_EMPTY(untrimmedline.phase2NumberOfFractions) && functions.GEN_EMPTY(untrimmedline.phase2TotalDose) && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "000199", 2) != 0)
return true
else
return false
}
if (functions.GEN_AT(untrimmedline.phase2RadiationPrimaryTxVolume, "00", 2) != 0) {
if ((functions.GEN_EMPTY(untrimmedline.phase2RadiationTreatmentModality) || functions.GEN_AT(untrimmedline.phase2RadiationTreatmentModality, "00") != 0) && functions.GEN_EMPTY(untrimmedline.phase2RadiationToDrainingLN) && functions.GEN_EMPTY(untrimmedline.phase2RadiationExternalBeamTech) && functions.GEN_EMPTY(untrimmedline.phase2DosePerFraction) && functions.GEN_EMPTY(untrimmedline.phase2NumberOfFractions) && functions.GEN_EMPTY(untrimmedline.phase2TotalDose) && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "0001", 2) != 0)
return true
else {
if (functions.GEN_AT(untrimmedline.phase2RadiationTreatmentModality, "00") == 0 || functions.GEN_AT(untrimmedline.phase2RadiationToDrainingLN, "00") == 0 || functions.GEN_AT(untrimmedline.phase2RadiationExternalBeamTech, "00") == 0 || functions.GEN_AT(untrimmedline.phase2DosePerFraction, "00000") == 0 || functions.GEN_AT(untrimmedline.phase2NumberOfFractions, "000") == 0 || functions.GEN_AT(untrimmedline.phase2TotalDose, "000000") == 0 || functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "0001", 2) == 0)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.phase2RadiationPrimaryTxVolume, "01-98")) {
if (!functions.GEN_INLIST(untrimmedline.phase2RadiationTreatmentModality, "01-16,98") || !functions.GEN_INLIST(untrimmedline.phase2RadiationToDrainingLN, "00-08, 88, 99") || !functions.GEN_INLIST(untrimmedline.phase2RadiationExternalBeamTech, "01-10, 88, 98") || !functions.GEN_INLIST(untrimmedline.phase2DosePerFraction, "00001-99999") || !functions.GEN_INLIST(untrimmedline.phase2NumberOfFractions, "001-999") || !functions.GEN_INLIST(untrimmedline.phase2TotalDose, "000001-999999") || functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "02030499", 2) == 0)
return false
}
if (functions.GEN_AT(untrimmedline.phase2RadiationPrimaryTxVolume, "99", 2) != 0) {
if ((functions.GEN_EMPTY(untrimmedline.phase2RadiationTreatmentModality) || functions.GEN_AT(untrimmedline.phase2RadiationTreatmentModality, "99") != 0) && functions.GEN_EMPTY(untrimmedline.phase2RadiationToDrainingLN) && functions.GEN_EMPTY(untrimmedline.phase2RadiationExternalBeamTech) && functions.GEN_EMPTY(untrimmedline.phase2DosePerFraction) && functions.GEN_EMPTY(untrimmedline.phase2NumberOfFractions) && functions.GEN_EMPTY(untrimmedline.phase2TotalDose) && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "99") != 0)
return true
else {
if (functions.GEN_AT(untrimmedline.phase2RadiationTreatmentModality, "99") != 0 && functions.GEN_AT(untrimmedline.phase2RadiationToDrainingLN, "99") != 0 && functions.GEN_AT(untrimmedline.phase2RadiationExternalBeamTech, "99") != 0 && functions.GEN_AT(untrimmedline.phase2DosePerFraction, "99999") != 0 && functions.GEN_AT(untrimmedline.phase2NumberOfFractions, "999") != 0 && functions.GEN_AT(untrimmedline.phase2TotalDose, "999999") != 0 && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "99") != 0)
return true
else {
if (!functions.GEN_INLIST(untrimmedline.phase2RadiationTreatmentModality, "01-16,98") || !functions.GEN_INLIST(untrimmedline.phase2RadiationToDrainingLN, "00-08,99") || !functions.GEN_INLIST(untrimmedline.phase2RadiationExternalBeamTech, "01-10, 88, 98") || !functions.GEN_INLIST(untrimmedline.phase2DosePerFraction, "00001-99999") || !functions.GEN_INLIST(untrimmedline.phase2NumberOfFractions, "001-999") || !functions.GEN_INLIST(untrimmedline.phase2TotalDose, "000001-999999") || functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "02030499", 2) == 0)
return false
}
}
}
return true
}
// ID: NAACCR-02331; TAG: N4920; NAME: Phase III Radiation (COC)
public boolean naaccr02331(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.phase3RadiationPrimaryTxVolume)) {
if ((functions.GEN_EMPTY(untrimmedline.phase3RadiationTreatmentModality) || functions.GEN_AT(untrimmedline.phase3RadiationTreatmentModality, "0099", 2) != 0) && functions.GEN_EMPTY(untrimmedline.phase3RadiationToDrainingLN) && functions.GEN_EMPTY(untrimmedline.phase3RadiationExternalBeamTech) && functions.GEN_EMPTY(untrimmedline.phase3DosePerFraction) && functions.GEN_EMPTY(untrimmedline.phase3NumberOfFractions) && functions.GEN_EMPTY(untrimmedline.phase3TotalDose) && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "00010299", 2) != 0)
return true
else
return false
}
if (functions.GEN_AT(untrimmedline.phase3RadiationPrimaryTxVolume, "00", 2) != 0) {
if ((functions.GEN_EMPTY(untrimmedline.phase3RadiationTreatmentModality) || functions.GEN_AT(untrimmedline.phase3RadiationTreatmentModality, "00") != 0) && functions.GEN_EMPTY(untrimmedline.phase3RadiationToDrainingLN) && functions.GEN_EMPTY(untrimmedline.phase3RadiationExternalBeamTech) && functions.GEN_EMPTY(untrimmedline.phase3DosePerFraction) && functions.GEN_EMPTY(untrimmedline.phase3NumberOfFractions) && functions.GEN_EMPTY(untrimmedline.phase3TotalDose) && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "000102", 2) != 0)
return true
else {
if (functions.GEN_AT(untrimmedline.phase3RadiationTreatmentModality, "00") == 0 || functions.GEN_AT(untrimmedline.phase3RadiationToDrainingLN, "00") == 0 || functions.GEN_AT(untrimmedline.phase3RadiationExternalBeamTech, "00") == 0 || functions.GEN_AT(untrimmedline.phase3DosePerFraction, "00000") == 0 || functions.GEN_AT(untrimmedline.phase3NumberOfFractions, "000") == 0 || functions.GEN_AT(untrimmedline.phase3TotalDose, "000000") == 0 || functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "000102", 2) == 0)
return false
}
}
if (functions.GEN_INLIST(untrimmedline.phase3RadiationPrimaryTxVolume, "01-98")) {
if (!functions.GEN_INLIST(untrimmedline.phase3RadiationTreatmentModality, "01-16,98") || !functions.GEN_INLIST(untrimmedline.phase3RadiationToDrainingLN, "00-08, 88, 99") || !functions.GEN_INLIST(untrimmedline.phase3RadiationExternalBeamTech, "01-10, 88, 98") || !functions.GEN_INLIST(untrimmedline.phase3DosePerFraction, "00001-99999") || !functions.GEN_INLIST(untrimmedline.phase3NumberOfFractions, "001-999") || !functions.GEN_INLIST(untrimmedline.phase3TotalDose, "000001-999999") || functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "030499", 2) == 0)
return false
}
if (functions.GEN_AT(untrimmedline.phase3RadiationPrimaryTxVolume, "99", 2) != 0) {
if ((functions.GEN_EMPTY(untrimmedline.phase3RadiationTreatmentModality) || functions.GEN_AT(untrimmedline.phase3RadiationTreatmentModality, "99") != 0) && functions.GEN_EMPTY(untrimmedline.phase3RadiationToDrainingLN) && functions.GEN_EMPTY(untrimmedline.phase3RadiationExternalBeamTech) && functions.GEN_EMPTY(untrimmedline.phase3DosePerFraction) && functions.GEN_EMPTY(untrimmedline.phase3NumberOfFractions) && functions.GEN_EMPTY(untrimmedline.phase3TotalDose) && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "99") != 0)
return true
else {
if (functions.GEN_AT(untrimmedline.phase3RadiationTreatmentModality, "99") != 0 && functions.GEN_AT(untrimmedline.phase3RadiationToDrainingLN, "99") != 0 && functions.GEN_AT(untrimmedline.phase3RadiationExternalBeamTech, "99") != 0 && functions.GEN_AT(untrimmedline.phase3DosePerFraction, "99999") != 0 && functions.GEN_AT(untrimmedline.phase3NumberOfFractions, "999") != 0 && functions.GEN_AT(untrimmedline.phase3TotalDose, "999999") != 0 && functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "99") != 0)
return true
else {
if (!functions.GEN_INLIST(untrimmedline.phase3RadiationTreatmentModality, "01-16,98") || !functions.GEN_INLIST(untrimmedline.phase3RadiationToDrainingLN, "00-08,99") || !functions.GEN_INLIST(untrimmedline.phase3RadiationExternalBeamTech, "01-10, 88, 98") || !functions.GEN_INLIST(untrimmedline.phase3DosePerFraction, "00001-99999") || !functions.GEN_INLIST(untrimmedline.phase3NumberOfFractions, "001-999") || !functions.GEN_INLIST(untrimmedline.phase3TotalDose, "000001-999999") || functions.GEN_AT(untrimmedline.numberPhasesOfRadTxToVolume, "030499", 2))
return false
}
}
}
return true
}
// ID: NAACCR-02332; TAG: N4928; NAME: PhI, II, III Radiation Treatment Modality (SEER)
public boolean naaccr02332(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.phase1RadiationTreatmentModality) && functions.GEN_EMPTY(untrimmedline.phase2RadiationTreatmentModality) && functions.GEN_EMPTY(untrimmedline.phase3RadiationTreatmentModality))
return true
if (!functions.GEN_EMPTY(untrimmedline.phase2RadiationTreatmentModality)) {
if (functions.GEN_EMPTY(untrimmedline.phase1RadiationTreatmentModality))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Phase I Radiation Treatment Modality: ${untrimmedline.phase1RadiationTreatmentModality} conflicts with Phase II Radiation Treatment Modality: ${untrimmedline.phase2RadiationTreatmentModality}')
}
if (functions.GEN_AT(untrimmedline.phase1RadiationTreatmentModality, "00", 2) != 0) {
if (functions.GEN_AT(untrimmedline.phase2RadiationTreatmentModality, "00") == 0 && !functions.GEN_EMPTY(untrimmedline.phase2RadiationTreatmentModality))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Phase I Radiation Treatment Modality: ${untrimmedline.phase1RadiationTreatmentModality} conflicts with Phase II Radiation Treatment Modality: ${untrimmedline.phase2RadiationTreatmentModality}')
}
if (!functions.GEN_EMPTY(untrimmedline.phase3RadiationTreatmentModality)) {
if (functions.GEN_EMPTY(untrimmedline.phase2RadiationTreatmentModality))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Phase II Radiation Treatment Modality: ${untrimmedline.phase2RadiationTreatmentModality} conflicts with Phase III Radiation Treatment Modality: ${untrimmedline.phase3RadiationTreatmentModality}')
}
if (functions.GEN_AT(untrimmedline.phase2RadiationTreatmentModality, "00", 2) != 0) {
if (functions.GEN_AT(untrimmedline.phase3RadiationTreatmentModality, "00") == 0 && !functions.GEN_EMPTY(untrimmedline.phase3RadiationTreatmentModality))
functions.GEN_SAVE_ERROR_TEXT(binding, 'Phase II Radiation Treatment Modality: ${untrimmedline.phase2RadiationTreatmentModality} conflicts with Phase III Radiation Treatment Modality: ${untrimmedline.phase3RadiationTreatmentModality}')
}
return true
}
// ID: NAACCR-02333; TAG: N4929; NAME: Surgery, Phase I Rad, Surg/Rad Seq (SEER)
public boolean naaccr02333(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int result
int dx_year
int seer_init_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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.rxSummSurgPrimSite) || functions.GEN_EMPTY(untrimmedline.rxSummScopeRegLnSur) || functions.GEN_EMPTY(untrimmedline.rxSummSurgOthRegDis))
return true
if ((functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "10-90", "(\\d\\d)") || (functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "3-7") || (functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "2") && functions.GEN_INLIST(untrimmedline.regionalNodesExamined, "01-98", "(\\d\\d)") && dx_year >= 2018 && dx_year <= 2020) || (functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "2") && dx_year >= 2021)) || functions.GEN_INLIST(untrimmedline.rxSummSurgOthRegDis, "1-5")) && functions.GEN_INLIST(untrimmedline.phase1RadiationTreatmentModality, "01-16,98", "(\\d\\d)")) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "2-7,9"))
return true
else
return false
}
else {
if ((functions.GEN_INLIST(untrimmedline.rxSummSurgPrimSite, "00", "(\\d\\d)") && (functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "0") || (functions.GEN_INLIST(untrimmedline.rxSummScopeRegLnSur, "1") && dx_year >= 2021)) && functions.GEN_INLIST(untrimmedline.rxSummSurgOthRegDis, "0")) || functions.GEN_INLIST(untrimmedline.phase1RadiationTreatmentModality, "00", "(\\d\\d)")) {
if (functions.GEN_INLIST(untrimmedline.rxSummSurgRadSeq, "0"))
return true
else
return false
}
else
return true
}
return true
}
// ID: NAACCR-02334; TAG: N4930; NAME: AJCC TNM Items, Type Reporting Source-DCO (NAACCR)
public boolean naaccr02334(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId))
return true
if (functions.GEN_AT(untrimmedline.typeOfReportingSource, "7") == 0)
return true
if (functions.GEN_AT(untrimmedline.behaviorCodeIcdO3, "2") != 0)
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (functions.GEN_AT(untrimmedline.schemaId, "007210072200723", 5) == 0)
return true
}
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinT) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmClinT, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Clin T: ${untrimmedline.ajccTnmClinT} must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinN) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmClinN, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Clin N: ${untrimmedline.ajccTnmClinN} must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinM) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmClinM, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Clin M: ${untrimmedline.ajccTnmClinM} must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinStageGroup) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmClinStageGroup, 2), "8899", 2) == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Clin Stage Group: ${untrimmedline.ajccTnmClinStageGroup} must = 88, 99, or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinTSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Clin T Suffix must = blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinNSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Clin N Suffix must = blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathT) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPathT, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Path T: ${untrimmedline.ajccTnmPathT} must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathN) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPathN, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Path N: ${untrimmedline.ajccTnmPathN} must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathM) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPathM, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Path M: ${untrimmedline.ajccTnmPathM} must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathStageGroup) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPathStageGroup, 2), "8899", 2) == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Path Stage Group: ${untrimmedline.ajccTnmPathStageGroup} must = 88, 99, or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathTSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Path T Suffix must = blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathNSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Path N Suffix must = blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinT) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPostTherapyClinT, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Clin (yc) N must equal 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinN) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPostTherapyClinN, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Clin (yc) M must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinM) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPostTherapyClinM, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Clin (yc) Stage Group must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinStageGrp))
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Clin (yc) T Suffix must = blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinTSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Clin (yc) N Suffix must = blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinNSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: Type of Reporting Source9 must = blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyT) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPostTherapyT, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Path (yp) T must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyN) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPostTherapyN, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Path (yp) N must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyM) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPostTherapyM, 2), "88") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Path (yp) M must = 88 or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyStageGroup) && functions.GEN_AT(functions.GEN_LEFT(untrimmedline.ajccTnmPostTherapyStageGroup, 2), "8899", 2) == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Path (yp) Stage Group must = 88, 99, or blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyTSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Path (yp) T Suffix must = blank')
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyNSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'DCO: AJCC TNM Post Therapy Path (yp) N Suffix must = blank')
return true
}
// ID: NAACCR-02335; TAG: N4931; NAME: SSDI, DCO (NAACCR)
public boolean naaccr02335(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_AT(untrimmedline.typeOfReportingSource, "7") == 0)
return true
if (functions.GEN_EMPTY(untrimmedline.schemaId))
return true
int dx_year
int err_flag
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 < 2018)
return true
if (!functions.GEN_EMPTY(untrimmedline.adenoidCysticBasaloidPattern) && functions.GEN_AT(untrimmedline.adenoidCysticBasaloidPattern, "XXX.8XXX.9", 5) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Adenoid Cystic Basaloid Pattern must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.adenopathy) && functions.GEN_AT(untrimmedline.adenopathy, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Adenopathy must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.afpPostOrchiectomyLabValue) && functions.GEN_AT(untrimmedline.afpPostOrchiectomyLabValue, "XXXXX.8XXXXX.9", 7) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: AFP Post-Orchiectomy Lab Value must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.afpPostOrchiectomyRange) && functions.GEN_AT(untrimmedline.afpPostOrchiectomyRange, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: AFP Post-Orchiectomy Range must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.afpPreOrchiectomyLabValue) && functions.GEN_AT(untrimmedline.afpPreOrchiectomyLabValue, "XXXXX.8XXXXX.9", 7) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: AFP Pre-Orchiectomy Lab Value must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.afpPreOrchiectomyRange) && functions.GEN_AT(untrimmedline.afpPreOrchiectomyRange, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: AFP Pre-Orchiectomy Range must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.afpPretreatmentInterpretation) && functions.GEN_AT(untrimmedline.afpPretreatmentInterpretation, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: AFP Pretreatment Interpretation must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.afpPretreatmentLabValue) && functions.GEN_AT(untrimmedline.afpPretreatmentLabValue, "XXXX.8XXXX.9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: AFP Pretreatment Lab Value must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.alkRearrangement) && functions.GEN_AT(untrimmedline.alkRearrangement, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: ALK Rearrangement must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.anemia) && functions.GEN_AT(untrimmedline.anemia, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Anemia must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.bSymptoms) && functions.GEN_AT(untrimmedline.bSymptoms, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: B Symptoms must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.bilirubinPretxTotalLabValue) && functions.GEN_AT(untrimmedline.bilirubinPretxTotalLabValue, "XXX.8XXX.9", 5) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Bilirubin Pretreatment Total Lab Value must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.bilirubinPretxUnitOfMeasure) && functions.GEN_AT(untrimmedline.bilirubinPretxUnitOfMeasure, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Bilirubin Pretreatment Unit of Measure must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.boneInvasion) && functions.GEN_AT(untrimmedline.boneInvasion, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Bone Invasion must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.brafMutationalAnalysis) && functions.GEN_AT(untrimmedline.brafMutationalAnalysis, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: BRAF Mutational Analysis must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.brainMolecularMarkers) && functions.GEN_AT(untrimmedline.brainMolecularMarkers, "8899", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Brain Molecular Markers must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.breslowTumorThickness) && functions.GEN_AT(untrimmedline.breslowTumorThickness, "XX.8XX.9", 4) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Breslow Tumor Thickness must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ca199PretxLabValue) && functions.GEN_AT(untrimmedline.ca199PretxLabValue, "XXXX.8XXXX.9", 6) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: CA19-9 PreTX Lab Value must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ca125PretreatmentInterpretation) && functions.GEN_AT(untrimmedline.ca125PretreatmentInterpretation, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: CA-125 Pretreatment Interpretation must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ceaPretreatmentInterpretation) && functions.GEN_AT(untrimmedline.ceaPretreatmentInterpretation, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: CEA Pretreatment Interpretation must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.chromosome19qLossHeterozygosity) && functions.GEN_AT(untrimmedline.chromosome19qLossHeterozygosity, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Chromosome 19q: Loss of Heterozygosity (LOH) must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.chromosome1pLossHeterozygosity) && functions.GEN_AT(untrimmedline.chromosome1pLossHeterozygosity, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Chromosome 1p: Loss of Heterozygosity (LOH) must be blank, unknown, or invalid')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.chromosome3Status) && functions.GEN_AT(untrimmedline.chromosome3Status, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Chromosome 3 Status must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.chromosome8qStatus) && functions.GEN_AT(untrimmedline.chromosome8qStatus, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Chromosome 8q Status must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.circumferentialResectionMargin) && functions.GEN_AT(untrimmedline.circumferentialResectionMargin, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Circumferential Resection Margin (CRM) must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.creatininePretreatmentLabValue) && functions.GEN_AT(untrimmedline.creatininePretreatmentLabValue, "XX.8XX.9", 4) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Creatinine Pretreatment Lab Value must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.creatininePretxUnitOfMeasure) && functions.GEN_AT(untrimmedline.creatininePretxUnitOfMeasure, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Creatinine Pretreatment Unit of Measure must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.egfrMutationalAnalysis) && functions.GEN_AT(untrimmedline.egfrMutationalAnalysis, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: EGFR Mutational Analysis must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.esophagusAndEgjTumorEpicenter) && functions.GEN_AT(untrimmedline.esophagusAndEgjTumorEpicenter, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Esophagus and EGJ Tumor Epicenter must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.estrogenReceptorPercntPosOrRange) && functions.GEN_AT(untrimmedline.estrogenReceptorPercntPosOrRange, "XX8XX9", 3) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Estrogen Receptor Percent Positive or Range must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.estrogenReceptorSummary) && functions.GEN_AT(untrimmedline.estrogenReceptorSummary, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Estrogen Receptor Summary must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.estrogenReceptorTotalAllredScore) && functions.GEN_AT(untrimmedline.estrogenReceptorTotalAllredScore, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Estrogen Receptor Total Allred Score must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.extranodalExtensionClin) && functions.GEN_AT(untrimmedline.extranodalExtensionClin, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Extranodal Extension Clin (non-Head and Neck) must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.extranodalExtensionHeadNeckClin) && functions.GEN_AT(untrimmedline.extranodalExtensionHeadNeckClin, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Extranodal Extension Head and Neck Clinical must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.extranodalExtensionHeadNeckPath) && functions.GEN_AT(untrimmedline.extranodalExtensionHeadNeckPath, "X.8X.9", 3) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Extranodal Extension Head and Neck Pathological must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.extranodalExtensionPath) && functions.GEN_AT(untrimmedline.extranodalExtensionPath, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Extranodal Extension Path (non-Head and Neck) must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.extravascularMatrixPatterns) && functions.GEN_AT(untrimmedline.extravascularMatrixPatterns, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Extravascular Matrix Patterns must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.fibrosisScore) && functions.GEN_AT(untrimmedline.fibrosisScore, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Fibrosis Score must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.figoStage) && functions.GEN_AT(untrimmedline.figoStage, "9899", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: FIGO Stage must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.gestationalTrophoblasticPxIndex) && functions.GEN_AT(untrimmedline.gestationalTrophoblasticPxIndex, "X9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Gestational Trophoblastic Prognostic Scoring Index must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.gleasonPatternsClinical) && functions.GEN_AT(untrimmedline.gleasonPatternsClinical, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Gleason Patterns Clinical must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.gleasonPatternsPathological) && functions.GEN_AT(untrimmedline.gleasonPatternsPathological, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Gleason Patterns Pathological must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.gleasonScoreClinical) && functions.GEN_AT(untrimmedline.gleasonScoreClinical, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Gleason Score Clinical must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.gleasonScorePathological) && functions.GEN_AT(untrimmedline.gleasonScorePathological, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Gleason Score Pathological must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.gleasonTertiaryPattern) && functions.GEN_AT(untrimmedline.gleasonTertiaryPattern, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Gleason Tertiary Pattern must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.hcgPostOrchiectomyLabValue) && functions.GEN_AT(untrimmedline.hcgPostOrchiectomyLabValue, "XXXXX.8XXXXX.9", 7) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: hCG Post-Orchiectomy Lab Value must be blank, unknown, or invalid')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.hcgPostOrchiectomyRange) && functions.GEN_AT(untrimmedline.hcgPostOrchiectomyRange, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: hCG Post-Orchiectomy Range must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.hcgPreOrchiectomyLabValue) && functions.GEN_AT(untrimmedline.hcgPreOrchiectomyLabValue, "XXXXX.8XXXXX.9", 7) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: hCG Pre-Orchiectomy Lab Value must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.hcgPreOrchiectomyRange) && functions.GEN_AT(untrimmedline.hcgPreOrchiectomyRange, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: hCG Pre-Orchiectomy Range must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2IhcSummary) && functions.GEN_AT(untrimmedline.her2IhcSummary, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: HER2 IHC Summary must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2IshDualProbeCopyNumber) && functions.GEN_AT(untrimmedline.her2IshDualProbeCopyNumber, "XX.8XX.9", 4) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: HER2 ISH Dual Probe Copy Number must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2IshDualProbeRatio) && functions.GEN_AT(untrimmedline.her2IshDualProbeRatio, "XX.8XX.9", 4) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: HER2 ISH Dual Probe Ratio must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2IshSingleProbeCopyNumber) && functions.GEN_AT(untrimmedline.her2IshSingleProbeCopyNumber, "XX.8XX.9", 4) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: HER2 ISH Single Probe Copy Number must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2IshSummary) && functions.GEN_AT(untrimmedline.her2IshSummary, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: HER2 ISH Summary must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.her2OverallSummary) && functions.GEN_AT(untrimmedline.her2OverallSummary, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: HER2 Overall Summary must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.heritableTrait) && functions.GEN_AT(untrimmedline.heritableTrait, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Heritable Trait must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.highRiskCytogenetics) && functions.GEN_AT(untrimmedline.highRiskCytogenetics, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: High Risk Cytogenetics must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.highRiskHistologicFeatures) && functions.GEN_AT(untrimmedline.highRiskHistologicFeatures, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: High Risk Histologic Features must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.hivStatus) && functions.GEN_AT(untrimmedline.hivStatus, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: HIV Status must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.iNRProthrombinTime) && functions.GEN_AT(untrimmedline.iNRProthrombinTime, "X.8X.9", 3) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: International Normalized Ratio Prothrombin Time must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.invasionBeyondCapsule) && functions.GEN_AT(untrimmedline.invasionBeyondCapsule, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Invasion Beyond Capsule must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ipsilateralAdrenalGlandInvolve) && functions.GEN_AT(untrimmedline.ipsilateralAdrenalGlandInvolve, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Ipsilateral Adrenal Gland Involvement must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.jak2) && functions.GEN_AT(untrimmedline.jak2, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: JAK2 must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ki67) && functions.GEN_AT(untrimmedline.ki67, "XXX.8XXX.9", 5) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Ki-67 must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.kitGeneImmunohistochemistry) && functions.GEN_AT(untrimmedline.kitGeneImmunohistochemistry, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: KIT Gene Immunohistochemistry must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.kras) && functions.GEN_AT(untrimmedline.kras, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: KRAS must be blank, unknown, or invalid')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ldhPretreatmentLabValue) && functions.GEN_AT(untrimmedline.ldhPretreatmentLabValue, "XXXXX.8XXXXX.9", 7) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LDH Lab Value must be blank, unknown, or invalid')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ldhPretreatmentLevel) && functions.GEN_AT(untrimmedline.ldhPretreatmentLevel, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LDH Level must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ldhPostOrchiectomyRange) && functions.GEN_AT(untrimmedline.ldhPostOrchiectomyRange, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LDH Post-Orchiectomy Range) must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ldhPreOrchiectomyRange) && functions.GEN_AT(untrimmedline.ldhPreOrchiectomyRange, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LDH Pre-Orchiectomy Range) must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ldhUpperLimitsOfNormal) && functions.GEN_AT(untrimmedline.ldhUpperLimitsOfNormal, "XX8XX9", 3) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LDH Upper Limits of Normal must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnAssessMethodFemoralInguinal) && functions.GEN_AT(untrimmedline.lnAssessMethodFemoralInguinal, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Assessment Method Femoral-Inguinal must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnAssessMethodParaaortic) && functions.GEN_AT(untrimmedline.lnAssessMethodParaaortic, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Assessment Method Para-Aortic must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnAssessMethodPelvic) && functions.GEN_AT(untrimmedline.lnAssessMethodPelvic, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Assessment Method Pelvic must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnDistantAssessMethod) && functions.GEN_AT(untrimmedline.lnDistantAssessMethod, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Distant Assessment Method must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnDistantMediastinalScalene) && functions.GEN_AT(untrimmedline.lnDistantMediastinalScalene, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Distant: Mediastinal, Scalene must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnHeadAndNeckLevels1To3) && functions.GEN_AT(untrimmedline.lnHeadAndNeckLevels1To3, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Head and Neck Levels I-III must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnHeadAndNeckLevels4To5) && functions.GEN_AT(untrimmedline.lnHeadAndNeckLevels4To5, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Head and Neck Levels IV-V must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnHeadAndNeckLevels6To7) && functions.GEN_AT(untrimmedline.lnHeadAndNeckLevels6To7, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Head and Neck Levels VI-VII must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnHeadAndNeckOther) && functions.GEN_AT(untrimmedline.lnHeadAndNeckOther, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Head and Neck Other must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnIsolatedTumorCells) && functions.GEN_AT(untrimmedline.lnIsolatedTumorCells, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Isolated Tumor Cells (ITC) must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnLaterality) && functions.GEN_AT(untrimmedline.lnLaterality, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Laterality must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnPositiveAxillaryLevel1To2) && functions.GEN_AT(untrimmedline.lnPositiveAxillaryLevel1To2, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Positive Axillary Level I-II must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnSize) && functions.GEN_AT(untrimmedline.lnSize, "XX.8XX.9", 4) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Size must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lnStatusFemorInguinParaaortPelv) && functions.GEN_AT(untrimmedline.lnStatusFemorInguinParaaortPelv, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: LN Status Femoral-Inguinal, Para-Aortic, Pelvic must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.lymphocytosis) && functions.GEN_AT(untrimmedline.lymphocytosis, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Lymphocytosis must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.majorVeinInvolvement) && functions.GEN_AT(untrimmedline.majorVeinInvolvement, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Major Vein Involvement must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.measuredBasalDiameter) && functions.GEN_AT(untrimmedline.measuredBasalDiameter, "XX.8XX.9", 4) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Measured Basal Diameter must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.measuredThickness) && functions.GEN_AT(untrimmedline.measuredThickness, "XX.8XX.9", 4) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Measured Thickness must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.methylationOfO6MGMT) && functions.GEN_AT(untrimmedline.methylationOfO6MGMT, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Methylation of O6-Methylguanine-Methyltransferase must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.microsatelliteInstability) && functions.GEN_AT(untrimmedline.microsatelliteInstability, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Microsatellite Instability (MSI) must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.microvascularDensity) && functions.GEN_AT(untrimmedline.microvascularDensity, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Microvascular Density must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.mitoticCountUvealMelanoma) && functions.GEN_AT(untrimmedline.mitoticCountUvealMelanoma, "XX.8XX.9", 4) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Mitotic Count Uveal Melanoma must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.mitoticRateMelanoma) && functions.GEN_AT(untrimmedline.mitoticRateMelanoma, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Mitotic Rate Melanoma must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.multigeneSignatureMethod) && functions.GEN_AT(untrimmedline.multigeneSignatureMethod, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Multigene Signature Method must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.multigeneSignatureResults) && functions.GEN_AT(untrimmedline.multigeneSignatureResults, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Multigene Signature Results must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.nccnInternationalPrognosticIndex) && functions.GEN_AT(untrimmedline.nccnInternationalPrognosticIndex, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: NCCN International Prognostic Index (IPI) must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.nrasMutationalAnalysis) && functions.GEN_AT(untrimmedline.nrasMutationalAnalysis, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: NRAS Mutational Analysis must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfCoresExamined) && functions.GEN_AT(untrimmedline.numberOfCoresExamined, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Number of Cores Examined must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfCoresPositive) && functions.GEN_AT(untrimmedline.numberOfCoresPositive, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Number of Cores Positive must be blank')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfExaminedParaAorticNodes) && functions.GEN_AT(untrimmedline.numberOfExaminedParaAorticNodes, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Number of Examined Para-Aortic Nodes must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfExaminedPelvicNodes) && functions.GEN_AT(untrimmedline.numberOfExaminedPelvicNodes, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Number of Examined Pelvic Nodes must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfPositiveParaAorticNodes) && functions.GEN_AT(untrimmedline.numberOfPositiveParaAorticNodes, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Number of Positive Para-Aortic Nodes must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.numberOfPositivePelvicNodes) && functions.GEN_AT(untrimmedline.numberOfPositivePelvicNodes, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Positive Pelvic Nodes must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.oncotypeDxRecurrenceScoreDcis) && functions.GEN_AT(untrimmedline.oncotypeDxRecurrenceScoreDcis, "XX8XX9", 3) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Oncotype Dx Recurrence Score-DCIS must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.oncotypeDxRecurrenceScoreInvasiv) && functions.GEN_AT(untrimmedline.oncotypeDxRecurrenceScoreInvasiv, "XX9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Oncotype Dx Recurrence Score-Invasive must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.oncotypeDxRiskLevelDcis) && functions.GEN_AT(untrimmedline.oncotypeDxRiskLevelDcis, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Oncotype Dx Risk Level-DCIS must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.oncotypeDxRiskLevelInvasive) && functions.GEN_AT(untrimmedline.oncotypeDxRiskLevelInvasive, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Oncotype Dx Risk Level-Invasive must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.organomegaly) && functions.GEN_AT(untrimmedline.organomegaly, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Organomegaly must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.percentNecrosisPostNeoadjuvant) && functions.GEN_AT(untrimmedline.percentNecrosisPostNeoadjuvant, "XXX.8XXX.9", 5) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Percent Necrosis Post Neoadjuvant must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.perineuralInvasion) && functions.GEN_AT(untrimmedline.perineuralInvasion, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Perineural Invasion must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.peripheralBloodInvolvement) && functions.GEN_AT(untrimmedline.peripheralBloodInvolvement, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Peripheral Blood Involvemen must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.peritonealCytology) && functions.GEN_AT(untrimmedline.peritonealCytology, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Peritoneal Cytology must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.pleuralEffusion) && functions.GEN_AT(untrimmedline.pleuralEffusion, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Pleural Effusion must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.primarySclerosingCholangitis) && functions.GEN_AT(untrimmedline.primarySclerosingCholangitis, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Primary Sclerosing Cholangitis must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.profoundImmuneSuppression) && functions.GEN_AT(untrimmedline.profoundImmuneSuppression, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Profound Immune Suppression must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.progesteroneRecepPrcntPosOrRange) && functions.GEN_AT(untrimmedline.progesteroneRecepPrcntPosOrRange, "XX8XX9", 3) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Progesterone Receptor Percent Positive or Range must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.progesteroneRecepSummary) && functions.GEN_AT(untrimmedline.progesteroneRecepSummary, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Progesterone Receptor Summary must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.progesteroneRecepTotalAllredScor) && functions.GEN_AT(untrimmedline.progesteroneRecepTotalAllredScor, "XX8XX9", 3) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Progesterone Receptor Total Allred Score must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.psaLabValue) && functions.GEN_AT(untrimmedline.psaLabValue, "XXX.9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: PSA (Prostatic Specific Antigen) Lab Value must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.residualTumVolPostCytoreduction) && functions.GEN_AT(untrimmedline.residualTumVolPostCytoreduction, "9899", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Residual Tumor Volume Post Cytoreduction must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.responseToNeoadjuvantTherapy) && functions.GEN_AT(untrimmedline.responseToNeoadjuvantTherapy, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Response to Neoadjuvant Therapy must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.sCategoryClinical) && functions.GEN_AT(untrimmedline.sCategoryClinical, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: S Category Clinical must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.sCategoryPathological) && functions.GEN_AT(untrimmedline.sCategoryPathological, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: S Category Pathological must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.sarcomatoidFeatures) && functions.GEN_AT(untrimmedline.sarcomatoidFeatures, "XX8XX9", 3) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Sarcomatoid Features must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.seerSiteSpecificFact1) && functions.GEN_AT(untrimmedline.seerSiteSpecificFact1, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: SEER Site-Specific Fact 1 must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.separateTumorNodules) && functions.GEN_AT(untrimmedline.separateTumorNodules, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Separate Tumor Nodules must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.serumAlbuminPretreatmentLevel) && functions.GEN_AT(untrimmedline.serumAlbuminPretreatmentLevel, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Serum Albumin Pretreatment Level must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.serumBeta2MicroglobulinPretxLvl) && functions.GEN_AT(untrimmedline.serumBeta2MicroglobulinPretxLvl, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Serum Beta-2 Microglobulin Pretreatment Level must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.thrombocytopenia) && functions.GEN_AT(untrimmedline.thrombocytopenia, "9") == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Thrombocytopenia must be blank or unknown')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tumorDeposits) && functions.GEN_AT(untrimmedline.tumorDeposits, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Tumor Deposits must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.tumorGrowthPattern) && functions.GEN_AT(untrimmedline.tumorGrowthPattern, "X8X9", 2) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Tumor Growth Pattern must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.ulceration) && functions.GEN_AT(untrimmedline.ulceration, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Ulceration must be blank, unknown, or NA')
err_flag = 1
}
if (!functions.GEN_EMPTY(untrimmedline.visceralParietalPleuralInvasion) && functions.GEN_AT(untrimmedline.visceralParietalPleuralInvasion, "89", 1) == 0) {
functions.GEN_SAVE_TEXT(binding, 'DCO: Visceral and Parietal Pleural Invasion must be blank, unknown, or NA')
err_flag = 1
}
if (err_flag == 1)
return false
return true
}
// ID: NAACCR-02336; TAG: N4022; NAME: RX Summ--Radiation, Date of Diagnosis (NPCR)
public boolean naaccr02336(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR))
return true
if (dx_year < 2010 || dx_year > 2017) {
return true
}
if (dx_year < 2015) {
if (!(functions.GEN_INLIST(untrimmedline.primarySite, "180-189,199,209,500-509", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8000-9044,9060-9136,9141-9582")))
return true
if (functions.GEN_EMPTY(untrimmedline.rxSummRadiation))
return false
}
if (dx_year > 2014 && dx_year < 2018) {
if (functions.GEN_EMPTY(untrimmedline.rxSummRadiation))
functions.GEN_SAVE_ERROR_TEXT(binding, 'For diagnosis year 2015-2017, RX Summ--Radiation cannot be blank')
}
return true
}
// ID: NAACCR-02339; TAG: N4026; NAME: Secondary Diagnosis 1, Date DX (COC)
public boolean naaccr02339(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.secondaryDiagnosis1))
return false
return true
}
// ID: NAACCR-02340; TAG: N4933; NAME: Creatinine Pretreatment Unit of Measure, Schema ID, Required, CoC Flag (SEER)
public boolean naaccr02340(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.schemaId))
return true
if (functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") == 0)
return true
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))
return true
if (dx_year < 2018)
return true
if (functions.GEN_AT(untrimmedline.schemaId, "00220", 5) != 0) {
if (functions.GEN_EMPTY(untrimmedline.creatininePretxUnitOfMeasure) || functions.GEN_AT(untrimmedline.creatininePretxUnitOfMeasure, "8") != 0)
return false
}
return true
}
// ID: NAACCR-02342; TAG: N4908; NAME: AJCC TNM, TNM Edition Number, AJCC ID, CoC Flag (NPCR)
public boolean naaccr02342(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) || dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR) || dx_year < 2018)
return true
if (functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") == 0) {
return true
}
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "0809", 2) != 0) {
if ((functions.GEN_INLIST(untrimmedline.ajccTnmClinStageGroup, "88") && !functions.GEN_INLIST(untrimmedline.ajccId, "14,16.3,18.2,38.2,38.3,40,42,45,65,66,67.1,69,70") && !functions.GEN_INLIST(untrimmedline.ajccId, "71,72,75,81.2,82.1,82.2,83.0,83.1,83.2,83.3,83.4")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPathStageGroup, "88") && !functions.GEN_INLIST(untrimmedline.ajccId, "14,16.3,18.2,38.2,38.3,40,42,45,65,66,67.1,69,70") && !functions.GEN_INLIST(untrimmedline.ajccId, "71,72,75,81.1,81.2,82.1,82.2,83.0,83.1,83.2,83.3,83.4")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyStageGroup, "88") && !functions.GEN_INLIST(untrimmedline.ajccId, "14,16.3,18.2,38.2,38.3,40,42,45,65,66,67.1,69,70,48.1,48.2,71,72,75") && !functions.GEN_INLIST(untrimmedline.ajccId, "79.0,79.1,79.2,79.3,79.4,79.5,79.6,79.7,81.1,81.2,82.1,82.2,83.0,83.1,83.2,83.3,83.4")) || (functions.GEN_INLIST(untrimmedline.ajccTnmClinT, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,82,83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmClinN, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,56,72,79,82,83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmClinM, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,82,83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPathT, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPathN, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,56,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPathM, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyT, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyN, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,56,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyM, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinT, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinN, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,56,72,79,81-83")) || (functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinM, "88") && !functions.GEN_INLIST(functions.GEN_LEFT(untrimmedline.ajccId, 2), "45,72,79,81-83")))
functions.GEN_SAVE_ERROR_TEXT(binding, 'If TNM Edition Number = 08 or 09, AJCC TNM fields must indicate staging assigned')
}
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "88") != 0) {
if (!functions.GEN_INLIST(untrimmedline.ajccTnmClinT, "88") || !functions.GEN_INLIST(untrimmedline.ajccTnmClinN, "88") || !functions.GEN_INLIST(untrimmedline.ajccTnmClinM, "88") || !functions.GEN_INLIST(untrimmedline.ajccTnmClinStageGroup, "88") || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathT) && !functions.GEN_INLIST(untrimmedline.ajccTnmPathT, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathN) && !functions.GEN_INLIST(untrimmedline.ajccTnmPathN, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathM) && !functions.GEN_INLIST(untrimmedline.ajccTnmPathM, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathStageGroup) && !functions.GEN_INLIST(untrimmedline.ajccTnmPathStageGroup, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyT) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyT, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyN) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyN, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyM) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyM, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyStageGroup) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyStageGroup, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinT) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinT, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinN) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinN, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinM) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinM, "88")) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinNSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'if TNM Edition Number = 88, AJCC TNM fields must indicate no staging applicable')
}
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "00") != 0) {
if (!functions.GEN_EMPTY(untrimmedline.ajccTnmClinT) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinN) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinM) || !functions.GEN_INLIST(untrimmedline.ajccTnmClinStageGroup, "99") || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathT) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathN) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathM) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPathStageGroup) && !functions.GEN_INLIST(untrimmedline.ajccTnmPathStageGroup, "99")) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyT) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyN) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyM) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyStageGroup) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyStageGroup, "99")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinT) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinT, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinN) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinN, "88")) || (!functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyClinM) && !functions.GEN_INLIST(untrimmedline.ajccTnmPostTherapyClinM, "88")) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmClinNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPathNSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyTSuffix) || !functions.GEN_EMPTY(untrimmedline.ajccTnmPostTherapyNSuffix))
functions.GEN_SAVE_ERROR_TEXT(binding, 'If TNM Edition Number = 00, all AJCC TNM fields must indicate no staging assigned')
}
if (functions.GEN_AT(untrimmedline.tnmEditionNumber, "09") != 0) {
if (functions.GEN_AT(functions.GEN_TRIM(untrimmedline.ajccId, ((Integer)context.NAACCR_GEN_RIGHT)), "52") == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'TNM Edition Number: ${untrimmedline.tnmEditionNumber} is valid only for AJCC ID 53, Cervix Uteri')
}
return true
}
// ID: NAACCR-02343; TAG: N4028; NAME: TNM Edition Number, Date of Diagnosis, CoC Flag (NPCR)
public boolean naaccr02343(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)) || (dx_year == ((Integer)context.NAACCR_GEN_DT_ERROR)))
return true
if (dx_year < 2018)
return true
if (dx_year >= 2018 && dx_year <= 2020 && functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") != 0) {
if (!functions.GEN_EMPTY(untrimmedline.tnmEditionNumber) && functions.GEN_AT(untrimmedline.tnmEditionNumber, "000888", 2) == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'TNM Edition Number must = 00, 08, or 88')
}
if (dx_year >= 2021 && functions.GEN_AT(untrimmedline.cocAccreditedFlag, "1") != 0) {
if (!functions.GEN_EMPTY(untrimmedline.tnmEditionNumber) && functions.GEN_AT(untrimmedline.tnmEditionNumber, "00080988", 2) == 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'If year of Date of Diagnosis is 2021+, then TNM Edition Number must = 00, 08, 09, or 88')
}
return true
}
// ID: NAACCR-02344; TAG: N2824; NAME: _SYS Schema ID, Primary Site, Histology (NAACCR)
public boolean naaccr02344(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] SITELOW = new char[5], SITEHIGH = new char[5], HISTLOW = new char[5], HISTHIGH = new char[5], GPCODE = new char[6], GPNAME = new char[31], SCDSCR1 = new char[2], SCDSCR2 = new char[2], YEAR = new char[5]
int dx_year
char[] SiteGrp = new char[5]
char[] Site = new char[5]
char[] SchemaName = new char[35]
char[] t_schema_msg = new char[100]
char[] group = new char[5]
char[] SD1 = new char[1]
char[] SD2 = new char[1]
char[] change_year = new char[1]
char[] changed = new char[4]
char[] Site_HistLo = new char[20]
char[] Site_Hist_SD = new char[25]
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 < 2018)
return true
if (functions.GEN_EMPTY(untrimmedline.primarySite))
return true
if (functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
if (functions.GEN_EMPTY(untrimmedline.behaviorCodeIcdO3) || functions.GEN_AT(untrimmedline.behaviorCodeIcdO3, "01", 1) != 0) {
return true
}
if (functions.GEN_EMPTY(untrimmedline.schemaDiscriminator1))
functions.GEN_STRCPY(SD1, "X")
if (!functions.GEN_EMPTY(untrimmedline.schemaDiscriminator1))
functions.GEN_STRCPY(SD1, untrimmedline.schemaDiscriminator1)
if (functions.GEN_EMPTY(untrimmedline.schemaDiscriminator2))
functions.GEN_STRCPY(SD2, "X")
if (!functions.GEN_EMPTY(untrimmedline.schemaDiscriminator2)) {
functions.GEN_STRCPY(SD2, untrimmedline.schemaDiscriminator2)
}
if (functions.GEN_INLIST(untrimmedline.primarySite, "481-482, 488", "(C\\d\\d\\d)", 2, 3) && (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8000-8700,8720-8790,8806,8822,8930-8931,8933,8950,8960,8980,9000,9050") || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9052,9060,9070-9071,9073,9080,9085,9090-9091,9100,9110,9700-9701"))) {
functions.GEN_STRCPY(SD1, untrimmedline.sex)
}
if (functions.GEN_AT(untrimmedline.histologicTypeIcdO3, "9732", 4) != 0) {
functions.GEN_STRCPY(SD1, "X")
}
if (functions.GEN_AT(untrimmedline.primarySite, "C739", 4) != 0 && functions.GEN_AT(untrimmedline.histologicTypeIcdO3, "9591", 4) == 0) {
functions.GEN_STRCPY(SD1, "X")
}
if (functions.GEN_AT(untrimmedline.histologicTypeIcdO3, "89358936", 4) != 0)
functions.GEN_STRCPY(SD1, "X")
functions.GEN_STRCPY(Site, untrimmedline.primarySite)
functions.GEN_STRCPY(change_year, "0")
if (functions.GEN_AT(untrimmedline.primarySite, "C530C531C538C539", 4) != 0) {
if (functions.GEN_SQLRANGELOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_CHANGESCHEMAID, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_CHANGESCHEMAID_HISTLOW, untrimmedline.histologicTypeIcdO3, ['GPCODE':GPCODE, 'GPNAME':GPNAME, 'SITELOW':SITELOW, 'SITEHIGH':SITEHIGH, 'HISTLOW':HISTLOW, 'HISTHIGH':HISTHIGH, 'SCDSCR1':SCDSCR1, 'SCDSCR2':SCDSCR2, 'YEAR':YEAR])) {
if (functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTLOW) >= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTHIGH) <= 0) {
functions.GEN_STRCPY(change_year, "1")
if (dx_year >= 2018 && dx_year <= 2020)
functions.GEN_STRCPY(changed, "2018")
else {
if (dx_year >= 2021)
functions.GEN_STRCPY(changed, "2021")
}
}
}
}
if (functions.GEN_SQLRANGELOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SCHEMAID2018STGP, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SCHEMAID2018STGP_SITELOW, Site, ['GPCODE':GPCODE, 'GPNAME':GPNAME, 'SITELOW':SITELOW, 'SITEHIGH':SITEHIGH, 'HISTLOW':HISTLOW, 'HISTHIGH':HISTHIGH, 'SCDSCR1':SCDSCR1, 'SCDSCR2':SCDSCR2, 'YEAR':YEAR])) {
if (functions.GEN_STRCMP(untrimmedline.primarySite, SITELOW) >= 0 && functions.GEN_STRCMP(untrimmedline.primarySite, SITEHIGH) <= 0) {
functions.GEN_STRCPY(Site_HistLo, SITELOW)
functions.GEN_STRCAT(Site_HistLo, SITEHIGH)
functions.GEN_STRCAT(Site_HistLo, untrimmedline.histologicTypeIcdO3)
}
else {
functions.GEN_STRCPY(group, "88888")
functions.GEN_STRCPY(GPNAME, "Unknown Schema ID")
}
}
else {
functions.GEN_STRCPY(group, "88888")
functions.GEN_STRCPY(GPNAME, "Unknown Schema ID")
}
if (functions.GEN_AT(change_year, "1") != 0) {
if (functions.GEN_SQLRANGELOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SCHEMAID2018STGP, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SCHEMAID2018STGP_SITELOWSITEHIGHHISTLOW, Site_HistLo, ['GPCODE':GPCODE, 'GPNAME':GPNAME, 'SITELOW':SITELOW, 'SITEHIGH':SITEHIGH, 'HISTLOW':HISTLOW, 'HISTHIGH':HISTHIGH, 'SCDSCR1':SCDSCR1, 'SCDSCR2':SCDSCR2, 'YEAR':YEAR])) {
if (functions.GEN_STRCMP(untrimmedline.primarySite, SITELOW) >= 0 && functions.GEN_STRCMP(untrimmedline.primarySite, SITEHIGH) <= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTLOW) >= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTHIGH) <= 0) {
functions.GEN_STRCPY(Site_Hist_SD, SITELOW)
functions.GEN_STRCAT(Site_Hist_SD, SITEHIGH)
functions.GEN_STRCAT(Site_Hist_SD, HISTLOW)
functions.GEN_STRCAT(Site_Hist_SD, HISTHIGH)
functions.GEN_STRCAT(Site_Hist_SD, SD1)
functions.GEN_STRCAT(Site_Hist_SD, SD2)
functions.GEN_STRCAT(Site_Hist_SD, changed)
}
else {
functions.GEN_STRCPY(group, "88888")
functions.GEN_STRCPY(GPNAME, "Unknown Schema ID")
}
}
else {
functions.GEN_STRCPY(group, "88888")
functions.GEN_STRCPY(GPNAME, "Unknown Schema ID")
}
if (functions.GEN_SQLRANGELOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SCHEMAID2018STGP, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SCHEMAID2018STGP_SITELOWSITEHIGHHISTLOWHISTHIGHSCDSCR1SCDSCR2YEAR, Site_Hist_SD, ['GPCODE':GPCODE, 'GPNAME':GPNAME, 'SITELOW':SITELOW, 'SITEHIGH':SITEHIGH, 'HISTLOW':HISTLOW, 'HISTHIGH':HISTHIGH, 'SCDSCR1':SCDSCR1, 'SCDSCR2':SCDSCR2, 'YEAR':YEAR])) {
if (functions.GEN_STRCMP(untrimmedline.primarySite, SITELOW) >= 0 && functions.GEN_STRCMP(untrimmedline.primarySite, SITEHIGH) <= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTLOW) >= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTHIGH) <= 0 && functions.GEN_STRCMP(SD1, SCDSCR1) == 0 && functions.GEN_STRCMP(SD2, SCDSCR2) == 0 && functions.GEN_STRCMP(changed, YEAR) == 0)
functions.GEN_STRCPY(group, GPCODE)
else {
functions.GEN_STRCPY(group, "88888")
functions.GEN_STRCPY(GPNAME, "Unknown Schema ID")
}
}
else {
functions.GEN_STRCPY(group, "88888")
functions.GEN_STRCPY(GPNAME, "Unknown Schema ID")
}
}
else {
if (functions.GEN_AT(change_year, "1") == 0) {
if (functions.GEN_SQLRANGELOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SCHEMAID2018STGP, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SCHEMAID2018STGP_SITELOWSITEHIGHHISTLOW, Site_HistLo, ['GPCODE':GPCODE, 'GPNAME':GPNAME, 'SITELOW':SITELOW, 'SITEHIGH':SITEHIGH, 'HISTLOW':HISTLOW, 'HISTHIGH':HISTHIGH, 'SCDSCR1':SCDSCR1, 'SCDSCR2':SCDSCR2, 'YEAR':YEAR])) {
if (functions.GEN_STRCMP(untrimmedline.primarySite, SITELOW) >= 0 && functions.GEN_STRCMP(untrimmedline.primarySite, SITEHIGH) <= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTLOW) >= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTHIGH) <= 0) {
functions.GEN_STRCPY(Site_Hist_SD, SITELOW)
functions.GEN_STRCAT(Site_Hist_SD, SITEHIGH)
functions.GEN_STRCAT(Site_Hist_SD, HISTLOW)
functions.GEN_STRCAT(Site_Hist_SD, HISTHIGH)
functions.GEN_STRCAT(Site_Hist_SD, SD1)
functions.GEN_STRCAT(Site_Hist_SD, SD2)
}
else {
functions.GEN_STRCPY(group, "88888")
functions.GEN_STRCPY(GPNAME, "Unknown Schema ID")
}
}
else {
functions.GEN_STRCPY(group, "88888")
functions.GEN_STRCPY(GPNAME, "Unknown Schema ID")
}
if (functions.GEN_SQLRANGELOOKUP((com.imsweb.validation.entities.ContextTable)context.NAACCR_SCHEMAID2018STGP, (com.imsweb.validation.entities.ContextTableIndex)context.NAACCR_SCHEMAID2018STGP_SITELOWSITEHIGHHISTLOWHISTHIGHSCDSCR1SCDSCR2, Site_Hist_SD, ['GPCODE':GPCODE, 'GPNAME':GPNAME, 'SITELOW':SITELOW, 'SITEHIGH':SITEHIGH, 'HISTLOW':HISTLOW, 'HISTHIGH':HISTHIGH, 'SCDSCR1':SCDSCR1, 'SCDSCR2':SCDSCR2, 'YEAR':YEAR])) {
if (functions.GEN_STRCMP(untrimmedline.primarySite, SITELOW) >= 0 && functions.GEN_STRCMP(untrimmedline.primarySite, SITEHIGH) <= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTLOW) >= 0 && functions.GEN_STRCMP(untrimmedline.histologicTypeIcdO3, HISTHIGH) <= 0 && functions.GEN_STRCMP(SD1, SCDSCR1) == 0 && functions.GEN_STRCMP(SD2, SCDSCR2) == 0)
functions.GEN_STRCPY(group, GPCODE)
else {
functions.GEN_STRCPY(group, "88888")
functions.GEN_STRCPY(GPNAME, "Unknown Schema ID")
}
}
else {
functions.GEN_STRCPY(group, "88888")
functions.GEN_STRCPY(GPNAME, "Unknown Schema ID")
}
}
}
if (functions.GEN_STRCMP(untrimmedline.schemaId, group) != 0) {
functions.GEN_STRCPY(t_schema_msg, "Calculated Schema ID: ")
functions.GEN_STRCAT(t_schema_msg, group)
functions.GEN_STRCAT(t_schema_msg, ", ")
functions.GEN_STRCAT(t_schema_msg, GPNAME)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Reported Schema ID: ${untrimmedline.schemaId} not valid for ${untrimmedline.primarySite}, ${untrimmedline.histologicTypeIcdO3}/${untrimmedline.behaviorCodeIcdO3}, SD1: ${untrimmedline.schemaDiscriminator1}, SD2: ${untrimmedline.schemaDiscriminator2}, Sex: ${untrimmedline.sex}, DxDate: ${untrimmedline.dateOfDiagnosis.formatDate()}')
}
return true
}
// ID: NAACCR-02345; TAG: N4200; NAME: PhI Radiation External Beam Planning Tech, Date DX, CoC Flag (SEER)
public boolean naaccr02345(Binding binding, Map