List of Resources available on raxacore OpenMRS module:
- Billing
- Drug
- DrugGroup
- DrugInventory
- Encounter
- Image
- Location
- Login
- Obs
- Order
- Patient
- PatientAccess
- PatientList
- Provider
- RaxaAlert
- User
Drug
URLs
url | description |
---|---|
GET /ws/rest/v1/drug?q=aspirin | Search by brand name or drug name |
GET /ws/rest/v1/drug/\{uuid\} | Fetch by unique uuid |
GET /ws/rest/v1/drug/\{uuid\}&v=full | Fetch by unique uuid, GET full |
POST /ws/rest/v1/drug | Create with properties in request |
POST /ws/rest/v1/drug/\{uuid\} | Edit with given uuid, only modifying properties in request |
GET drug
Parameter | Description | Example |
---|---|---|
fullName | Brand name + dose strength + units + dosage form + generic name | Acetyl Salicylic Acid 50 mg Tablet Aspirin |
name | Brand name | Aspirin |
genericName | Generic name | Acetyl Salicylic Acid |
dosageForm | Form of drug | Tablet |
doseStrength | Dose strength in double | 50 |
route | Route of administration | (not yet in database) |
uuid | Unique id for drug | raxa0000000000000000000000000003000218 |
conceptUuid | Unique | 10000000000000000000000000000000000747 |
GET drug full
Parameters |
---|
uuid |
POST/update drug
Parameter | Description | Example |
---|---|---|
name | Brand name | Aspirin |
description | Description | Used for headache |
genericName | Generic Name | Acetyl Salicylic Acid |
dosageForm | Unique id of dosage form concept | <uuid> |
strength | Strength as double | 200 |
units | Units | mg |
price | Sale price as double | 14.02 |
cost | Cost price from manufacturer as double | 15.80 |
Encounter
URLs
url | description |
---|---|
GET /ws/rest/v1/encounter?provider= | Fetch encounters by provider |
GET /ws/rest/v1/encounter?provider= | Fetch encounters by patient |
GET /ws/rest/v1/encounter/\{uuid\} | Fetch by unique uuid |
GET /ws/rest/v1/encounter/\{uuid\}&v=full | Fetch by unique uuid, GET full |
POST /ws/rest/v1/encounter | Create encounter and save alerts for any orders |
POST /ws/rest/v1/encounter/\{uuid\} | Edit with given uuid, only modifying properties in request |
DELETE /ws/rest/v1/encounter/\{uuid\}?!purge | Delete this object from the database |
DELETE /ws/rest/v1/location/\{uuid\}?purge | Delete this object from the database |
Representations
GET | GET full | POST create |
---|---|---|
uuid name description dosageForm strength units concept fullName | uuid | encounterDatetime |
PatientList
URLs
url | description |
---|---|
GET /ws/rest/v1/raxacore/patientlist?q | Fetch all non-retired that match this parameter |
GET /ws/rest/v1/raxacore/patientlist/{uuid} | Fetch by unique uuid |
GET /ws/rest/v1/raxacore/patientlist | Fetch all non-retired |
POST /ws/rest/v1/raxacore/patientlist | Create with properties in request |
POST /ws/rest/v1/raxacore/patientlist | Edit with given uuid, only modifying properties in request |
DELETE /ws/rest/v1/raxacore/patientlist/{uuid}?!purge | Delete this object from the database |
DELETE /ws/rest/v1/raxacore/patientlist/{uuid\}?purge | Delete this object from the database |
Representations
GET ref | GET default | GET full | POST create | POST update |
---|---|---|---|---|
uuid name description | uuid name description searchQuery patients --- uuid --- display --- gender --- age --- encounters ------- uuid ------- display ------- encounterType ------- encounterDatetime ------- obs ------------ uuid ------------ display ------------ obsDatetime ------------ value resourceVersion | uuid name description searchQuery patients --- uuid --- display --- gender --- age --- encounters ------- uuid ------- display ------- encounterType ------- encounterDatetime ------- provider ------- obs ------------ uuid ------------ display ------------ obsDatetime ------------ value ------------ comment ------------ order resourceVersion | name description searchQuery | name description searchQuery |
Examples from Unit tests:
On-the-fly generation of patient list
GET ---> http://raxaemr.jelastic.tsukaeru.net/ws/rest/v1/raxacore/patientlist?startDate=2008-01-01T00:00:00.0&endDate=2012-01-02T00:00:00.0&encounterType=61ae96f4-6afe-4351-b6f8-cd4fc383cce1&provider=61ae96f4-6afe-4351-b6f8-cd4fc383cc65
(the uuid of provider is provider uuid & the uuid given below in encounter is the person uuid)This REST call is for generating on-the-fly patient lists based on encounterTypes (uuid), startDate and endDate (both in ISO8601 format with or without timezone)
JSON Received{ "uuid" : null, "name" : null, "description" : null, "searchQuery" : "?startDate=2008-01-01T00:00:00.0&endDate=2012-01-02T00:00:00.0&encounterType=61ae96f4-6afe-4351-b6f8-cd4fc383cce1", "patients" : [ { "uuid" : "8adf539e-4b5a-47aa-80c0-ba1025c957fa", "display" : "Anet Test Oloo", "gender" : "F", "age" : null, "encounters" : [ { "uuid" : "6519d653-34gg-43ef-9c83-a3715b82d4ac", "display" : "Scheduled - 2008-08-01 00:00:00.0", "encounterType" : "61ae96f4-6afe-4351-b6f8-cd4fc383cce1", "encounterDatetime" : "2008-08-01T00:00:00.000+0530", "provider" : "341b4e41-790c-484f-b6ed-71dc8da222de", "obs" : [ { "uuid" : "39fb7f47-e80a-4056-9285-bd798be13c63", "display" : "WEIGHT (KG) = 50.0", "obsDatetime" : "2008-07-01T00:00:00.000+0530", "value" : "50.0", "comment" : "", "order" : null }, { "uuid" : "be48cdcb-6a76-47e3-9f2e-2635032f3a9a", "display" : "CD4 COUNT = 150.0", "obsDatetime" : "2008-08-01T00:00:00.000+0530", "value" : "150.0", "comment" : "", "order" : null } ] } ] }, { "uuid" : "5946f880-b197-400b-9caa-a3c661d23041", "display" : "Collet Test Chebaskwony", "gender" : "F", "age" : 35, "encounters" : [ { "uuid" : "eec646cb-c847-45a7-98bc-91c8c4f70add", "display" : "Scheduled - 2008-08-15 00:00:00.0", "encounterType" : "61ae96f4-6afe-4351-b6f8-cd4fc383cce1", "encounterDatetime" : "2008-08-15T00:00:00.000+0530", "provider" : "341b4e41-790c-484f-b6ed-71dc8da222de", "obs" : [ { "uuid" : "2f616900-5e7c-4667-9a7f-dcb260abf1de", "display" : "WEIGHT (KG) = 55.0", "obsDatetime" : "2008-08-15T00:00:00.000+0530", "value" : "55.0", "comment" : "", "order" : null }, { "uuid" : "f6ec1267-8eac-415f-a3f0-e47be2c8bb67", "display" : "CD4 COUNT = 175.0", "obsDatetime" : "2008-08-15T00:00:00.000+0530", "value" : "175.0", "comment" : "", "order" : null }, { "uuid" : "e26cea2c-1b9f-4afe-b211-f3ef6c88af6f", "display" : "FAVORITE FOOD, NON-CODED = PB and J", "obsDatetime" : "2008-08-15T00:00:00.000+0530", "value" : "PB and J", "comment" : "", "order" : null }, { "uuid" : "b6521c32-47b6-47da-9c6f-3673ddfb74f9", "display" : "FOOD ASSISTANCE = true", "obsDatetime" : "2008-08-15T00:00:00.000+0530", "value" : "true", "comment" : "", "order" : null }, { "uuid" : "99b92980-db62-40cd-8bca-733357c48126", "display" : "DATE OF FOOD ASSISTANCE = August 14, 2008 12:00:00 AM IST", "obsDatetime" : "2008-08-15T00:00:00.000+0530", "value" : "August 14, 2008 12:00:00 AM IST", "comment" : "", "order" : null }, { "uuid" : "1ce473c8-3fac-440d-9f92-e10facab194f", "display" : "FOOD ASSISTANCE FOR ENTIRE FAMILY = ", "obsDatetime" : "2008-08-15T00:00:00.000+0530", "value" : "", "comment" : "", "order" : null } ] }, { "uuid" : "e403fafb-e5e4-42d0-9d11-4f52e89d148c", "display" : "Scheduled - 2008-08-19 00:00:00.0", "encounterType" : "61ae96f4-6afe-4351-b6f8-cd4fc383cce1", "encounterDatetime" : "2008-08-19T00:00:00.000+0530", "provider" : "341b4e41-790c-484f-b6ed-71dc8da222de", "obs" : [ { "uuid" : "2ed1e57d-9f18-41d3-b067-2eeaf4b30fb0", "display" : "WEIGHT (KG) = 61.0", "obsDatetime" : "2008-08-19T00:00:00.000+0530", "value" : "61.0", "comment" : "", "order" : null } ] } ] } ] }
Updating a patient list ---> POST --> http://raxaemr.jelastic.tsukaeru.net/ws/rest/v1/raxacore/patientlist/68547121-1b70-465d-99ee-c9dfd95e7d30
JSON Sent/ReceivedRequest Body- { "name" : "Test PatientList", "description" : "Test List of Patients" } --------------------------------------------------------------- GET search- { "uuid" : "68547121-1b70-465d-99ee-c9dfd95e7d30", "name" : "Test PatientList", "description" : "Test List of Patients", "patients" : [ ] }
Created patient list --> http://raxaemr.jelastic.tsukaeru.net/ws/rest/v1/raxacore/patientlist
JSON Sent/ReceivedRequest Body- { "name" : "Test PatientList", "description" : "Test List of Patients" } --------------------------------------------------------------- Response- { "uuid" : "2f30cc04-6437-487a-9297-b387eee50048", "name" : "Test PatientList", "description" : "Test List of Patients" }
Search patient list by name ---> GET http://raxaemr.jelastic.tsukaeru.net/ws/rest/v1/raxacore/patientlist?q=TestList2
JSON ReceivedFound PatientList(s): { "uuid" : "68547121-1b70-465e-99ee-c9dfd95e7d30", "name" : "TestList2", "description" : "Second Test List" }