This is fhirclient, a flexible Python client for FHIR servers supporting the SMART on FHIR protocol. The client is compatible with Python 2.7, possibly earlier, and Python 3.
pip install fhirclient
Technical documentation is available at docs.smarthealthit.org/client-py/.
Take a look at flask_app.py
to see how you can use the client in a simple (Flask) app.
This app starts a webserver, listening on localhost:8000, and prompts you to login to our sandbox server and select a patient.
It then goes on to retrieve the selected patient's demographics and med prescriptions and lists them in a simple HTML page.
The Flask demo app has separate requirements. To go about installing needed packages (using virtualenv) and running the app you can issue these commands to your shell:
virtualenv -p python3 env
. env/bin/activate
pip install -r requirements_flask_app.txt
python flask_app.py
pip install -r requirements.txt
python setup.py sdist
python setup.py bdist_wheel
bumpversion patch
bumpversion minor
bumpversion major
Docs are generated with Doxygen and doxypypy.
You will need to install doxypypy the old-fashioned way, checking out the repo and issuing python setup.py install
.
Then you can just run Doxygen, configuration is stored in the Doxyfile
.
Running Doxygen will put the generated documentation into docs
, the HTML files into docs/html
.
Those files make up the content of the gh-pages
branch.
I usually perform a second checkout of the gh-pages branch and copy the html files over, with:
doxygen
rsync -a docs/html/ ../client-py-web/