Versions Compared

Key

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

...

3. the gello code itself.

 


Information is available here.

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.

 


Get it going in the editor first.  Here is some GELLO code to calculate BMI:

 


 imports HL7_v2_VMR_V1
 Context SinglePatient

...

 else 'Obese'
 endif
 endif
 endif
 

Using fifthTest.xml, here is the result:

 


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 here and it is named POST.txt.  Instance data for the data model starts on line 3. Package data starts on line 1912 and the The Gello query itself is on 19213604.

Here is a screen shot of Postman showing some of the POST json text:

 

 



and the result itself:

In the POST text note how the GELLO section is now written with new line characters at the start of each line.

If we want to see the variables ( say for debugging - although you would do this more in the editor), add ‘V,1’ to line 2, to make it: 


   "Debug": "V,1",

You can also return the result as a tuple instead of a single typed value (which in this case is simply a string).