'Calculate the basic results, which consists of a number of list
related to the locations
LISTS (dictionaries)
All maps are keyed on the value used in the database lookup
locationList - holding the number of times the value exists
complete_id  - a list of complete_id at this location
duplicates   - a list of duplicate records
known        - The record from the database
Calculated Values
cnt  - The number of unique locations
dcnt - The number of locations with duplicate values
kcnt - The number of known locations (single match on the database)
ucnt - The number of unknown locations
dper - The percentage of locations with duplicate values
kper - The percentage of known locations
NOTE: Percentages are calculated from the unique locations
and not from the total responses.'

def basicResults(self):

    self.locationList = {}
    self.duplicates = {}
    self.known = {}
    self.complete_id = {}
    for answer in self.valueList:
        if (answer != None):
            key = answer.key
            if (key in self.locationList):
                self.locationList[key] += 1
            else:
                self.locationList[key] = 1
                if (key in self.complete_id):
                    self.complete_id[key].append(answer.complete_id)
                else:
                    self.complete_id[key] = [answer.complete_id]
                result = answer.records
                if (len(result) > 1):
                    self.duplicates[key] = result
                if (len(result) == 1):
                    self.known[key] = result[0]
    self.cnt = len(self.locationList)
    self.dcnt = len(self.duplicates)
    self.kcnt = len(self.known)
    if (self.cnt == 0):
        self.dper = '0%%'
        self.kper = '0%%'
    else:
        self.dper = ('%s%%' % ((100 * self.dcnt) / self.cnt))
        self.kper = ('%s%%' % ((100 * self.kcnt) / self.cnt))
    self.ucnt = ((self.cnt - self.kcnt) - self.dcnt)
