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=hospital" -F 'file=@data/test.csv.gz' http://127.0.0.1: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