def getDrugsMapping(api):
    result = {}
    clinicalCompounds = getClinicalCompounds(api)
    preclinicalCompounds = getPreclinicalCompounds(api)
    for clinicalCompound in clinicalCompounds:
        for preclinicalCompound in preclinicalCompounds:
            if ((clinicalCompound['inchiKey'] is not None) and (clinicalCompound['inchiKey'] == preclinicalCompound['inchiKey'])):
                inchiKey = clinicalCompound['inchiKey']
                if (inchiKey not in result):
                    result[inchiKey] = {'inchiKey': inchiKey, 'clinicalName': clinicalCompound['name'], 'preclinicalName': preclinicalCompound['name']}
                    result[inchiKey][preclinicalCompound['source']] = preclinicalCompound['findingIds']
                result[inchiKey][clinicalCompound['source']] = clinicalCompound['findingIds']
    return result
def getDrugsMapping(api):
    result = {}
    clinicalCompounds = getClinicalCompounds(api)
    preclinicalCompounds = getPreclinicalCompounds(api)
    for clinicalCompound in clinicalCompounds:
        for preclinicalCompound in preclinicalCompounds:
            if ((clinicalCompound['inchiKey'] is not None) and (clinicalCompound['inchiKey'] == preclinicalCompound['inchiKey'])):
                inchiKey = clinicalCompound['inchiKey']
                if (inchiKey not in result):
                    result[inchiKey] = {'inchiKey': inchiKey, 'clinicalName': clinicalCompound['name'], 'preclinicalName': preclinicalCompound['name']}
                    result[inchiKey][preclinicalCompound['source']] = preclinicalCompound['findingIds']
                result[inchiKey][clinicalCompound['source']] = clinicalCompound['findingIds']
    return result