Exemplo n.º 1
0
 def __addVarToRoutine__(self, Routine, CrossReference):
     globalVar = CrossReference.getGlobalByName(self._varName)
     if not globalVar:
         # this is to fix a problem with the name convention of a top level global
         # like ICD9 can be referred as eith ICD9 or ICD9(
         altName = getAlternateGlobalName(self._varName)
         globalVar = CrossReference.getGlobalByName(altName)
         if globalVar:
             self._varName = altName
     Routine.addGlobalVariables(
         GlobalVariable(self._varName, self._varPrefix, self._varValue))
Exemplo n.º 2
0
 def __addVarToRoutine__(self, Routine, CrossReference):
     globalVar = CrossReference.getGlobalByName(self._varName)
     if not globalVar:
        # this is to fix a problem with the name convention of a top level global
        # like ICD9 can be referred as eith ICD9 or ICD9(
        altName = getAlternateGlobalName(self._varName)
        globalVar = CrossReference.getGlobalByName(altName)
        if globalVar:
           logger.debug("Changing global name from %s to %s" % (self._varName, altName))
           self._varName = altName
     Routine.addGlobalVariables(GlobalVariable(self._varName,
                                               self._varPrefix,
                                               self._varValue))