Live data from Hacker News

Show HN: Muler, a search engine for drug info built with Flask

muler.pythonanywhere.com

21–30 of 40 posts

Re: Show HN: Muler, a search engine for drug info built with Flask

#22
I do not know anything about drugs, but I searched for "heroin", and was brought to the "Diamorphine" page, which seems a bit different.

Regarding your request on unit tests : do not do too much of them, too low-level. Try to write tests whose output should not change, should you refactor, this way they will help you avoid side-effects of refactoring. If your unit tests are too low-level, you will need to change them everytime you change your code.

One good think to test would be your fuzzy-matching logic, with edge cases taken into account.

Happy hacking !

Re: Show HN: Muler, a search engine for drug info built with Flask

#23

Other than DrugBank, are there any other providers of drug information databases?

Medicines A-Z (from the NHS in the UK)

https://www.nhs.uk/medicines/

This is aimed at the general public. An API is also available:

https://developer.api.nhs.uk/nhs-api/documentation/5b8e85b39...

Re: Show HN: Muler, a search engine for drug info built with Flask

#25

I do not know anything about drugs, but I searched for "heroin", and was brought to the "Diamorphine" page, which seems a bit different. Regarding your request on unit tests : do not do too much of them, too low-level. Try to write tests whose output should not change, should you refactor, this way they will help you avoid side-effects of refactoring. If your unit tests are too low-level, you will need to change them…

Diamorphine is heroin, so that's correct

Re: Show HN: Muler, a search engine for drug info built with Flask

#26
post #24
post #20

There seems to be some fuzzy matching logic gone awry. I searched for "insulin" and it brought me to "inulin" which are very different things.

For sure, searched cipro and it pulled up Benzyl alcohol lol......

Cipro has a benzene ring and an OH group, so it's practically the same thing if you squint a little.

Re: Show HN: Muler, a search engine for drug info built with Flask

#27

I do not know anything about drugs, but I searched for "heroin", and was brought to the "Diamorphine" page, which seems a bit different. Regarding your request on unit tests : do not do too much of them, too low-level. Try to write tests whose output should not change, should you refactor, this way they will help you avoid side-effects of refactoring. If your unit tests are too low-level, you will need to change them…

Heroin is the (former) Bayer trade name for diamorphine.

Edit: it was available over the counter and was pitched as a less addictive alternative to morphine

Re: Show HN: Muler, a search engine for drug info built with Flask

#29
post #20

There seems to be some fuzzy matching logic gone awry. I searched for "insulin" and it brought me to "inulin" which are very different things.

Seems like the entry on Drugbank for insulin is "insulin human", which explains why it doesn't return an immediate match. The closest match using Levenshtein distance is "inulin" instead.

Thanks for pointing that out :) I'll have to do some tweaking.

Re: Show HN: Muler, a search engine for drug info built with Flask

#30

Suggestion: If the search result is a synonym of the search query, display a message at the top saying so. As a layperson, I searched for "aspirin" and got a result for "Acetylsalicylic acid" and I didn't know if the search result was even correct. If it had said "Acetylsalicylic acid is a synonym of aspirin", things would have made sense immediately. (I think Wikipedia displays such types of disambiguation info at t…

Great suggestion! Thanks :)
Post reply on HN