v2.0.1
Bug fix for drugs with multiple redirects/synonyms
Error extracting this drug Restasis:
match_data = dict(drug_canonical_to_data[m]) | drug_variant_to_variant_data.get(cand_norm, {})
KeyError: 'ciclosporin'
The reason for the error was that "restasis" was in the database as a synonym of "ciclosporin"
"ciclosporin" was a synonym of "ciclosporine"
It does a look up for a name to its canonical form and then looks for the data under that canonical form. But in this case there was no data under "ciclosporin", it was all under "ciclosporine" and we were doing a dictionary lookup under a key that did not exist.
I have changed the code that compiles the library database, so that if there is something that redirects as a synonym to another synonym, they are now normalised to be a single redirect. A bit like if you visit a website example.com/page1.html and it redirects you to example.com/page2.html which then sends you to example.com/page3.html - a web designer would need to fix all redirects so that page1 goes straight to page3.