Flask API for DDC Prescription Score
- Research Paper: IEEE J-BHI - DDC-Outliers
- Related to: JCI - Improve Medication Management
How To use DDC-API
First, install the dependencies packages.
git clone https://github.com/nlp-pucrs/ddc-api.git
cd ddc-api
pip3 install -r requirements.txt --user --upgrade
Start DDC API
python3 ./ddcapi.py
POST /ddc-api/score
Content-Type: multipart/form-data;boundary=----XXXX
Host: 127.0.0.1
----XXXX
Content-Disposition: form-data; name="userid"
hospital
----XXXX
Content-Disposition: form-data; name="file"; filename="test.csv.gz"
Content-Type: application/x-gzip
<multipart-file-content>
----XXXX--
curl -X POST -F "userid=1" -F 'file=@data/test.csv.gz' http://localhost:5000/score -o results.csv.gz
python3 -m pytest
The file must have the same header (columns names) and types:
https://github.com/nlp-pucrs/ddc-api/blob/master/data/test.csv
- Install Zappa
- Configure zappa_settings.json and run the code below
- Make sure you have a valid AWS account, your AWS credentials file is properly installed.
virtualenv env
source env/bin/activate
pip install -r requirements-zappa.txt
zappa deploy dev
This project belongs to GIAS at PUCRS, Brazil