mcaloon wrote on Friday, September 21, 2012:
Hello,
Here are some ideas for the design of the “opeEMR API”. If we agree, it will be based on the REpresentational State Transfer (REST) approach which is an architectural style whose name was coined by Roy Fielding and can be further explored by reading his PHD thesis here http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm (along with a lot of other discussions across the net). For those of you familiar with SOAP (Service Oriented Architecture Protocol), yes, REST will not make your head explode as it is only as complicated as we choose to make it.
Basically the HTTP protocol GET, PUT, POST and DELETE messages are used via URI specification (new URIs) to access the collection of openEMR resources that we choose to publish to the world (or a health care team’s secure view of that world - more on this later). This proposed API is the basis for the openEMR mobile platform where devices will have a native device application running locally using the openEMR API to process the healthcare team’s workflow when caring for patients. This API might also be helpful in re-designing the workstation user interface that we’ve been bandying about on the forums recently.
The premise being that the API (useless on its own) will be released with the corresponding mobile apps on a set of devices that the community is currently using or planning on using. We’ll need to use a cross platform tool to support both IOS and Android. We’ll be implementing new server side methods to respond to each new HTTP request and these methods will produce JSON output. There will be a lot of existing code that could be snagged to streamline this implementation, especially when dealing with the database.
The interface and its application will evolve, but the initial release focuses on the workflow for handling the initial patient encounter, acquiring vitals, current medications and the hand-off to the physician. There has been much work done in the forums on this encounter workflow (I can’t recall the location right now) and it will serve us well to use these analyses as input in implementing this message based model.
The primary resources for the initial release at this point that we’ll be “publishing” via the interface are:
-
Encounter
-
Patient
-
Medications
-
Vitals
-
Calendar
-
Reminder
-
Live Messaging
For example, the URI
<splat>/mobile_openEMR/patient?cmd=search&lname=miller
might the be eventual format of the URI for an HTTP GET command that we’d be using to retrieve the list of those patients with last name Miller.
We’ll have to build out the list of resources, the methods associated with each resource and the mapping to the appropriate HTTP operation for each method. There is a lot of work here. Collaboration……
More to come another post…
Mac