def abbrevCategStrings(allClinDict):

    print " "
    print " in abbrevCategStrings ... "
    print " "

    keyList = allClinDict.keys()
    keyList.sort()

    for aKey in keyList:

        if (aKey.find("bcr_patient_barcode") >= 0): 
            print " all barcodes : "
            print allClinDict[aKey]
            print " done "
            continue

        (keyType, nCount, nNA, nCard, labelList, labelCount) = miscClin.lookAtKey(allClinDict[aKey])
        print aKey, keyType, nCount, nNA

        if (keyType == "NOMINAL"):

            # remove weird characters from the strings ...
            print " calling removeSpecialChars ... <%s> " % (aKey)
            allClinDict[aKey] = removeSpecialChars(allClinDict[aKey])

            # if we get nothing back, then skip ...
            if (allClinDict[aKey] == []): 
                print " WARNING ... got nothing back ??? ", aKey
                continue

            # otherwise, look at cardinality, type, etc ...
            (keyType, nCount, nNA, nCard, labelList, labelCount) = miscClin.lookAtKey(allClinDict[aKey])

            maxLen = 0
            skipFlag = 0
            for aLabel in labelList:
                try:
                    maxLen = max(maxLen, len(aLabel))
                except:
                    print " what is up with this key ??? ", aKey, labelList
                    skipFlag = 1

            if (skipFlag):
                continue

            if (maxLen > 10):

                ## print aKey, labelList, maxLen

                # first try at making the labels a bit shorter by removing
                # parenthetical elements ...
                allClinDict[aKey] = removeParens(allClinDict[aKey])
                (keyType, nCount, nNA, nCard, labelList,
                 labelCount) = miscClin.lookAtKey(allClinDict[aKey])

                maxLen = 0
                for aLabel in labelList:
                    maxLen = max(maxLen, len(aLabel))
                ## print aKey, labelList, maxLen

                # removing this step for now (04dec12)
                if (0):

                    # next try to remove common prefixes or suffixes ...
                    if (maxLen > 10):
                        (allClinDict[aKey], labelList) = removeCommonPrefix(
                            allClinDict[aKey], labelList)
                        (allClinDict[aKey], labelList) = removeCommonSuffix(
                            allClinDict[aKey], labelList)

                        maxLen = 0
                        for aLabel in labelList:
                            maxLen = max(maxLen, len(aLabel))
                        ## print aKey, labelList, maxLen
                        if (maxLen > 25):
                            print "     --> strings are still rather long, but not sure what to do about this ... "

                    print labelList, maxLen
                    print " "
                    print " "

    return (allClinDict)