def checkTumorStage(allClinDict):

    if ("tumor_stage" not in allClinDict.keys()):
        print " skipping checkTumorStage ... "
        return (allClinDict)
    else:
        print " running checkTumorStage ... "

    numClin = getNumPatients(allClinDict)
    print " total number of patients : ", numClin

    if (0):
        stringList = ["tumor", "stage", "spread"]
        for aKey in allClinDict.keys():
            for aString in stringList:
                if (aKey.find(aString) >= 0):
                    print aKey

    reqKeyList = [
        "bcr_patient_barcode", "tumor_stage", "primary_tumor_pathologic_spread",
        "lymphnode_pathologic_spread", "distant_metastasis_pathologic_spread"]
    numNotFound = 0
    for aKey in reqKeyList:
        if (aKey not in allClinDict.keys()):
            numNotFound += 1
    if (numNotFound > 0):
        print " skipping checkTumorStage ... "
        return (allClinDict)

    pKey = getProperKey ( allClinDict, "bcr_patient_barcode" )
    sKey = getProperKey ( allClinDict, "tumor_stage" )
    tKey = getProperKey ( allClinDict, "primary_tumor_pathologic_spread" )
    nKey = getProperKey ( allClinDict, "lymphnode_pathologic_spread" )
    mKey = getProperKey ( allClinDict, "distant_metastasis_pathologic_spread" )

    for ii in range(numClin):

        aCode = allClinDict[pKey][ii]
        curTumorStage = allClinDict[sKey][ii]
        curT = allClinDict[tKey][ii]
        curN = allClinDict[nKey][ii]
        curM = allClinDict[mKey][ii]

        # print " checking tumor stage for <%s> <%s> <%s> <%s> <%s> " % (
        # aCode, curTumorStage, curN, curM, curT )

        ## removing this 15aug2014 ...
        if ( 0 ):
            curTumorStage = curTumorStage.upper()
            curTumorStage = curTumorStage.strip()
            if (curTumorStage != "NA"):
                if (not curTumorStage.startswith("STAGE ")):
                    curTumorStage = "STAGE " + curTumorStage

        # as of 09nov12, NOT attempting to derive tumor stage from T, N, and M
        if (0):

            # get AJCC-derived tumor stage, compare to DCC value, and decide
            # which to use
            ajccStage = getTumorStage(curT, curN, curM)
            newStage = PreferredStage(curTumorStage, ajccStage)
            allClinDict[sKey][ii] = newStage

            # report
            if (type(ajccStage) is list):
                ajccString = ' OR '.join(ajccStage)
            else:
                ajccString = ajccStage

            print aCode.upper() + ', TNM:' + curT.upper() + ' ' + curN.upper() + ' ' + curM.upper() + ', DCC Stage:' \
                                + curTumorStage + ', AJCC Stage:' + ajccString + ', Comparison:' \
                                + \
                testTumorStage(curTumorStage, ajccStage) + \
                ', Will use: ' + newStage

    return (allClinDict)