Giter Club home page Giter Club logo

sagerx's Introduction

๐ŸŒฟ SageRx

SageRx is a medication ontology and medication-related data aggregator created from many different public sources of data.

Including data from DailyMed, FDA, RxNorm, Orange Book, and more!

SageRx uses Airflow to schedule jobs to extract, load, and transform (using DBT) open drug data.

Airflow

Data ends up in a PostgreSQL database and can be queried using pgAdmin (included with SageRx) or via any SQL editor of your choice.

Postgre

Additional Documentation

We will be moving documentation over to Github, but additional documentation exists on the SageRx Website.

Subscribe to our newsletter to keep ontop of updates.

License

Contributing

We would love to see you contribute to SageRx. Join our Slack channel to get involved.

Development Quickstart

Prerequisites

  • Install Docker.
    • Windows users will also install WSL 2 (a Linux subsystem that runs on Windows) as part of this process.

Installation

  1. Clone the repo.
  2. Add a .env file at the root of the repo.
  3. Add ENV vars to the .env file.
    • AIRFLOW_UID=<uid> - UID can be found by running id -u on linux systems, typically the first user on the system is 1000 or 1001.
      • Windows users following the Docker Desktop install guide should have WSL 2 installed. You can open up command line, type wsl and then within WSL 2, you can enter id -u to see your UID.
    • UMLS_API=<umls_api_key> - if you want to use RxNorm, you need an API key from UMLS.
  4. Make sure Docker is installed
  5. Run docker-compose up airflow-init.
  6. Run docker-compose up.

NOTE: if you have an M1 Mac export DOCKER_DEFAULT_PLATFORM=linux/amd64, and re-build your images

Server URLs

  • Airflow UI is hosted on localhost:8001 or 0.0.0.0:8001
    • Username/password = airflow / airflow
  • PgAdmin is hosted on localhost:8002 or 0.0.0.0:8002
    • Username/password = sagerx / sagerx

Using DBT

On docker-compose up a DBT container will be created to be used for cli commands. To enter commands run docker exec -it dbt /bin/bash. This will place you into a bash session in the DBT container. Then you can run DBT commands as you normally would.

To serve DBT documentation locally, enter the commands in the DBT container dbt docs generate then dbt docs serve. They should generate on http://localhost:8080

Troubleshooting

If you get issues on folder permissions:

sudo chmod -R 777 postgres,data,extracts,logs,plugins

sagerx's People

Contributors

bridg109 avatar jrlegrand avatar lprzychodzien avatar yevgenybulochnik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.