Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

A useful new The Medical Objects RESTful web service is now available. A POST is in json format and needs to include three things:

1. patient data in json (or cjson) format

2. Package data if needing an extension or separate package to the default HL7_v2_VMR

3. the gello code itself.

 

Information is available here.

https://kb.medical-objects.com.au/display/pub/gello+rest+api+-+generic+version

This service is a research and development site currently. We welcome feedback from users to the info@medical-objects… address. If you wish to use it for commercial/mainstream purposes, please contact us.

 

Use of SNOMED-CT

Use of SNOMED CT through this web service requires a license from IHTSDO. Do not use this functionality if you are not licensed to do so.

 

 

 

Worked example – Body Mass Index (BMI)

This worked example gets the latest height and weight for a patient and calculates the BMI on the MO web server, and then retrieves the result as json. The example makes use of the ‘Postman – REST Client’ chrome app.

...

Here is some GELLO code to calculate BMI:

 

     imports HL7_v2_VMR_V1
     Context SinglePatient
     Let allWeights:Sequence(Observation) = vitals.weight
     Let allHeights:Sequence(Observation) = vitals.height
     Let mostRecentWeight:Observation = allWeights->sortedBy(dateTime)->last()
     Let mostRecentHeight:Observation = allHeights->sortedBy(dateTime)->last()
     Let wt:Real = mostRecentWeight.value.oclAsType(PQ).value
     Let ht:Real = mostRecentHeight.value.oclAsType(PQ).convert('m').value
     Let BMI: Real = wt/ht.power(2)
     If BMI < 18.5 then 'Underweight'
         else If BMI >= 18.5 and BMI < 25 then 'Normal'
            else If BMI >= 25 and BMI < 30 then 'Overweight'
               else 'Obese'
               endif
            endif
         endif
 
 

Using fifthTest.xml, here is the result:

 Image Added

 

The url string for the POST in the REST client is:  http://mowgli.medical-objects.com.au/rest/gellov2/generic

 

The json code for a POST is in the attached folder and it is named POST.txt.  Instance data for the data model starts on line 3. Package data starts on line 1912 and the Gello query itself is on 1921.

 

Here is a screen shot of Postman:

...