Sunday 12 October 2014

OpenCDS SandBox (Tolven and OpenCDS service)


I have created a sandbox environment to test the interaction between the OpenCDS service and an Electronic Health Record (EHR) system.  This environment contains the following:
  1. The Tolven EHR system (an open source EHR system http://home.tolven.org/
  2. The OpenCDS service (running in a Tomcat server) http://www.opencds.org/ 
  3. Guvnor (rules editor http://guvnor.jboss.org/)
  4. Eclipse with a workspace containing a Tolven plugin code that enables the connection between the EHR system and the CDS service. 
The installation process is described in the following video:


The iso image file can be downloaded from here:
https://mega.nz/#!fMoBXZab!LEQFRQWql3YvMkcZek8uIJW5bxokG4tniYceH_7kD5Q
 
You can clone the code of Tolven plugin from here:
 $git clone https://bitbucket.org/Salvador_Rdz/tolven-opencds-plugin.git  

Another approach for installing this image is using the .ova file (Open Virtualization Format).  This file is available in the following link: (description key !UELDz_Toe8UnRNyBmmTkwSk1ysd3KAdYXIUhQkx14kU )
https://mega.nz/#!vARWRLYJ  

To import the Virtual Machine into Oracle VirtualVox Manager, click on File -> Import Appliance and
select the ova file.
Using the ova file is quicker than using the iso file, since you don’t have to wait for the clonezilla installation.    However, you can use the iso file to install the environment directly into the hardware without using a visualization environment.

Monday 4 August 2014

OpenCDS - Test your service using SoapUI


I found SoapUI very useful for testing my OpenCDS services. One of the advantages is that SoapUI allows you to create Groovy scripts to customize your test cases.  Additionally, you can use LoadUI for advanced service load testing.  In this post I describe how I am using SoapUI to test my OpenCDS services, if you have a better approach please let me know :)

Tools used:

-SoapUI - you can downloaded from here
-Example SoapUI project, available here
-Example input vMR available here

Steps:

1.- Create a folder in you machine (e.g., "/home/MyVmrContent" in Linux or C:\MyVmrConten in Windows)

2.- Create two XML files in the new folder, something like this:

OpenCDSInput.xml - This contains the decoded vMR that we want to send the the service.  You can download an example vMR here 

OpenCDSOuput.xml - This will contain the vMR that we get from the OpenCDS service, for now just leave it empty.

3.- Open SoapUI and import the example SoapUI project.  File-> Import Project.  Then open the evaluateAtSpecifiedTime test step


and change the Endpoint of the service, in this example my OpenCDS service is located in http://10.42.0.62:18080/opencds-decision-support-service/evaluate 




4.-Open the Groovy script "Changebase64EncodePaylod".  This script encode the content of the OpenCDSInput.xml and put it inside the SOAP message request.




Change the path of the input file "OpenCDSInput.xml" to your folder






5.- Now you can run the test by opening the  "Show test editor"



 and just click in the green arrow to test your service.


6.- Thats it!. The decoded OpenCDS response will be available in the file OpenCDSOutput.xml.  The advantage of this approach is that you can work directly with your XML editor without having to manually decode the vMR into base64.  Additionally, you can create more Groovy scripts and make more complex test scenarios, such as sending different requests based on the content of a SOAP message response, etc. 


Notes

This example is based on the Oxygen demo available here:
http://develop.opencds.org/OpenCDSDemo/latest/OxygenDemo.wssc