Skip to content

Latest commit

 

History

History

get-a-guid

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Get-a-GUID Web App

Overview

Python library and Flask REST api to generate 1-way hashes for study ids, pseudonyms, and approximate-birth-date for globally consistent identifiers in study anonymization.

A reference web implementation of the most recent master branch is available at http://get-a-guid.zmø.biz.

Dependencies

  • Python 3.6
  • guidmint
  • Flask
  • markdown

Usage

Local Server Instance

$ python get_a_guid.py &  
  * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)  
$ curl "localhost:5000/guid/pseudonym/pseudo_id?value=MERCK^DEREK^L"
{"dob": "1968-07-25", "gender": "U", "guid": "AYJOAUVBBT54F6TP", "name": "ANDRONIS^YEVETTE^J"}

Implementing as a Public Service

To create a Heroku server instance:

$ heroku create
$ git push heroku master
$ heroku ps:scale web=1
$ curl "http://get-a-guid.herokuapp.com/pseudonym/pseudo_id?name=MERCK^DEREK^L"
{"dob": "1968-07-25", "gender": "U", "guid": "AYJOAUVBBT54F6TP", "name": "ANDRONIS^YEVETTE^J"} 

Single dyno Heroku instances are free to run, but can take a minute to startup after they fall asleep.

To create a Dokku server instance:

$ git clone https://github.com/derekmerck/DIANA
$ cd DIANA
$ git add remote dokku dokku@xn--zm-mka.biz:get-a-guid
$ git subtree push --prefix GUIDMint dokku master
$ curl "http://get-a-guid.xn--zm-mka.biz/pseudonym/pseudo_id?name=MERCK^DEREK^L"
{"dob": "1968-07-25", "gender": "U", "guid": "AYJOAUVBBT54F6TP", "name": "ANDRONIS^YEVETTE^J"} 

Acknowledgements

License

MIT