jasontestart / ohvrde

Some python code that parses PDF vaccination receipts generated by Ontario Health and returns selected values in JSON format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ontario Health Vaccination Receipt Data Extractor (ohvrde)

Some python code that parses PDF vaccination receipts generated by Ontario Health and returns selected values in JSON format.

If you are an organization that is collecting tens of thousands of proofs of vaccinations, then something like this might help in reducing manual labour of reviewing the submitted evidence. If you are actually checking, and you accept the risk of potential fraud!

Basic usage

The extractor.py script does most of the work. Once you get your dependencies with pip3 install -r requirements.txt try something like:

python3 extractor.py Dose_Admin_First_Middle_Last_number.pdf

Web Service

The server.py provides a flask server. Try it out with python3 server.py then test with curl like so:

curl -F 'pdf_file=@Dose_Admin_First_Middle_Last_number.pdf' http://localhost:5000/ohvrde/extract/

and you should get some JSON back:

{"dob":"1867-07-01","message":"Appears to be a receipt from Ontario Health. The digital signature is present, but has not been validated.","name":"First Middle Last","num_doses":"2","org":"Region of Waterloo Public Health and Emergency Services","signed":"True"}

About

Some python code that parses PDF vaccination receipts generated by Ontario Health and returns selected values in JSON format


Languages

Language:Python 71.9%Language:HTML 28.1%