Overview
Info | ||
---|---|---|
| ||
This is a work in progress and may change without notice |
The simple SHR REST interface module that mimics the API expected by the content handler module in a RESTful way. This allows for an easy way to test the system without building a complex interface module.
The module is available at: https://github.com/jembi/openmrs-module-shr-rest.
Requests
It supports POST and GET requests on the following endpoints:
...
Code Block | ||||
---|---|---|---|---|
| ||||
curl --user user:password "host:8080/openmrs/ws/rest/v1/shr/document?patientId=1&patientIdType=ECID&providerId=1&providerIdType=EPID&encounterType=TestImage&formatCode=Image&isURL=true" -H "Content-Type: image/jpg" -X POST -d "http://imageserver/image.jpg" |
GET: ws/rest/v1/shr/document
Parameters:
contentType | The type of content to retrieve |
encounterUUID | The UUID for the specific encounter that needs to be retrieved |
uniqueID | (NOT YET IMPLEMENTED) The unique document ID of the encounter that needs to be retrieved |
Retrieve a specific encounter. Either encounterUUID must be specified or uniqueID, but not both or none.
GET: ws/rest/v1/shr/documents
...
Code Block | ||||
---|---|---|---|---|
| ||||
curl --user user:password "host:8080/openmrs/ws/rest/v1/shr/documents?contentType=text%2Fxml&patientId=1&patientIdType=ECID" -H "Accept: text/xml" Response: <linked-list> <org.openmrs.module.shr.contenthandler.api.Content> <formatCode>xml<<formatCode>ANC_Summary</formatCode> <contentType>text/xml</contentType> <encoding>UTF-8</encoding> <representation>TXT</representation> <payloadIsUrl>false</payloadIsUrl> <payload><data>...</data></payload> </org.openmrs.module.shr.contenthandler.api.Content> </linked-list> |
...