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.ncfd.NcfdTranslatedCompiledRules.groovy Maven / Gradle / Ivy
package com.imsweb.validation.edits.translated.ncfd
import com.imsweb.validation.functions.MetafileContextFunctions
import com.imsweb.validation.runtime.CompiledRules
import groovy.transform.CompileStatic
@CompileStatic
class NcfdTranslatedCompiledRules implements CompiledRules {
@Override
public String getValidatorId() {
return 'ncfd-translated'
}
@Override
public String getValidatorVersion() {
return 'NCFD-014-01'
}
@Override
public Map>> getMethodParameters() {
return [
'untrimmedlines' : [Binding.class, Map.class, MetafileContextFunctions.class, List.class],
'untrimmedlines.untrimmedline' : [Binding.class, Map.class, MetafileContextFunctions.class, List.class, Map.class]
]
}
// ID: NCFD-00002; TAG: 1840; NAME: Addr at DX--Postal Code (Subm)
public boolean ncfd00002(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.addrAtDxPostalCode))
return true
return functions.GEN_MATCH(untrimmedline.addrAtDxPostalCode, "([A-Za-z0-9](([A-Za-z0-9]))*((\\s))*)")
}
// ID: NCFD-00003; TAG: N0122; NAME: Addr at DX--State (NAACCR)
public boolean ncfd00003(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_LOOKUP(untrimmedline.addrAtDxState, context.NCFD_STATE, context.NCFD_STATE_CODE, [:])
}
// ID: NCFD-00004; TAG: N0026; NAME: Age at Diagnosis (SEER AGEDX)
public boolean ncfd00004(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_INLIST(untrimmedline.ageAtDiagnosis, "000-120,999", "(\\d\\d\\d)")
}
// ID: NCFD-00005; TAG: N0025; NAME: Age, Birth Date, Date of Diagnosis (NAACCR IF13)
public boolean ncfd00005(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int wrk_age, diag_age
int dx_year, dx_month, dx_day, birth_year, birth_month, birth_day
if (functions.GEN_INLIST(untrimmedline.ageAtDiagnosis, "000")) {
if (functions.GEN_INLIST(untrimmedline.overRideAgeSiteMorph, "2,3"))
return true
}
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
birth_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfBirth)
if (birth_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Birth: %DC')
diag_age = functions.GEN_VAL(untrimmedline.ageAtDiagnosis)
if (diag_age == 999) {
if ((dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY)) || (birth_year == ((Integer)context.NCFD_GEN_DT_EMPTY)))
return true
else
return false
}
if ((dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY)) || (birth_year == ((Integer)context.NCFD_GEN_DT_EMPTY))) {
if (diag_age == 999)
return true
else
return false
}
dx_month = functions.GEN_DATE_MONTH_IOP(binding, untrimmedline.dateOfDiagnosis)
birth_month = functions.GEN_DATE_MONTH_IOP(binding, untrimmedline.dateOfBirth)
if ((birth_month == ((Integer)context.NCFD_GEN_DT_MONTH_EMPTY)) || (dx_month == ((Integer)context.NCFD_GEN_DT_MONTH_EMPTY)))
wrk_age = dx_year - birth_year
else
wrk_age = (int)(((dx_year * 12 + dx_month) - (birth_year * 12 + birth_month)) / 12)
if ((birth_month == ((Integer)context.NCFD_GEN_DT_MONTH_EMPTY)) || (dx_month == ((Integer)context.NCFD_GEN_DT_MONTH_EMPTY))) {
if (diag_age == wrk_age || diag_age == (wrk_age - 1))
return true
else
return false
}
dx_day = functions.GEN_DATE_DAY_IOP(binding, untrimmedline.dateOfDiagnosis)
birth_day = functions.GEN_DATE_DAY_IOP(binding, untrimmedline.dateOfBirth)
if (dx_month == birth_month) {
if ((dx_day == ((Integer)context.NCFD_GEN_DT_DAY_EMPTY)) || (birth_day == ((Integer)context.NCFD_GEN_DT_DAY_EMPTY))) {
if (diag_age == wrk_age || diag_age == (wrk_age - 1))
return true
else
return false
}
else {
if (dx_day < birth_day)
wrk_age = (wrk_age - 1)
}
}
if (diag_age == wrk_age)
return true
else
return false
return true
}
// ID: NCFD-00007; TAG: N0718; NAME: Age, Primary Site, Morph ICDO3--Adult (SEER)
public boolean ncfd00007(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int agetemp
int dx_year
if (functions.GEN_INLIST(untrimmedline.overRideAgeSiteMorph, "1"))
return true
if (functions.GEN_EMPTY(untrimmedline.morphTypebehavIcdO3))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year < 2001) {
return true
}
if (functions.GEN_INLIST(untrimmedline.ageAtDiagnosis, "999"))
return true
agetemp = functions.GEN_VAL(untrimmedline.ageAtDiagnosis)
if (agetemp < 15)
return true
if (agetemp < 20) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "150-159,170-179,199,209-218,239,240-249,250-259,384,500-509,559,540-549", "(C\\d\\d\\d)", 2, 3) || (functions.GEN_INLIST(untrimmedline.primarySite, "180-189,339,340-349", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "00000-82399,82460-99999")) || (functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3) && functions.GEN_MATCH(untrimmedline.morphTypebehavIcdO3, "(\\d\\d\\d\\d3)")))
return false
}
if (agetemp < 30) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C609") || functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "9732, 9823, 9863, 9875, 9876, 9945", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp < 40) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C619") && functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "8140", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 5) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "690-699", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "9510-9514", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 14) {
if (functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "8960,9946", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 45) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C589") && functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "9100", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
return true
}
// ID: NCFD-00008; TAG: N0717; NAME: Age, Primary Site, Morph ICDO3--Pediatric (NPCR)
public boolean ncfd00008(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int agetemp
int dx_year
if (functions.GEN_INLIST(untrimmedline.overRideAgeSiteMorph, "1,3"))
return true
if (functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year < 2001)
return true
agetemp = functions.GEN_VAL(untrimmedline.ageAtDiagnosis)
if (agetemp > 14) {
return true
}
if (agetemp < 3) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9650-9667"))
return false
}
if (agetemp > 9 && agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9490,9500"))
return false
}
if (agetemp > 5 && agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9510-9514"))
return false
}
if (agetemp > 8 && agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8960,8964"))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8963") && functions.GEN_INLIST(untrimmedline.primarySite, "649,809", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 9) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8010-8041,8050-8075,8082,8120-8122,8130-8141,8143,8155,8190-8201") && functions.GEN_INLIST(untrimmedline.primarySite, "649", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8210,8211,8221-8231,8240,8241,8244-8246,8260-8263,8290,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "649", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8323,8401,8430,8440,8480-8490,8504,8510,8550,8560-8573") && functions.GEN_INLIST(untrimmedline.primarySite, "649", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8312"))
return false
}
if (agetemp > 5 && agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8970"))
return false
}
if (agetemp < 9) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8010-8041,8050-8075,8082,8120-8122,8140,8141,8143,8155,8190-8201") && functions.GEN_INLIST(untrimmedline.primarySite, "220,221", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8210,8211,8230,8231,8240,8241,8244-8246,8260-8263,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "220,221", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8323,8401,8430,8440,8480-8490,8504,8510,8550,8560-8573") && functions.GEN_INLIST(untrimmedline.primarySite, "220,221", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8160-8180"))
return false
}
if (agetemp < 6) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9180-9200"))
return false
}
if (agetemp < 6) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9220-9230"))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9231,9240") && functions.GEN_INLIST(untrimmedline.primarySite, "400-419", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 4) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9260") && functions.GEN_INLIST(untrimmedline.primarySite, "400-419,809", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9363,9364") && functions.GEN_INLIST(untrimmedline.primarySite, "400-419", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp > 7 && agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9060-9102") && functions.GEN_INLIST(untrimmedline.primarySite, "000-559,570-619,630-699,739-750,754-809", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8010-8041,8050-8075,8082,8120-8122,8130-8141,8143,8155,8190-8201") && functions.GEN_INLIST(untrimmedline.primarySite, "569,620-629", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8210,8211,8221-8241,8244-8246,8260-8263,8290,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "569,620-629", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8323,8430,8440,8480-8490,8504,8510,8550,8560-8573") && functions.GEN_INLIST(untrimmedline.primarySite, "569,620-629", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8380,8381,8441-8473"))
return false
}
if (agetemp < 6) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8010-8041,8050-8075,8082,8120-8122,8130-8141,8155,8190,8200,8201") && functions.GEN_INLIST(untrimmedline.primarySite, "739", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8211,8230,8231,8244-8246,8260-8263,8290,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "739", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8323,8430,8440,8480,8481,8500-8573") && functions.GEN_INLIST(untrimmedline.primarySite, "739", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8330-8350"))
return false
}
if (agetemp < 6) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8010-8041,8050-8075,8082,8120-8122,8130-8141,8155,8190,8200,8201") && functions.GEN_INLIST(untrimmedline.primarySite, "110-119", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8211,8230,8231,8244-8246,8260-8263,8290,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "110-119", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8323,8430,8440,8480,8481,8504,8510,8550,8560-8573") && functions.GEN_INLIST(untrimmedline.primarySite, "110-119", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 5) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8010-8041,8050-8075,8082,8090-8110,8140,8143,8147,8190,8200") && functions.GEN_INLIST(untrimmedline.primarySite, "440-449", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8240,8246,8247,8260,8310,8320") && functions.GEN_INLIST(untrimmedline.primarySite, "440-449", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8323,8390-8420,8430,8480,8542,8560,8570-8573,8940") && functions.GEN_INLIST(untrimmedline.primarySite, "440-449", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 5) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8010-8082,8120-8155,8190-8263,8290,8310,8314-8323") && functions.GEN_INLIST(untrimmedline.primarySite, "000-109,129-218,239-399,480-488,500-559,570-619,630-639,659-729,750-809", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8430-8440,8480-8580,8940,8941") && functions.GEN_INLIST(untrimmedline.primarySite, "000-109,129-218,239-399,480-488,500-559,570-619,630-639,659-729,750-809", "(C\\d\\d\\d)", 2, 3))
return false
}
if (agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9050-9053"))
return false
}
if (agetemp < 15) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2"))
return false
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9100") && functions.GEN_INLIST(untrimmedline.primarySite, "589", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.primarySite, "150-159,170-179,199,209,210-218,239", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.primarySite, "240-249,250-259,384,500-509,559,540-549,609", "(C\\d\\d\\d)", 2, 3))
return false
if (!functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8240-8245") && functions.GEN_INLIST(untrimmedline.primarySite, "180-189,339,340-349", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "3"))
return false
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8140") && functions.GEN_INLIST(untrimmedline.primarySite, "619", "(C\\d\\d\\d)", 2, 3))
return false
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9732,9823,9863,9875,9876,9945"))
return false
}
return true
}
// ID: NCFD-00009; TAG: N0449; NAME: Age, Primary Site, Morphology ICDO3 (SEER IF15)
public boolean ncfd00009(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int agetemp
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year > 2000)
return true
if (functions.GEN_INLIST(untrimmedline.overRideAgeSiteMorph, "1,3"))
return true
if (functions.GEN_EMPTY(untrimmedline.morphTypebehavIcdO3))
return true /* don't test further if age is unknown */
if (functions.GEN_INLIST(untrimmedline.ageAtDiagnosis, "999"))
return true
agetemp = functions.GEN_VAL(untrimmedline.ageAtDiagnosis)
if (agetemp < 15) {
if ((functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3) && functions.GEN_MATCH(untrimmedline.morphTypebehavIcdO3, "(\\d\\d\\d\\d2)")) || (functions.GEN_INLIST(untrimmedline.primarySite, "C589") && functions.GEN_MATCH(untrimmedline.morphTypebehavIcdO3, "(9100\\d)")))
return false
}
if (agetemp < 20) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "150-159,170-179,199,209-218,239,240-249,250-259,384,500-509,559,540-549", "(C\\d\\d\\d)", 2, 3) || (functions.GEN_INLIST(untrimmedline.primarySite, "180-189,339,340-349", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "00000-82399,82460-99999")) || (functions.GEN_INLIST(untrimmedline.primarySite, "530-539", "(C\\d\\d\\d)", 2, 3) && functions.GEN_MATCH(untrimmedline.morphTypebehavIcdO3, "(\\d\\d\\d\\d3)")))
return false
}
if (agetemp < 30) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C609") || functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "9732, 9823, 9863, 9875, 9876, 9945", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp < 40) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C619") && functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "8140", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 5) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "690-699", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "9510-9514", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 14) {
if (functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "8960,9946", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
if (agetemp > 45) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C589") && functions.GEN_INLIST(untrimmedline.morphTypebehavIcdO3, "9100", "(\\d\\d\\d\\d\\d)", 1, 4))
return false
}
return true
}
// ID: NCFD-00011; TAG: N0653; NAME: Behavior Code ICDO3, Seq Num--Central (SEER IF114)
public boolean ncfd00011(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
if (functions.GEN_EMPTY(untrimmedline.behaviorCodeIcdO3))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if ((dx_year < 2001) && functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8442,8451,8462,8472,8473")) {
if (functions.GEN_INLIST(untrimmedline.sequenceNumberCentral, "00-59,99", "(\\d\\d)")) {
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "1"))
return true
}
}
if (dx_year > 2000) {
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2,3")) {
if (functions.GEN_INLIST(untrimmedline.sequenceNumberCentral, "60-88", "(\\d\\d)"))
return false
}
}
if (functions.GEN_INLIST(untrimmedline.sequenceNumberCentral, "00-59,98,99", "(\\d\\d)")) {
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2,3"))
return true
else
return false
}
if (dx_year > 2000) {
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1")) {
if (functions.GEN_INLIST(untrimmedline.sequenceNumberCentral, "60-88", "(\\d\\d)"))
return true
else
return false
}
}
return true
}
// ID: NCFD-00012; TAG: N0837; NAME: Behavior ICDO3 Conversion (NAACCR)
public boolean ncfd00012(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0-3")
}
// ID: NCFD-00013; TAG: N0654; NAME: Behavior ICDO3, Site, Histology ICDO3 (NAACCR)
public boolean ncfd00013(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dx_year
if (functions.GEN_EMPTY(untrimmedline.behaviorCodeIcdO3))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2,3"))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1")) {
if (dx_year > 2003 && functions.GEN_INLIST(untrimmedline.primarySite, "700-729,751-753", "(C\\d\\d\\d)", 2, 3))
return true
}
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "1")) {
if ((dx_year < 2001) && functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8442,8451,8462,8472,8473"))
return true
}
return false
}
// ID: NCFD-00014; TAG: N0838; NAME: Behavior ICDO3, Summary Stage 1977 (NAACCR)
public boolean ncfd00014(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.seerSummaryStage1977))
return true
if (functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "7"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2")) {
if (functions.GEN_INLIST(untrimmedline.seerSummaryStage1977, "0"))
return true
else
return false
}
else {
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "3")) {
if (!functions.GEN_INLIST(untrimmedline.seerSummaryStage1977, "0"))
return true
else
return false
}
}
return true
}
// ID: NCFD-00015; TAG: N0439; NAME: Behavior ICDO3, Summary Stage 2000 (NAACCR)
public boolean ncfd00015(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.seerSummaryStage2000))
return true
if (functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "7"))
return true
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2")) {
if (functions.GEN_INLIST(untrimmedline.seerSummaryStage2000, "0"))
return true
else
return false
}
else {
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "3")) {
if (!functions.GEN_INLIST(untrimmedline.seerSummaryStage2000, "0"))
return true
else
return false
}
}
return true
}
// ID: NCFD-00016; TAG: N1688; NAME: Birthplace--Country (COC)
public boolean ncfd00016(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.birthplaceCountry))
return true
if (!functions.GEN_LOOKUP(untrimmedline.birthplaceCountry, context.NCFD_CNTRY_ST, context.NCFD_CNTRY_ST_COUNTRY, [:]))
return false
return true
}
// ID: NCFD-00018; TAG: N1672; NAME: Birthplace--Country, Birthplace--State (NAACCR)
public boolean ncfd00018(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] cntry_state = new char[6]
if (functions.GEN_EMPTY(untrimmedline.birthplaceCountry) || functions.GEN_EMPTY(untrimmedline.birthplaceState))
return true
if (functions.GEN_INLIST(untrimmedline.birthplaceState, "XX") && functions.GEN_INLIST(untrimmedline.birthplaceCountry, "ZZX"))
return false
functions.GEN_STRCPY(cntry_state, untrimmedline.birthplaceCountry)
functions.GEN_STRCAT(cntry_state, untrimmedline.birthplaceState)
if (!functions.GEN_LOOKUP(cntry_state, context.NCFD_CNTRY_ST, context.NCFD_CNTRY_ST_CNTRY_ST, [:]))
return false
return true
}
// ID: NCFD-00019; TAG: N1694; NAME: Birthplace--State (COC)
public boolean ncfd00019(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.birthplaceState))
return true
if (!functions.GEN_LOOKUP(untrimmedline.birthplaceState, context.NCFD_CNTRY_ST, context.NCFD_CNTRY_ST_STATE, [:]))
return false
return true
}
// ID: NCFD-00020; TAG: N1693; NAME: Birthplace--State, Date of Diagnosis (NAACCR)
public boolean ncfd00020(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.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return true
if (functions.GEN_EMPTY(untrimmedline.birthplaceState))
return true
if (dx_year > 2012) {
if (functions.GEN_INLIST(untrimmedline.birthplaceState, "NN,MM,PP,XN"))
return false
}
return true
}
// ID: NCFD-00021; TAG: N0908; NAME: CS Eval Items, Type of Reporting Source (CS)
public boolean ncfd00021(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY) || dx_year == ((Integer)context.NCFD_GEN_DT_ERROR) || dx_year > 2017)
return true
if (functions.GEN_EMPTY(untrimmedline.typeOfReportingSource))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "8") || functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "8") || functions.GEN_INLIST(untrimmedline.csMetsEval, "8")) {
if (!functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "6"))
return false
}
return true
}
// ID: NCFD-00022; TAG: N0906; NAME: CS Eval Items, Vital Status (CS)
public boolean ncfd00022(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
int dx_year
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY) || dx_year == ((Integer)context.NCFD_GEN_DT_ERROR) || dx_year > 2017)
return true
if (functions.GEN_EMPTY(untrimmedline.vitalStatus))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland"))
return true
}
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "8") || functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "8") || functions.GEN_INLIST(untrimmedline.csMetsEval, "8")) {
if (!functions.GEN_INLIST(untrimmedline.vitalStatus, "0"))
return false
}
if (functions.GEN_INLIST(t_schema_name, "Prostate")) {
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "3")) {
if (!functions.GEN_INLIST(untrimmedline.vitalStatus, "0"))
return false
}
}
else {
if (functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "2")) {
if (!functions.GEN_INLIST(untrimmedline.vitalStatus, "0"))
return false
}
}
return true
}
// ID: NCFD-00026; TAG: N0656; NAME: CS Extension (CS)
public boolean ncfd00026(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
return functions.GEN_INLIST(untrimmedline.csExtension, "000-999", "(\\d\\d\\d)")
}
// ID: NCFD-00042; TAG: N1116; NAME: CS Extension, Schema (CS)
public boolean ncfd00042(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csExtension) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csExtension)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 2, 1, CS_code)
if (t_result <= 0) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
return true
}
// ID: NCFD-00052; TAG: N0657; NAME: CS Lymph Nodes (CS)
public boolean ncfd00052(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
return functions.GEN_INLIST(untrimmedline.csLymphNodes, "000-999", "(\\d\\d\\d)")
}
// ID: NCFD-00053; TAG: N0660; NAME: CS Lymph Nodes Eval (CS)
public boolean ncfd00053(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csLymphNodesEval))
return true
return functions.GEN_INLIST(untrimmedline.csLymphNodesEval, "0-3,5,6,8,9")
}
// ID: NCFD-00055; TAG: N1175; NAME: CS Lymph Nodes Eval, Schema (CS)
public boolean ncfd00055(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csLymphNodesEval) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csLymphNodesEval)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 5, 1, CS_code)
if (t_result <= 0) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
return true
}
// ID: NCFD-00060; TAG: N1163; NAME: CS Lymph Nodes, Schema (CS)
public boolean ncfd00060(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csLymphNodes)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 4, 1, CS_code)
if (t_result <= 0) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
return true
}
// ID: NCFD-00061; TAG: N0661; NAME: CS Mets Eval (CS)
public boolean ncfd00061(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csMetsEval))
return true
return functions.GEN_INLIST(untrimmedline.csMetsEval, "0-3,5,6,8,9")
}
// ID: NCFD-00063; TAG: N1176; NAME: CS Mets Eval, Schema (CS)
public boolean ncfd00063(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csMetsEval) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csMetsEval)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 9, 1, CS_code)
if (t_result <= 0) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
return true
}
// ID: NCFD-00064; TAG: N0658; NAME: CS Mets at DX (CS)
public boolean ncfd00064(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
return functions.GEN_INLIST(untrimmedline.csMetsAtDx, "00-99", "(\\d\\d)")
}
// ID: NCFD-00066; TAG: N1164; NAME: CS Mets at DX, Schema (CS)
public boolean ncfd00066(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] cs_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDx) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(cs_code, untrimmedline.csMetsAtDx)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 8, 1, cs_code)
if (t_result <= 0) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
return true
}
// ID: NCFD-00069; TAG: 1816; NAME: CS Over-rides (Subm)
public boolean ncfd00069(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.overRideCs20) || functions.GEN_INLIST(untrimmedline.overRideCs20, "1"))
return true
else
return functions.GEN_SAVE_ERROR_TEXT(binding, 'Over-ride CS 20 must be blank or = 1')
return true
}
// ID: NCFD-00072; TAG: N0662; NAME: CS Site-Specific Factor 1 (CS)
public boolean ncfd00072(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor1))
return true
return functions.GEN_MATCH(untrimmedline.csSiteSpecificFactor1, "(\\d\\d\\d)")
}
// ID: NCFD-00074; TAG: N0663; NAME: CS Site-Specific Factor 2 (CS)
public boolean ncfd00074(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor2))
return true
return functions.GEN_MATCH(untrimmedline.csSiteSpecificFactor2, "(\\d\\d\\d)")
}
// ID: NCFD-00078; TAG: N1003; NAME: CS Site-Specific Factor15 (CS)
public boolean ncfd00078(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor15))
return true
return functions.GEN_MATCH(untrimmedline.csSiteSpecificFactor15, "(\\d\\d\\d)")
}
// ID: NCFD-00080; TAG: N1013; NAME: CS Site-Specific Factor25 (CS)
public boolean ncfd00080(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor25))
return true
return functions.GEN_MATCH(untrimmedline.csSiteSpecificFactor25, "(\\d\\d\\d)")
}
// ID: NCFD-00081; TAG: N1387; NAME: CS Site-Specific Factor25, Schema (CS)
public boolean ncfd00081(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor25) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csSiteSpecificFactor25)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 34, 1, CS_code)
if (t_result <= 0) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25 [${untrimmedline.csSiteSpecificFactor25}] must be 981 for this site (${untrimmedline.primarySite}) within this schema')
if (functions.GEN_INLIST(t_schema_name, "EsophagusGEJunction,Nasopharynx,Stomach")) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "110,112,113,118,119,163-169", "(C\\d\\d\\d)", 2, 3)) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor25, "981")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
}
functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25 [${untrimmedline.csSiteSpecificFactor25}] must be 982 for this site (${untrimmedline.primarySite}) within this schema') /*
The following sites within EsophagusGEJunction and
Stomach schemas should have a SSF 25 of 982s. (SSF 25 of spaces are
skipped at beginning of edit).
*/
if (functions.GEN_INLIST(t_schema_name, "EsophagusGEJunction,Nasopharynx,Stomach")) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "160", "(C\\d\\d\\d)", 2, 3)) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor25, "982")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
}
functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25 [${untrimmedline.csSiteSpecificFactor25}] must be 981 for site (${untrimmedline.primarySite})/histology (${untrimmedline.histologicTypeIcdO3}) within this schema')
if (functions.GEN_INLIST(t_schema_name, "Peritoneum") && functions.GEN_INLIST(untrimmedline.primarySite, "481,482,488", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8580-8589,8680-8921,9120-9136,9141-9582,9700-9701")) {
if (!functions.GEN_INLIST(untrimmedline.csSiteSpecificFactor25, "981")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
}
return true
}
// ID: NCFD-00084; TAG: N0655; NAME: CS Tumor Size (CS)
public boolean ncfd00084(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csTumorSize))
return true
return functions.GEN_MATCH(untrimmedline.csTumorSize, "(\\d\\d\\d)")
}
// ID: NCFD-00085; TAG: N1178; NAME: CS Tumor Size, Schema (CS)
public boolean ncfd00085(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csTumorSize) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csTumorSize)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 1, 1, CS_code)
if (t_result <= 0) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
return true
}
// ID: NCFD-00087; TAG: N0659; NAME: CS Tumor Size/Ext Eval (CS)
public boolean ncfd00087(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.csTumorSizeExtEval))
return true
return functions.GEN_INLIST(untrimmedline.csTumorSizeExtEval, "0-6,8,9")
}
// ID: NCFD-00088; TAG: N1177; NAME: CS Tumor Size/Ext Eval, Schema (CS)
public boolean ncfd00088(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
char[] CS_code = new char[4]
int t_schema_number, t_max_schemas, t_result
if (functions.GEN_EMPTY(untrimmedline.csTumorSizeExtEval) || functions.GEN_EMPTY(untrimmedline.primarySite) || functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0)
return true
if (t_schema_number > t_max_schemas) {
return true
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "0,1,")) {
if (!functions.GEN_INLIST(t_schema_name, "Brain,CNSOther,IntracranialGland")) {
return true
}
}
functions.GEN_STRCPY(CS_code, untrimmedline.csTumorSizeExtEval)
t_result = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_code_is_valid", t_schema_number, 3, 1, CS_code)
if (t_result <= 0) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return false
}
return true
}
// ID: NCFD-00100; TAG: N0309; NAME: Census Tr Cert 1970/80/90 (SEER CENSCERT)
public boolean ncfd00100(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.censusTrCert19708090))
return true
return functions.GEN_INLIST(untrimmedline.censusTrCert19708090, "1-6, 9")
}
// ID: NCFD-00101; TAG: N0540; NAME: Census Tr Certainty 2000 (SEER)
public boolean ncfd00101(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.censusTrCertainty2000))
return true
return functions.GEN_INLIST(untrimmedline.censusTrCertainty2000, "1-6, 9")
}
// ID: NCFD-00102; TAG: N1374; NAME: Census Tr Certainty 2010 (SEER)
public boolean ncfd00102(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.censusTrCertainty2010))
return true
return functions.GEN_INLIST(untrimmedline.censusTrCertainty2010, "1-6, 9")
}
// ID: NCFD-00109; TAG: N0651; NAME: County at DX Reported (Subm)
public boolean ncfd00109(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_INLIST(untrimmedline.countyAtDx, "998"))
return false
return functions.GEN_MATCH(untrimmedline.countyAtDx, "(\\d\\d\\d)")
}
// ID: NCFD-00110; TAG: 1799; NAME: County at DX, Addr at DX--State (Subm)
public boolean ncfd00110(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] cnty_state = new char[6]
if (functions.GEN_EMPTY(untrimmedline.countyAtDx) || functions.GEN_EMPTY(untrimmedline.addrAtDxState))
return true
if (functions.GEN_INLIST(untrimmedline.countyAtDx, "000"))
return true
if (functions.GEN_INLIST(untrimmedline.addrAtDxState, "CD,US,XX,YY,ZZ"))
return true
if (functions.GEN_INLIST(untrimmedline.addrAtDxState, "AB,BC,MB,NB,NL,NT,NS,NU,ON,PE,QC,SK,YT"))
return true
if (functions.GEN_INLIST(untrimmedline.addrAtDxState, "AA,AE,AP"))
return true
functions.GEN_STRCPY(cnty_state, untrimmedline.countyAtDx)
functions.GEN_STRCAT(cnty_state, untrimmedline.addrAtDxState)
if (functions.GEN_LOOKUP(cnty_state, context.NCFD_CNTYALL, context.NCFD_CNTYALL_CNTYSTAT, [:]))
return true
return false
}
// ID: NCFD-00121; TAG: N1034; NAME: Date of Birth (NAACCR)
public boolean ncfd00121(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfBirth))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfBirth))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Birth: %DC')
return false
}
return true
}
// ID: NCFD-00124; TAG: N1048; NAME: Date of Birth, Date of Diagnosis (NAACCR IF47)
public boolean ncfd00124(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int months_diff, err_flag, dtcmp
if (functions.GEN_EMPTY(untrimmedline.dateOfBirth) || functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis))
return true
dtcmp = functions.GEN_DATECMP_IOP(binding, untrimmedline.dateOfBirth, untrimmedline.dateOfDiagnosis, ((Integer)context.NCFD_GEN_DT_MIN))
if (dtcmp == ((Integer)context.NCFD_GEN_DT_ERROR)) {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfBirth))
functions.GEN_ERROR_TEXT(binding, 'Date of Birth is invalid: %DC')
else {
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDiagnosis))
functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis is invalid: %DC')
}
return false
}
if (dtcmp <= 0)
return true
err_flag = 1
// *** START function call Check_InUtero()
int dx_year_1, birth_year_1
dx_year_1 = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
birth_year_1 = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfBirth)
if (dx_year_1 >= birth_year_1)
months_diff = functions.GEN_MONTHDIFF_IOP(binding, untrimmedline.dateOfDiagnosis, untrimmedline.dateOfBirth, ((Integer)context.NCFD_GEN_DT_MIN))
else
months_diff = functions.GEN_MONTHDIFF_IOP(binding, untrimmedline.dateOfBirth, untrimmedline.dateOfDiagnosis, ((Integer)context.NCFD_GEN_DT_MIN))
if (months_diff <= 7) {
if (functions.GEN_INLIST(untrimmedline.overRideAgeSiteMorph, "2,3"))
err_flag = 0
else
functions.GEN_ERROR_TEXT(binding, 'Please Review: Set over-ride to 2 or 3 if case diagnosed in utero')
}
else
functions.GEN_ERROR_TEXT(binding, 'Please Review: Date of Birth cannot be more than 7 months after Diagnosis')
null// *** END function call Check_InUtero()
if (err_flag == 1)
return false
return true
}
// ID: NCFD-00125; TAG: N0021; NAME: Date of Diagnosis (NAACCR DATEEDIT)
public boolean ncfd00125(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDiagnosis))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
return false
}
return true
}
// ID: NCFD-00128; TAG: N0022; NAME: Date of Last Contact (NAACCR DATEEDIT)
public boolean ncfd00128(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.dateOfLastContact))
return true
if (functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfLastContact))
return true
else {
functions.GEN_ERROR_TEXT(binding, 'Date of Last Contact: %DC')
return false
}
return true
}
// ID: NCFD-00131; TAG: N0024; NAME: Date of Last Contact, Date of Diag (NAACCR IF19)
public boolean ncfd00131(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dtcmp
int dx_year, dx_month, dx_day, last_year, last_month, last_day
if (functions.GEN_EMPTY(untrimmedline.dateOfLastContact) || functions.GEN_EMPTY(untrimmedline.dateOfDiagnosis))
return true
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfDiagnosis))
return true
if (!functions.GEN_VALID_DATE_IOP(binding, untrimmedline.dateOfLastContact))
return true
dtcmp = functions.GEN_DATECMP_IOP(binding, untrimmedline.dateOfDiagnosis, untrimmedline.dateOfLastContact, ((Integer)context.NCFD_GEN_DT_EXACT))
if (dtcmp <= 0)
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
dx_month = functions.GEN_DATE_MONTH_IOP(binding, untrimmedline.dateOfDiagnosis)
dx_day = functions.GEN_DATE_DAY_IOP(binding, untrimmedline.dateOfDiagnosis)
last_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfLastContact)
last_month = functions.GEN_DATE_MONTH_IOP(binding, untrimmedline.dateOfLastContact)
last_day = functions.GEN_DATE_DAY_IOP(binding, untrimmedline.dateOfLastContact)
if (dx_month == ((Integer)context.NCFD_GEN_DT_MONTH_EMPTY) || last_month == ((Integer)context.NCFD_GEN_DT_MONTH_EMPTY)) {
if (dx_year <= last_year)
return true
else
return false
}
else {
if (dx_day == ((Integer)context.NCFD_GEN_DT_DAY_EMPTY) || last_day == ((Integer)context.NCFD_GEN_DT_DAY_EMPTY)) {
if (dx_year < last_year)
return true
else {
if (dx_year == last_year && dx_month <= last_month)
return true
else
return false
}
}
else
return false
}
return false
}
// ID: NCFD-00137; TAG: N0673; NAME: Derived SS2000 (CS)
public boolean ncfd00137(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.derivedSs2000))
return true
if (functions.GEN_INLIST(untrimmedline.derivedSs2000, "0-5, 7-9"))
return true
return false
}
// ID: NCFD-00139; TAG: N0217; NAME: Diagnostic Confirm, Seq Num--Central (SEER IF23)
public boolean ncfd00139(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_INLIST(untrimmedline.overRideSeqnoDxconf, "1") || functions.GEN_INLIST(untrimmedline.primarySite, "760-768, 809", "(C\\d\\d\\d)", 2, 3) || functions.GEN_INLIST(untrimmedline.sequenceNumberCentral, "60-99"))
return true
if (functions.GEN_INLIST(untrimmedline.diagnosticConfirmation, "6-9") && !functions.GEN_MATCH(untrimmedline.sequenceNumberCentral, "(00)"))
return false
return true
}
// ID: NCFD-00140; TAG: N0003; NAME: Diagnostic Confirmation (SEER DXCONF)
public boolean ncfd00140(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_INLIST(untrimmedline.diagnosticConfirmation, "1-9")
}
// ID: NCFD-00141; TAG: N0471; NAME: Diagnostic Confirmation, Behavior ICDO3 (SEER IF31)
public boolean ncfd00141(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.behaviorCodeIcdO3))
return true
if (functions.GEN_MATCH(untrimmedline.overRideHistology, "(2)|(3)"))
return true
if (functions.GEN_MATCH(untrimmedline.behaviorCodeIcdO3, "(2)")) {
if (!functions.GEN_INLIST(untrimmedline.diagnosticConfirmation, "1,2,4"))
return false
}
return true
}
// ID: NCFD-00142; TAG: N0444; NAME: Diagnostic Confirmation, Histology ICDO3 (SEER IF48)
public boolean ncfd00142(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
if (functions.GEN_INLIST(untrimmedline.overRideLeukLymphoma, "1"))
return true
if ((functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590-9993", "(\\d\\d\\d\\d)") && functions.GEN_INLIST(untrimmedline.diagnosticConfirmation, "6")))
return false
if (functions.GEN_INLIST(untrimmedline.diagnosticConfirmation, "3")) {
if (!functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590-9993"))
return false
}
return true
}
// ID: NCFD-00144; TAG: N0027; NAME: Edit Over-rides (SEER REVIEWFL)
public boolean ncfd00144(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_MATCH(untrimmedline.overRideSiteType, "(1)|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideHistology, "([1-3])|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideAgeSiteMorph, "([1-3])|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideSeqnoDxconf, "(1)|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideSiteLatSeqno, "(1)|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideSurgDxconf, "(1)|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideReportSource, "(1)|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideIllDefineSite, "(1)|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideLeukLymphoma, "(1)|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideSiteBehavior, "(1)|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideSiteEodDxDt, "(1)|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideSiteLatEod, "(1)|(\\s)") && functions.GEN_MATCH(untrimmedline.overRideSiteLatMorph, "(1)|(\\s)"))
return true
else
return false
return true
}
// ID: NCFD-00146; TAG: N1030; NAME: Follow-Up Source Central, Vital Status (NPCR)
public boolean ncfd00146(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.followUpSourceCentral) || functions.GEN_EMPTY(untrimmedline.vitalStatus))
return true
if (functions.GEN_INLIST(untrimmedline.followUpSourceCentral, "04, 05, 06, 07, 64", "(\\d\\d)")) {
if (functions.GEN_INLIST(untrimmedline.vitalStatus, "1"))
return false
}
return true
}
// ID: NCFD-00147; TAG: N0372; NAME: Follow-Up Source, Vital Status (COC)
public boolean ncfd00147(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.followUpSource) || functions.GEN_EMPTY(untrimmedline.vitalStatus))
return true
if (functions.GEN_INLIST(untrimmedline.followUpSource, "7")) {
if (functions.GEN_INLIST(untrimmedline.vitalStatus, "1"))
return false
}
return true
}
// ID: NCFD-00148; TAG: N0750; NAME: Follow-up Source Central (NAACCR)
public boolean ncfd00148(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.followUpSourceCentral))
return true
return functions.GEN_INLIST(untrimmedline.followUpSourceCentral, "00-12,29-35,39-43,48-51,59-65,98,99", "(\\d\\d)")
}
// ID: NCFD-00149; TAG: N0751; NAME: Follow-up Source Central, Date of DX (NPCR)
public boolean ncfd00149(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.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year > 2005) {
if (functions.GEN_EMPTY(untrimmedline.followUpSourceCentral))
return false
}
return true
}
// ID: NCFD-00153; TAG: N0839; NAME: Hemato ICDO3, Summ Stg 1977 (NAACCR)
public boolean ncfd00153(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.seerSummaryStage1977))
return true
if (functions.GEN_INLIST(untrimmedline.typeOfReportingSource, "7"))
return true
if (!functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9731-9989"))
return true
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9731,9734,9740,9750-9752,9755-9758,9764,9930")) {
if (functions.GEN_INLIST(untrimmedline.seerSummaryStage1977, "1,7,9"))
return true
else
return functions.GEN_ERROR_MSG(binding, 'SEER Summary Stage must = 1, 7, or 9 for this histology')
}
else {
if (functions.GEN_INLIST(untrimmedline.seerSummaryStage1977, "7"))
return true
else
return functions.GEN_ERROR_MSG(binding, 'SEER Summary Stage must = 7 for this histology')
}
return true
}
// ID: NCFD-00154; TAG: N1784; NAME: Histologic Type ICD-O-3, Behavior, Grade (SEER)
public boolean ncfd00154(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.NCFD_GEN_DT_EMPTY) || dx_year == ((Integer)context.NCFD_GEN_DT_ERROR) || dx_year > 2017)
return true
if (functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3) || functions.GEN_EMPTY(untrimmedline.behaviorCodeIcdO3) || functions.GEN_EMPTY(untrimmedline.grade))
return true
if (functions.GEN_INLIST(untrimmedline.grade, "5,6,7,8")) {
if (!functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590-9992"))
return functions.GEN_ERROR_MSG(binding, 'Grades 5-8 allowed only for histologies 9590-9992')
}
if (!functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "3"))
return true
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8331,9511")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "1"))
return functions.GEN_ERROR_MSG(binding, 'This histology (${untrimmedline.histologicTypeIcdO3}) carries an implied grade of 1')
else
return true
}
else {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8020,8021,9082,9083")) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C809") && functions.GEN_INLIST(untrimmedline.grade, "9"))
return true
else {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9083")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "2"))
return functions.GEN_ERROR_MSG(binding, 'This histology (${untrimmedline.histologicTypeIcdO3}) carries an implied grade of 2')
else
return true
}
else {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8020,8021,9082")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "4"))
return functions.GEN_ERROR_MSG(binding, 'This histology (${untrimmedline.histologicTypeIcdO3}) carries an implied grade of 4')
else
return true
}
else {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9401,9451,9512")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "4"))
return functions.GEN_ERROR_MSG(binding, 'This histology (${untrimmedline.histologicTypeIcdO3}) carries an implied grade of 4')
else
return true
}
}
}
}
}
}
return true
}
// ID: NCFD-00155; TAG: N0840; NAME: Histologic Type ICDO3 Conversion (NAACCR)
public boolean ncfd00155(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (!functions.GEN_SQLLOOKUP((com.imsweb.validation.entities.ContextTable)context.NCFD_HISICDO3, (com.imsweb.validation.entities.ContextTableIndex)context.NCFD_HISICDO3_HISTOLOGY, untrimmedline.histologicTypeIcdO3, [:]))
return false
return true
}
// ID: NCFD-00156; TAG: N1965; NAME: Histology ICDO3, Grade, Date of DX (SEER)
public boolean ncfd00156(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.NCFD_GEN_DT_EMPTY)) || (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR)))
return true
if (dx_year < 2010 || dx_year > 2017)
return true
if ((functions.GEN_EMPTY(untrimmedline.grade)) || (functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3)))
return true
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9700-9702,9705,9708,9709,9716-9718,9724-9726")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "5"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must be 5 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9714")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "5,6"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must be 5 or 6 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9827,9834,9837")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "5"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must be 5 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9591,9596,9597,9659,9671,9673,9678-9680,9687-9691")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "6"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must be 6 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9695,9698,9699,9712,9731,9732,9734,9737,9738,9761,9762,9811-9818")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "6"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must be 6 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9823,9826,9833,9940")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "6"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must be 6 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9719,9948")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "8"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must be 8 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9740-9742,9751,9755-9759,9801,9806-9809,9875,9876,9945,9946")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "9"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must be 9 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9950,9961-9964,9975,9980,9982,9983,9985,9986,9989,9991,9992")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "9"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must be 9 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9831")) {
if (!functions.GEN_INLIST(untrimmedline.grade, "5,8,9"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must be 5, 8, or 9 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590,9650,9651,9652,9653,9655,9663,9727,9735,9800,9820,9832")) {
if (functions.GEN_INLIST(untrimmedline.grade, "1-4"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must not = 1-4 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9840,9860,9861,9863,9865-9867,9869,9870-9874,9891,9895-9898,9910,9911")) {
if (functions.GEN_INLIST(untrimmedline.grade, "1-4"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must not = 1-4 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9920,9930,9931,9965,9966,9967,9971")) {
if (functions.GEN_INLIST(untrimmedline.grade, "1-4"))
return functions.GEN_ERROR_MSG(binding, 'Grade [${untrimmedline.grade}] must not = 1-4 when Histologic Type ICD-O-3 = ${untrimmedline.histologicTypeIcdO3}')
}
return true
}
// ID: NCFD-00159; TAG: N0713; NAME: ICD Revision, Vital Stat, Date Last Contact (NPCR)
public boolean ncfd00159(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int dolc_year
if (functions.GEN_EMPTY(untrimmedline.causeOfDeath))
functions.GEN_NOOP()
if (functions.GEN_EMPTY(untrimmedline.icdRevisionNumber))
return true
dolc_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfLastContact)
if (dolc_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dolc_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Last Contact: %DC')
if (functions.GEN_INLIST(untrimmedline.vitalStatus, "0")) {
if (dolc_year > 1978 && dolc_year < 1999) {
if (!functions.GEN_INLIST(untrimmedline.icdRevisionNumber, "0,1"))
return true
else
return false
}
else {
if (dolc_year == 1999) {
if (functions.GEN_INLIST(untrimmedline.icdRevisionNumber, "9,1"))
return true
else
return false
}
else {
if (dolc_year > 1999) {
if (functions.GEN_INLIST(untrimmedline.icdRevisionNumber, "1"))
return true
else
return false
}
}
}
}
if (functions.GEN_INLIST(untrimmedline.vitalStatus, "1")) {
if (!functions.GEN_INLIST(untrimmedline.icdRevisionNumber, "0"))
return false
}
return true
}
// ID: NCFD-00160; TAG: N0753; NAME: IHS Link (NPCR)
public boolean ncfd00160(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.ihsLink))
return true
return functions.GEN_INLIST(untrimmedline.ihsLink, "0,1")
}
// ID: NCFD-00161; TAG: N0005; NAME: Laterality (SEER LATERAL)
public boolean ncfd00161(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
return functions.GEN_INLIST(untrimmedline.laterality, "0,1,2,3,4,5,9")
}
// ID: NCFD-00163; TAG: N0445; NAME: Laterality, Primary Site, Morph ICDO3 (SEER IF42)
public boolean ncfd00163(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
boolean paired_organ
int dx_year
if (functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
if (functions.GEN_MATCH(untrimmedline.overRideSiteLatMorph, "(1)"))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (functions.GEN_AT(untrimmedline.behaviorCodeIcdO3, "2") == 0)
return true
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590-9999", "(\\d\\d\\d\\d)"))
return true
if (dx_year > 1987 && functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9140,9700,9701,9590-9980", "(\\d\\d\\d\\d)"))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year >= 2021) {
if (functions.GEN_AT(untrimmedline.primarySite, "C444C443C445", 4) != 0) {
if (functions.GEN_AT(untrimmedline.laterality, "0") != 0)
functions.GEN_SAVE_ERROR_TEXT(binding, 'Laterality must not = 0 for Primary Site: ${untrimmedline.primarySite} for Date of Diagnosis >= 2021')
else
return true
}
}
if (dx_year >= 2018) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "090,091", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_AT(untrimmedline.laterality, "0"))
return true
}
}
paired_organ = functions.GEN_ILOOKUP(untrimmedline.primarySite, context.NCFD_PAIRORGN, context.NCFD_PAIRORGN_PAIRSITE, [:]) || (dx_year > 1978 && functions.GEN_INLIST(untrimmedline.primarySite, "081,090,400-403,441,442,446,447,471,472,491,492", "(C\\d\\d\\d)", 2, 3))
if (paired_organ) {
if (functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2")) {
if (!functions.GEN_INLIST(untrimmedline.laterality, "1-3,5"))
return false
}
}
return true
}
// ID: NCFD-00164; TAG: N0841; NAME: Lymphoma ICDO3, Site, Summ Stg 1977 (NAACCR)
public boolean ncfd00164(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.seerSummaryStage1977))
return true
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9590-9699, 9702-9729")) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "770-779", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.seerSummaryStage1977, "3,4"))
return false
}
if (functions.GEN_INLIST(untrimmedline.primarySite, "778", "(C\\d\\d\\d)", 2, 3)) {
if (functions.GEN_INLIST(untrimmedline.seerSummaryStage1977, "1"))
return false
}
}
return true
}
// ID: NCFD-00165; TAG: N0472; NAME: Morphology--Type/Behavior ICDO3 (SEER MORPH)
public boolean ncfd00165(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
int morphflg, i, benign_ok
int dx_year
char[] histbeh = new char[6]
morphflg = 0
if (functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3) || functions.GEN_EMPTY(untrimmedline.behaviorCodeIcdO3))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY) || dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return true
if (dx_year >= 2018 && functions.GEN_AT(untrimmedline.primarySite, "C723") != 0 && functions.GEN_AT(untrimmedline.histologicTypeIcdO3, "9421") != 0 && functions.GEN_AT(untrimmedline.behaviorCodeIcdO3, "1") != 0) {
return true
}
if (!functions.GEN_SQLLOOKUP((com.imsweb.validation.entities.ContextTable)context.NCFD_HISICDO3, (com.imsweb.validation.entities.ContextTableIndex)context.NCFD_HISICDO3_HISTOLOGY, untrimmedline.histologicTypeIcdO3, [:]))
return functions.GEN_ERROR_MSG(binding, 'Histologic Type not valid - ICDO3')
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9597,9688,9712,9724,9725,9726,9735,9737,9738,9759,9806") || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9807,9808,9809,9811,9812,9813,9814,9815,9816,9817,9818") || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9865,9869,9898,9911,9965,9966,9967,9971,9991,9992")) {
if (dx_year < 2010)
return functions.GEN_ERROR_MSG(binding, 'Histologic Type ICD-O-3 (${untrimmedline.histologicTypeIcdO3}) is not allowed if DX year < 2010')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8343") && functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2")) {
if (dx_year < 2017) {
if (!functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3"))
return functions.GEN_ERROR_MSG(binding, 'Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3} with Behavior Code ICD-O-3: ${untrimmedline.behaviorCodeIcdO3} not allowed for diagnosis year < 2017')
}
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8023,8054,8085,8086,8158,8163,8256,8257,8265,8339") || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8474,8509,8519,8552,8594,8714,8975,9045,9086,9137,9385") || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9395, 9396,9425, 9431, 9432, 9445, 9475, 9476, 9477") || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9478, 9509, 9542")) {
if (dx_year < 2018)
return functions.GEN_ERROR_MSG(binding, 'Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3} not allowed if diagnosis year < 2018')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8104,8273,8348,8349,8563,8643,8816,8817,8818,8828") || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8992,9126,9138,9211,9212,9213,9222,9563,9715,9749") || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9819,9877,9878 9879,9912,9968,9993")) {
if (dx_year < 2021)
return functions.GEN_ERROR_MSG(binding, 'Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3} not allowed if diagnosis year < 2021')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8455,8483,8484,8859,8976,9111,9366,9367,9368")) {
if (dx_year < 2022)
return functions.GEN_ERROR_MSG(binding, 'Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3} not allowed if diagnosis year < 2022')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9751,9831,9975") && functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "3")) {
if (dx_year < 2010) {
if (!functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3"))
return functions.GEN_ERROR_MSG(binding, 'If DX year < 2010, Behavior Code ICD-O-3 (${untrimmedline.behaviorCodeIcdO3}) is not allowed for Histologic Type ICD-O-3 (${untrimmedline.histologicTypeIcdO3})')
}
if (dx_year >= 2010) {
if (functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3"))
return functions.GEN_ERROR_MSG(binding, 'Over-ride Histology is not required for Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3}/${untrimmedline.behaviorCodeIcdO3} for Date of Diagnosis: ${untrimmedline.dateOfDiagnosis.formatDate()} and should not be used')
}
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8311,8825,8842,8983,9302,9341") && functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "3")) {
if (dx_year < 2018) {
if (!functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3"))
return functions.GEN_ERROR_MSG(binding, 'if DX year < 2018 Behavior Code ICD-O-3: ${untrimmedline.behaviorCodeIcdO3} not allowed for Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3}')
}
if (dx_year >= 2018) {
if (functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3"))
return functions.GEN_ERROR_MSG(binding, 'Over-ride Histology is not required for Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3}/${untrimmedline.behaviorCodeIcdO3} for Date of Diagnosis: ${untrimmedline.dateOfDiagnosis.formatDate()} and should not be used')
}
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8158,8681,8682,8690,9766") && functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "3")) {
if (dx_year < 2021) {
if (!functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3"))
return functions.GEN_ERROR_MSG(binding, 'if DX year < 2021 Behavior Code ICD-O-3: ${untrimmedline.behaviorCodeIcdO3} not allowed for Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3}')
}
if (dx_year >= 2021) {
if (functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3"))
return functions.GEN_ERROR_MSG(binding, 'Over-ride Histology is not required for Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3}/${untrimmedline.behaviorCodeIcdO3} for Date of Diagnosis: ${untrimmedline.dateOfDiagnosis.formatDate()} and should not be used')
}
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9222") && functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "3")) {
if (dx_year < 2022) {
if (!functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3"))
return functions.GEN_ERROR_MSG(binding, 'if DX year < 2022 Behavior Code ICD-O-3: ${untrimmedline.behaviorCodeIcdO3} not allowed for Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3}')
}
if (dx_year >= 2022) {
if (functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3"))
return functions.GEN_ERROR_MSG(binding, 'Over-ride Histology is not required for Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3}/${untrimmedline.behaviorCodeIcdO3} for Date of Diagnosis: ${untrimmedline.dateOfDiagnosis.formatDate()} and should not be used')
}
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9421")) {
if (!functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "3"))
return functions.GEN_ERROR_MSG(binding, 'Behavior must be 3 for this histology')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8077")) {
if (!functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2"))
return functions.GEN_ERROR_MSG(binding, 'Behavior must be 2 for this histology')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8833, 9260, 9725, 9971") && functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "3")) {
if (dx_year > 2020) {
if (!functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3"))
return functions.GEN_ERROR_MSG(binding, 'Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3} not allowed if diagnosis year > 2020')
}
}
if (functions.GEN_STRCMP(untrimmedline.behaviorCodeIcdO3, "2") == 0 && !functions.GEN_INLIST(untrimmedline.overRideHistology, "1,3")) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8000-8005,8020-8021,8331-8332") || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8800-9055,9062-9062,9082-9083") || functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9110-9493,9501-9989"))
return functions.GEN_ERROR_MSG(binding, 'Invalid Histology for In Situ - ICDO3')
}
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8519") && !functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2"))
return functions.GEN_ERROR_MSG(binding, 'Behavior must be 2 for this histology')
if (dx_year >= 2018) {
if (functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "9540") && functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "1"))
return functions.GEN_ERROR_MSG(binding, 'Histologic Type ICD-O-3: ${untrimmedline.histologicTypeIcdO3} with Behavior Code ICD-O-3: ${untrimmedline.behaviorCodeIcdO3} not allowed for 2018+ diagnosis')
}
return true
}
// ID: NCFD-00166; TAG: N0033; NAME: NAACCR Record Version (NAACCR)
public boolean ncfd00166(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_STRCMP(untrimmedline.naaccrRecordVersion, "220") != 0)
return false
return true
}
// ID: NCFD-00167; TAG: N0739; NAME: NHIA Derived Hisp Origin (NAACCR)
public boolean ncfd00167(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.nhiaDerivedHispOrigin))
return true
return functions.GEN_INLIST(untrimmedline.nhiaDerivedHispOrigin, "0-8")
}
// ID: NCFD-00168; TAG: N0736; NAME: Non-Reportable Skin ICDO3 (SEER IF117)
public boolean ncfd00168(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
if (functions.GEN_EMPTY(untrimmedline.histologicTypeIcdO3))
return true
if (functions.GEN_INLIST(untrimmedline.primarySite, "440-449", "(C\\d\\d\\d)", 2, 3) && functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8000-8110"))
return false
return true
}
// ID: NCFD-00169; TAG: N1206; NAME: Obsolete Codes - CS Extension (CS)
public boolean ncfd00169(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csExtension))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "2 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csExtension)
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("2", table) == 0 && functions.GEN_STRCMP(untrimmedline.csExtension, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csExtension, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Extension=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00170; TAG: N1256; NAME: Obsolete Codes - CS Lymph Nodes (CS)
public boolean ncfd00170(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csLymphNodes))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "4 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csLymphNodes)
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("4", table) == 0 && functions.GEN_STRCMP(untrimmedline.csLymphNodes, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csLymphNodes, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00171; TAG: N1260; NAME: Obsolete Codes - CS Lymph Nodes Eval (CS)
public boolean ncfd00171(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csLymphNodesEval))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "5 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csLymphNodesEval)
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("5", table) == 0 && functions.GEN_STRCMP(untrimmedline.csLymphNodesEval, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csLymphNodesEval, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16 ") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Lymph Nodes Eval=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00172; TAG: N1261; NAME: Obsolete Codes - CS Mets Eval (CS)
public boolean ncfd00172(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csMetsEval))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "9 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csMetsEval)
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("9", table) == 0 && functions.GEN_STRCMP(untrimmedline.csMetsEval, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csMetsEval, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets Eval=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00173; TAG: N1257; NAME: Obsolete Codes - CS Mets at DX (CS)
public boolean ncfd00173(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csMetsAtDx))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "8 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csMetsAtDx)
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("8", table) == 0 && functions.GEN_STRCMP(untrimmedline.csMetsAtDx, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csMetsAtDx, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Mets at DX=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00174; TAG: 1817; NAME: Obsolete Codes - CS Site-Specific Factor 1 (Subm)
public boolean ncfd00174(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor1))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("CStage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("CStage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("CStage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Pleura,Breast,Lung,Brain,CNSOther,IntracranialGland,Prostate"))
return true
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "10")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor1)
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("10", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor1, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor1, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 1=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00175; TAG: 1818; NAME: Obsolete Codes - CS Site-Specific Factor 2 (Subm)
public boolean ncfd00175(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor2))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("CStage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("CStage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("CStage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Breast,CorpusAdenosarcoma,CorpusCarcinoma,CorpusSarcoma"))
return true
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "11")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor2)
if (functions.GEN_INLIST(t_schema_name, "MelanomaIris"))
return true
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("11", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor2, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor2, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor 2=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00177; TAG: 1820; NAME: Obsolete Codes - CS Site-Specific Factor15 (Subm)
public boolean ncfd00177(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor15))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("CStage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("CStage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("CStage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
if (!functions.GEN_INLIST(t_schema_name, "Breast"))
return true
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "24")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor15)
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("24", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor15, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor15, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor15=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00178; TAG: N1268; NAME: Obsolete Codes - CS Site-Specific Factor25 (CS)
public boolean ncfd00178(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csSiteSpecificFactor25))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name)
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "34")
functions.GEN_STRCAT(t_index1, untrimmedline.csSiteSpecificFactor25)
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("34", table) == 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor25, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csSiteSpecificFactor25, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Site-Specific Factor25=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00179; TAG: N1258; NAME: Obsolete Codes - CS Tumor Size (CS)
public boolean ncfd00179(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csTumorSize))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name) /*
StrCpy(t_sch_code, t_schema_name,-27);
StrCat(t_sch_code, "CS Tumor Size ");
StrCat (t_sch_code, #S"CS Tumor Size");
*/
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "1 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csTumorSize)
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("1", table) == 0 && functions.GEN_STRCMP(untrimmedline.csTumorSize, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csTumorSize, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00180; TAG: N1259; NAME: Obsolete Codes - CS Tumor Size/Ext Eval (CS)
public boolean ncfd00180(Binding binding, Map context, MetafileContextFunctions functions, List> untrimmedlines, Map untrimmedline) throws Exception {
functions.GEN_RESET_LOCAL_CONTEXT(binding)
char[] schema = new char[33], table = new char[3], code_low = new char[5], code_high = new char[5], obs_type = new char[3], index1 = new char[100]
char[] t_index1 = new char[100]
char[] t_site = new char[5], t_hist = new char[5], t_discrim = new char[4], t_schema_name = new char[31], t_schema_msg = new char[79]
int t_schema_number, t_max_schemas, t_result
char[] t_schema_str = new char[4]
char[] t_sch_code = new char[61]
char[] t_descr = new char[51]
char[] t_obs_type = new char[3]
int dx_year
if (functions.GEN_EMPTY(untrimmedline.csTumorSizeExtEval))
return true
if (functions.GEN_EMPTY(untrimmedline.csVersionInputOriginal))
return true
dx_year = functions.GEN_DATE_YEAR_IOP(binding, untrimmedline.dateOfDiagnosis)
if (dx_year == ((Integer)context.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
functions.GEN_STRCPY(t_site, untrimmedline.primarySite)
functions.GEN_STRCPY(t_hist, untrimmedline.histologicTypeIcdO3)
functions.GEN_STRCPY(t_discrim, untrimmedline.csSiteSpecificFactor25)
t_max_schemas = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_number_of_schemas")
t_schema_number = functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_number", t_site, t_hist, t_discrim)
if (t_schema_number < 0) {
functions.GEN_ERROR_TEXT(binding, 'Invalid site or histology')
return false
}
else {
if (t_schema_number > t_max_schemas) {
functions.GEN_ERROR_TEXT(binding, 'Schema discriminator missing or invalid')
return false
}
}
functions.GEN_EXTERNALDLL("cstage0205.dll", "CStage_get_schema_name", t_schema_number, t_schema_name) /*
StrCpy(t_sch_code, t_schema_name,-27);
StrCat(t_sch_code, "CS Tumor Size/Ext Eval ");
StrCat (t_sch_code, #S"CS Tumor Size/Ext Eval");
*/
functions.GEN_STRCPY(t_index1, t_schema_name, -32)
functions.GEN_STRCAT(t_index1, "3 ")
functions.GEN_STRCAT(t_index1, untrimmedline.csTumorSizeExtEval)
if (functions.GEN_RLOOKUP(t_index1, context.NCFD_CS_OBS, context.NCFD_CS_OBS_INDEX1, ['SCHEMA':schema, 'TABLE':table, 'CODE_LOW':code_low, 'CODE_HIGH':code_high, 'OBS_TYPE':obs_type, 'INDEX1':index1])) {
if (functions.GEN_STRCMP(t_schema_name, schema) == 0 && functions.GEN_STRCMP("3", table) == 0 && functions.GEN_STRCMP(untrimmedline.csTumorSizeExtEval, code_low) >= 0 && functions.GEN_STRCMP(untrimmedline.csTumorSizeExtEval, code_high) <= 0) {
functions.GEN_STRCPY(t_obs_type, obs_type)
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "1 ,5 ,6 ,7 ,16") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "2 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA CONVERTED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "3 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA CONVERTED V0104')
}
if (functions.GEN_INLIST(t_obs_type, "4 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA CONVERTED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "8 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED AND CHANGED V0102')
}
if (functions.GEN_INLIST(t_obs_type, "9 ")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED AND CHANGED V0103')
}
if (functions.GEN_INLIST(t_obs_type, "10")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED AND CHANGED V0200')
}
if (functions.GEN_INLIST(t_obs_type, "11")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA CONVERTED V0203')
}
if (functions.GEN_INLIST(t_obs_type, "12")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED AND CHANGED V0203')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "13") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "14") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0203 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "15") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20300)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0203 - not allowed if CS Version Input Original > or = 020300')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && dx_year > 2010)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0202 - not allowed if DX > 2010')
}
if ((functions.GEN_INLIST(t_obs_type, "17") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20200)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0202 - not allowed if CS Version Input Original > or = 020200')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && dx_year > 2009)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if DX > 2009')
}
if ((functions.GEN_INLIST(t_obs_type, "18") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20100)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0200 - not allowed if CS Version Input Original > or = 020100')
}
if (functions.GEN_INLIST(t_obs_type, "19")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA CONVERTED V0204')
}
if (functions.GEN_INLIST(t_obs_type, "20")) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA REVIEWED AND CHANGED V0204')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "21") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20440)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED AND REVIEWED V0204 - not allowed if CS Version Input Original > or = 020440')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && dx_year > 2011)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0204 - not allowed if DX > 2011')
}
if ((functions.GEN_INLIST(t_obs_type, "22") && functions.GEN_VAL(untrimmedline.csVersionInputOriginal) >= 20330)) {
functions.GEN_STRCPY(t_schema_msg, "Schema: ")
functions.GEN_STRCAT(t_schema_msg, t_schema_name)
functions.GEN_SAVE_TEXT(binding, t_schema_msg)
return functions.GEN_ERROR_MSG(binding, 'CS Tumor Size/Ext Eval=OBSOLETE DATA RETAINED V0204 - not allowed if CS Version Input Original > or = 020440')
}
}
}
return true
}
// ID: NCFD-00181; TAG: N0714; NAME: PIN III ICDO3, Date of Diagnosis (SEER IF110)
public boolean ncfd00181(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.NCFD_GEN_DT_EMPTY))
return true
if (dx_year == ((Integer)context.NCFD_GEN_DT_ERROR))
return functions.GEN_ERROR_TEXT(binding, 'Date of Diagnosis: %DC')
if (dx_year > 2000) {
if (functions.GEN_INLIST(untrimmedline.primarySite, "C619") && functions.GEN_INLIST(untrimmedline.histologicTypeIcdO3, "8148") && functions.GEN_INLIST(untrimmedline.behaviorCodeIcdO3, "2"))
return false
}
return true
}
// ID: NCFD-00182; TAG: N0058; NAME: Patient ID Number (SEER CASENUM)
public boolean ncfd00182(Binding binding, Map