IHTSDO / SNOMED-in-5-minutes

Easy-to-use tutorials for accessing SNOMED APIs within 5 min using various programming languages
Other
123 stars 56 forks source link

Python example needs to be updated #6

Closed priyaranjan-tokachichu closed 6 years ago

priyaranjan-tokachichu commented 6 years ago

The Python example uses 'fsn' for fully specified name. It should be updated to 'fullySpecifiedName'.

def getConceptById(id):
    url = baseUrl + edition + '/' + version + '/concepts/' + id
    response = urlopen(url).read()
    data = json.loads(response.decode('utf-8'))
    #The following doesn't work
    #print (data['fsn'])
    #The following works
    print (data['fullySpecifiedName'])
rorydavidson commented 6 years ago

Hi, thanks for pointing this out. This is because the newer version of the API uses fullySpecifedName. For now, all the baseUrl's have been redirected to v1 in this repo.