Muler is a Flask app that allows users to search for pharmacological information by entering generic or proprietary drug names. External libraries used include Flask, SQLAlchemy, and FuzzyWuzzy.
This is a hobby project I made during my final year of medical school. As far as I can tell from the logs there are no more than five humans who use it semi-regularly (lots of bots pinging though). I don't mind because I find it very useful personally, and I've also learned a lot about Python, web dev, and databases.
Right now I'm trying to refactor the code (just wrote my first class) and implement unit tests (just started reading the Pytest docs), so I'd really appreciate specific feedback and tips about those.
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 the top of their pages.)
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.
Congratulations on a very nice hobby project, and reaching the front page of Hacker News!
A few questions though:
- is the indentation of section headings, such as "Indication", "Pharmacodynamics", etc, intentional? The yellow highlight seems to take care of the emphasis on its own. It feels, to me, it should either be one or the other.
- when sections (e.g. "Pharmacodynamics") include clear points of emphasis within them (e.g. asterisks for bold), then could those perhaps be rendered as sub-headings for increased readability? An example can be seen when searching for "codeine": https://muler.pythonanywhere.com/codeine
Nice, very responsive.
I am on mobile and: when I click on synonyms I lose the products button. Also when I click on products a better formatting of the list, had a hard time on when a oroduct ended and another one started.
Looks great - only thing that immedaitely felt missing (although probably due to not being a member of the target audience) is a typeahead for the search :)
As a fellow medical student this looks very useful, thanks.
If you want an idea for a future project, I conceived a little while ago of a browser extension enabling hover-over drug info pop-ups in the same vein as YomiChan (a tool providing mouse-over definitions for Japanese language learners). Maybe I’ll get to that at some point.
This is pretty good, nice work! I think you're spot on that sometimes you just need a simpler overview of info.
One thing I've noticed is that the first line under the drug name, I guess is the category? Some of them are probably a bit more specific than they need to be, like ibuprofen: https://muler.pythonanywhere.com/Ibuprofen
You could take the summary from DrugBank instead of a category, but that might have other issues too.
Either way, I'll probably come back and use this in the future!
Yeah the category is taken directly from the Drugbank dataset, which can be rather specific and arbitrary. I'll see if there's a summary like you suggest that I could use instead.
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.
Based on the About page, and the information provided by the page, I'm obviously not the target audience for this page, but it was interesting information nonetheless.
Could definitely need some speed improvements or at least some indication of what's going on. Loading spinners are a band-aid, but are better than nothing.
It's not usually this slow. I suspect the sluggishness is due to issues on the hosting end related to the spike in traffic. That said, I'm hoping by refactoring the code I can improve performance. Loading spinners is a good idea.
Thanks so much for trying it out and giving your suggestions!
Very nice. As others have said, the sections that start with headings inside double asterisks ("*") should be set off somehow. I would suggest a paragraph break, with the heading either on a separate line or on the same line with some distinguishing typography such as bold.
Nice, looks good! I would suggest increasing leading in the paragraphs when you view a specific drug, they're a bit close together and make reading difficult.
Is the markdown in the descriptions supposed to say unrendered? I'm seeing quite a phrases with ** around them, which would normally indicate bold text.
I've noticed that too, which is strange because some entries are rendered fine (e.g. Names of bacteria in the antibiotic entries). I'll have to poke around and find out what's wrong.
The system is not working. You should always double check before posting on HN that your system is working and/or can handle moderate levels of interaction.
Sorry about that. I've done my best to make sure my code works before and after pushing changes to production. I think it might be due to limitations on the hosting side as I'm using the free tier on PythonAnywhere.
Muler is a Flask app that allows users to search for pharmacological information by entering generic or proprietary drug names. External libraries used include Flask, SQLAlchemy, and FuzzyWuzzy.
This is a hobby project I made during my final year of medical school. As far as I can tell from the logs there are no more than five humans who use it semi-regularly (lots of bots pinging though). I don't mind because I find it very useful personally, and I've also learned a lot about Python, web dev, and databases.
Right now I'm trying to refactor the code (just wrote my first class) and implement unit tests (just started reading the Pytest docs), so I'd really appreciate specific feedback and tips about those.
Thanks for your time!
URL: http://muler.pythonanywhere.com/
Repo: https://github.com/PizzaMyHeart/muler