This is a service that allows to quickly check the trustworthiness of a medicine by its Russian trade name.
Here's how the code works:
- Search for the trade name on RLSNet
- Get the official trade name in English (
name
) - Extract the main active ingredient (
active_ingredient
)- If there's no active ingredient, further steps are skipped and a warning is shown
- Check if the drug is homeopathic (
homeopathy
)- If it is, further steps are skipped and a warning is shown
- Get the official trade name in English (
- Use OpenFDA API to get FDA approval status (
fda_approved
) - Use PubMed E-Utils to fetch the abstracts of the research on the drug
- First, get the Cochrane Reviews on the topic
- Then, search for non-Cochrane studies by the trade name
- Lastly, search for non-Cochrane studies by the active ingredient name
- Save the numbers of found studies (
cochrane
,pubmed
)
- Summarize the obtained abstracts using Claude API
- Calculate the research score:
$min(fda\_approved * 40 + cochrane * 10 + pubmed, 100)$
Since the app uses Claude API for summarization, you need to obtain an API key from the Anthropic dev console.
Then, set the ANTHROPIX_API_KEY
environment variable to your API key. The
code reads .env
files, so you can set the variable there if you want.
To launch or build the app, follow the Phoenix documentation.
The main command youu need is mix phx.server
to run the code.