Name: opal-iframe-api
Owner: Open Health Care
Description: An iframe api for an opal project that allows access to fields as long as they have the correct api key
Created: 2015-08-21 09:24:01.0
Updated: 2016-02-12 16:02:06.0
Pushed: 2016-06-28 16:22:00.0
Size: 33
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is iframeapi - an OPAL plugin.
This plugin allows you to embed records from an OPAL application in an external application.
For example, you could embed the most recent piece of Clinical Advice given about a patient, or a patient's allergy information in an Iframe (or similar).
Add to your INSTALLED_APPLICATIONS.
Run
$python manage.py migrate iframeapi
An API key can be combined the hospital number of a patient and an OPAL record name in a get request and get a plain text result.
Good requests look like:
/iframeapi/?hospitalNumber=XXXXXXXXXXXX&key=XXXXXXXXXXXXXXX&record=XXXXXXXXXX
All models must subclass PatientSubrecord or EpisodeSubrecord and a template for the result needs to be put in iframe_templates with the model name in lowercase (examples included are iframe_templates/allergies, iframe_templates/antimicrobial).
You may also limit the display to the latest entry by adding the latest
parameter e.g.
/iframeapi/?hospitalNumber=XXXXXXXXXXXX&key=XXXXXXXXXXXXXXX&record=XXXXXXXXXX&latest=true