Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

FAQ:

  • Headers
  • Getting started
  • Why aren't resources showing up?

List of Resources available on raxacore OpenMRS module:

Anchor
Drug
Drug
Drug

URLs

patientlistFetch all non-retired
urldescription
GET /ws/rest/v1/raxacore/patientlistdrug?qFetch all non-retired that match this parameter=aspirinSearch by brand name or drug name
GET /ws/rest/v1/raxacore/patientlistdrug/\{uuid\}Fetch by unique uuid
GET /ws/rest/v1/raxacore/drug/\{uuid\}&v=fullFetch by unique uuid, GET full
POST /ws/rest/v1/raxacore/patientlistdrugCreate with properties in request
POST /ws/rest/v1/raxacore/patientlist/drug/\{uuid\}Edit with given uuid, only modifying properties in request
DELETE /ws/rest/v1/raxacore/patientlist/{uuid}?!purgeDelete this object from the database
DELETE /ws/rest/v1/raxacore/patientlist/{uuid\}?purgeDelete this object from the database

...

Anchor
GET drug
GET drug
GET drug

ParameterDescriptionExample
fullNameBrand name, dose strength, units, dosage form, generic nameAcetyl Salicylic Acid 50 mg Tablet Aspirin
nameBrand nameAspirin
genericNameGeneric nameAcetyl Salicylic Acid
dosageFormForm of drug
Tablet
doseStrengthDose strength in double50
routeRoute of administration(not yet in database)
uuidUnique id for drugraxa0000000000000000000000000003000218
conceptUuidUnique10000000000000000000000000000000000747

Anchor
GET drug full
GET drug full
GET drug full

Examples from Unit tests:

...

strength
units
concept
fullName

Anchor
POST drug
POST drug
POST/update drug

ParameterDescriptionExample
nameBrand nameAspirin
descriptionDescriptionUsed for headache
genericNameGeneric NameAcetyl Salicylic Acid
dosageFormUnique id of dosage form concept<uuid>
strengthStrength as double200
unitsUnitsmg
priceSale price as double14.02
costCost price from manufacturer as double15.80

Anchor
Encounter
Encounter
Encounter

URLs

urldescription
GET /ws/rest/v1/raxacore/encounter?provider=Fetch encounters by provider
GET /ws/rest/v1/raxacore/encounter?patient=Fetch encounters by patient
GET /ws/rest/v1/raxacore/encounter/\{uuid\}Fetch by unique uuid
POST /ws/rest/v1/raxacore/encounterCreate encounter and save alerts for any orders

Anchor
GET encounter
GET encounter
GET Encounter

ParameterDescriptionExample
uuidUnique id for encounter<uuid>
displayName of encounter[2013-04-24 20:05:34.0 OUTPATIENT (no Location) num Obs: 0 num Orders: 1 ]
encounterDatetimeJava time of encounterApr 24, 2013 8:05:34 PM
patient\{ uuid, display \} of patient<uuid>, "John Smith"
location\{ uuid, display \} of location<uuid>, "Varun Family Clinic"
encounterType\{ uuid, display \} of encounter type<uuid>, "OUTPATIENT"
obs

\{ uuid, obsDatetime, value, comment
concept: uuid,
\{ conceptClass: \{ name, description, uuid \},
dataType: \{ name, description, uuid \},
names: \[\{ name, uuid \}\]\}
\}

[{
"uuid": <uuid>,
"obsDatetime": "2013-04-24T20:05:34.000+0000",
"value": "Text value here",
"comment": null
"concept":{
"conceptClass":{ "name": "Misc", "description": "Misc concept", "uuid": <uuid>
},
"datatype":{ "uuid": <uuid>, "description": "Not associated", "name": "N/A"},
"names":[{ "name": "Free Text Value", "uuid": <uuid}],
"uuid": <uuid>},
}]

orders

\{ uuid, orderType: \{ uuid \}, display,
concept: \{ uuid \}, instructions, startDate,
autoExpireDate, dose, units, frequency,
quantity, drug: \{ uuid, display \}

[{
"uuid": "c2553c48-e343-4666-ba8c-bc7f7d53a7d9",
"orderType": {
"uuid": "131168f4-15f5-102d-96e4-000c29c2a5d7",
"display": "Drug Order"
},
"concept": {
"uuid": "10000000000000000000000000000000000038"
},
"instructions": "#specificReqFlag#I.V. Fluid",
"startDate": "Apr 25, 2013 2:57:00 AM",
"autoExpireDate": "Apr 26, 2013 2:57:00 AM",
"dose": 10,
"units": null,
"frequency": "q.d., q1d",
"quantity": 1,
"drug": {
"uuid": "raxa0000000000000000000000000003008600",
"display": "DEXTROSE 10% (PARENTERAL DRUGS)"
}
}]

 images\{ uuid, title, tags \}  \[\{ "uuid: <uuid>, "title": "My Image", "tags": "profile, photo" \}\] 

Anchor
POST encounter
POST encounter
POST Encounter

ParameterDescriptionExample
encounterDatetimeJava time of encounter2013-06-11T11:28:20Z
patientuuid of patient<uuid>
encounterTypeuuid of encounter typeraxa00000-0000-0000-0000-000000000005
provideruuid of provider<uuid>
locationuuid of location<uuid>
obs (see below)
 conceptuuid for obs concept<uuid>
 valueboolean, text, etc35
 comment determined through patient history
orders

 

(see below)
 conceptconcept uuid<uuid>
 instructionsinstructions for prescriptionTake with food
 drugdrug uuid<uuid>
 frequencyList of frequenciesq.a.d.
 unitsunits for prescriptionmg
 quantitytotal pills/units12
 dosedouble125.00
 startDatejava start date of prescription2013-06-11T19:13:00Z
 autoExpireDatejava end date of prescription2013-06-13T19:13:00Z
images (see below)
 dataURIbase 64 encoded bytes of imagedata:image/jpeg;base64,/9j/4AAzS0....
 titleImage titleKnee Lesion
 tagsImage tags separated by commalesion, knee, dermatology
 descriptionImage descriptionimage of lesion
 imageIndexindex within encounter, starting with 00

Example POST call for encounter:

{"patient":"a4c80c53-b281-4cdf-8cd8-3c084cfadde3","encounterType":"raxa00000-0000-0000-0000-000000000005","encounterDatetime":"2013-06-11T11:28:20Z","obs":[{"obsDatetime":"2013-06-11T11:29:31Z","person":"a4c80c53-b281-4cdf-8cd8-3c084cfadde3","concept":"57AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},{"obsDatetime":"2013-06-11T11:29:31Z","person":"a4c80c53-b281-4cdf-8cd8-3c084cfadde3","concept":"raxa00000-0000-0000-0000-000000000023","value":"data:image/jpeg;base64,/9j/4AAzS0UAJmjNLRQAmaM0tFACZozS0UAJmjNLRQAmaM0tFACZozS0UAJmjNLRQAmaM0tFACZozS0UAJmjNLRQAmaM0tFACZozS0UAJmjNLRQAmaM0tFACZozS0UAJmjNLRQAmaM0tFACZozS0UAJmjNLRQAmaM0tFACZozS0UAJmjNLRQAmaM0tFACZozS0UAJmjNLRQAmaM0tFACZozS0UAJmjNLRQAmaM0tFAH/9k="},{"obsDatetime":"2013-06-11T11:29:31Z","person":"a4c80c53-b281-4cdf-8cd8-3c084cfadde3","concept":"raxa00000-0000-0000-0000-000000000025","value"valueForObsHere"]}],"location":null,"orders":[{"type":"drugorder","patient":"a4c80c53-b281-4cdf-8cd8-3c084cfadde3","concept":"10000000000000000000000000000000000138","drug":"raxa0000000000000000000000000003000023","startDate":"2013-06-11T19:13:00Z","autoExpireDate":"2013-06-13T19:13:00Z","instructions":"Take with food","quantity":8,"dose":"125.00","units":"","frequency":"q.d.s.","orderer":"5c806564-86d7-40ee-9769-b4eb7796c217"}],"images":[{"patient":"a4c80c53-b281-4cdf-8cd8-3c084cfadde3","dataURI":"data:image/png;base64,iVBORAASUVORK5CYII=","title":"My picture","description":"picture for record","imageIndex":1}]}

Anchor
Image
Image
Image

URLs

urldescription
GET /ws/rest/v1/raxacore/image?patient=__Fetch images belonging to patient
GET /ws/rest/v1/raxacore/image?provider=__&tag=__Fetch images belonging to patient tagged by tag
GET /ws/rest/v1/raxacore/image?provider=__Fetch images created by provider
GET /ws/rest/v1/raxacore/image?location=__Fetch images belonging to a location
GET /ws/rest/v1/raxacore/image?encounter=__Fetch images in an encounter
GET /ws/rest/v1/raxacore/image/__Fetch image by uuid

Anchor
GET image
GET image
GET image

ParameterDescriptionExample
uuidunique id of image<uuid>
fileNamefile name of image<fileName>
tagstags separated by commasknee, lesion, dermatology
dataURIbase64 encoded bytecode of imagedata:image/jpeg;base64,/9j/4AAzS0....
provideruuid, display of provider<uuid>, Dr. Varun
locationuuid, display of location<uuid>, Varun Family Clinic
patientuuid, display of patient<uuid>, John Smith
imageIndexindex within an encounter0
titleimage titleKneeLesion
descriptionimage descriptionPhoto of patient lesion on knee

Anchor
PatientList
PatientList
PatientList

URLs

urldescription
GET /ws/rest/v1/raxacore/patientlist?qFetch all non-retired that match this parameter
GET /ws/rest/v1/raxacore/patientlist/{uuid}Fetch by unique uuid
GET /ws/rest/v1/raxacore/patientlistFetch all non-retired
POST /ws/rest/v1/raxacore/patientlistCreate with properties in request
POST /ws/rest/v1/raxacore/patientlistEdit with given uuid, only modifying properties in request
DELETE /ws/rest/v1/raxacore/patientlist/{uuid}?!purgeDelete this object from the database
DELETE /ws/rest/v1/raxacore/patientlist/{uuid\}?purgeDelete this object from the database

Representations

GET refGET defaultGET fullPOST createPOST 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:

  1. 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)

    Code Block
    languagejavascript
    titleJSON 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
          } ]
        } ]
      } ]
    }
  2. Updating a patient list ---> POST --> http://raxaemr.jelastic.tsukaeru.net/ws/rest/v1/raxacore/patientlist/68547121-1b70-465d-99ee-c9dfd95e7d30

    Code Block
    languagejavascript
    titleJSON Sent/Received
    Request 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" : [ ]
    }
  3. Created patient list  --> http://raxaemr.jelastic.tsukaeru.net/ws/rest/v1/raxacore/patientlist

    Code Block
    languagejavascript
    titleJSON Sent/Received
    Request Body-
    {
      "name" : "Test PatientList",
      "description" : "Test List of Patients"
    }
    ---------------------------------------------------------------
    Response-
    {
      "uuid" : "2f30cc04-6437-487a-9297-b387eee50048",
      "name" : "Test PatientList",
      "description" : "Test List of Patients"
    }
  4. Search patient list by name ---> GET http://raxaemr.jelastic.tsukaeru.net/ws/rest/v1/raxacore/patientlist?q=TestList2

    Code Block
    languagejavascript
    titleJSON Received
    Found PatientList(s): {
      "uuid" : "68547121-1b70-465e-99ee-c9dfd95e7d30",
      "name" : "TestList2",
      "description" : "Second Test List"
    }

Anchor
RaxaAlert
RaxaAlert
RaxaAlert

URLs

urldescription
GET /ws/rest/v1/raxacore/raxaalert?patient=__Fetch images belonging to patient
GET /ws/rest/v1/raxacore/image?provider=__&tag=__Fetch images belonging to patient tagged by tag
GET /ws/rest/v1/raxacore/image?provider=__Fetch images created by provider
GET /ws/rest/v1/raxacore/image?location=__Fetch images belonging to a location
GET /ws/rest/v1/raxacore/image?encounter=__Fetch images in an encounter
GET /ws/rest/v1/raxacore/image/__Fetch image by uuid

Anchor
GET raxaalert
GET raxaalert
GET raxaalert

ParameterDescriptionExample
uuidunique id for raxa alert<uuid>
namemessagePrescription reminder: take your Paracetamol
descriptiondescription of raxa alertAlert created
providerRecipientuuid, display<uuid>, Dr. Varun
providerSentuuid, display<uuid>, Dr. Madan
toLocationuuid, display<uuid>, Madan Family Clinic
fromLocationuuid, display<uuid>, Varun Family Clinic
patientuuid, display<uuid>, John Smith
alertTypetype of alert (string)PrescriptionReminder
defaultTasktask to perform (string)Photo of patient lesion on knee
seenseen by patient (boolean)false
timetime of alert2013-06-11T11:28:20Z

Anchor
POST raxaalert
POST raxaalert
POST raxaalert

ParameterDescriptionExample
providerRecipientprovider uuid of recipient<uuid>
providerSentprovider uuid of sender<uuid>
toLocationlocation of recipient<uuid>
fromLocationlocation of sender<uuid>
patientuuid of patient<uuid>
namemessageTake prescribed medication of paracetamol
descriptionindex within an encounter0
alertTypetype of alert (string)PrescriptionReminder
defaultTasktask to perform (string)Photo of patient lesion on knee
seenseen by patient (boolean)false
timetime of alert2013-06-11T11:28:20Z

 

 

Appendix

Anchor
Prescription frequencies
Prescription frequencies
Prescription Frequencies

FrequencyDescription

q.h.

every hour
qqhevery 4 hours
q.d.s.4x per day
t.d.s.

3x per day

b.d \[sic\]

2x per day

q.d., q1devery day
q.a.m.every day before noon
q.p.m.every day after noon
q4PMevery day at 4 PM
q.h.s.every night at bedtime
q.a.d.every other day
t.i.w.

3x per week

QWKonce per week
p.r.nas needed
q.s.sufficient quantity
ad libas needed