Overview
In some cases you will need to transform a list of CDA documents into vMR in order to be able to consume the OpenCDS service. Here, we describe how to take advantage of the open-source CDA Redaction Web service developed by the SHARPS DS2 project. We have packaged the CDA Redaction Web service along with other SHARP applications into the cdatovmr docker container. In order to describe its functionality, we make use of three components: cdatovmr container, opencds container and soapui as Web service client. The following figure provides an overview of the interaction between these components.
Create opencds docker container
Please check the wiki page OpenCDS container for more details about how to build the opencds docker image. The following command will create a new container called opencds based on the image opencds/opencds:ubuntu
sudo docker run -d --name opencds opencds/opencds:ubuntu
Run the following command in order to find the URL assigned to the opencds container. In this case the URL assigned is 172.17.0.6
sudo docker inspect opencds | grep IPAddress "IPAddress": "172.17.0.6", "SecondaryIPAddresses": null,
Verify that opencds service is available by opening a browser on the URL http://172.17.0.6:8080/opencds-decision-support-service/evaluate?wsdl
Create cdatovmr docker container
Please check the wiki page cda2vmr container for more details about how to build the image. Before building the image edit the ejb-jar.xml file that is inside of the opencds-cdatovmr-docker folder. You will need to define the URL of the opencds service on the XML element env-entry-value as is showed below.
... <session> <ejb-name>OpenCdsServiceMGR</ejb-name> <env-entry> <env-entry-name>OPENCDS_ENDPOINT</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>http://172.17.0.6:8080/opencds-decision-support-service/evaluate</env-entry-value> </env-entry> ...
The following command will build an image named opencds/cdatovmr.
sudo docker build -t="opencds/cdatovmr" .
After the images has been created you will be able to create a container based on this image. The following command will deploy an image and bind its ports to the local host, for example the container's SSH port (22) will be available on localhost:2222. Also the container will be running in interactive mode (-i -t parameters) so we will be able to see the logs from Glassfish server.
sudo docker run -p 8080:8080 -p 2222:22 -p 4848:4848 -p 8181:8181 -p 9009:9009 --name cdatovmr -i -t opencds/cdatovmr
Check that the following applications are available
- Inference analyzer - http://locahost:8080/SimplePredicateReducerVisualizer-1.0-SNAPSHOT
- Predicate/Reducer - http://localhost:8080/opencds-decision-support-service-1.2.0-SNAPSHOT/evaluate?wsdl
- Predicate reducer Web service - http://localhost:8080/CdaService/Evaluate?wsdl
- Predicate reducer web application - http://localhost:8080/cda-ws-web/
For this demonstration we will only use the Predicate reducer Web service http://localhost:8080/CdaService/Evaluate?wsdl
CDA document
The CDA document used in this example is available on the CDA Redaction Web service project (cda-web-service/cda-ws-support-xml/samples/ccda.xml)
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="CDA.xsl"?> <!-- Title: US_Realm_Header_Template Original Filename: Version: 1.0 Revision History: 01/31/2011 bam created 07/29/2011 RWM modified 11/26/2011 RWM modified --> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xmlns:cda="urn:hl7-org:v3" xmlns:sdtc="urn:hl7-org:sdtc"> <!-- ******************************************************** CDA Header ******************************************************** --> <realmCode code="US"/> <typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/> <!-- US General Header Template --> <templateId root="2.16.840.1.113883.10.20.22.1.1"/> <!-- *** Note: The next templateId, code and title will differ depending on what type of document is being sent. *** --> <!-- conforms to the document specific requirements --> <templateId root="2.16.840.1.113883.10.20.22.1.2"/> <id extension="999021" root="2.16.840.1.113883.19"/> <code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" code="34133-9" displayName="Summarization of Episode Note"/> <title>Good Health Health Summary</title> <effectiveTime value="20050329171504+0500"/> <confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/> <languageCode code="en-US"/> <setId extension="111199021" root="2.16.840.1.113883.19"/> <versionNumber value="1"/> <recordTarget> <patientRole> ...
SoapUI setup
For demonstration purposes we are using the open-source test tool SoapUI. The complete SoapUI project is available here.
Open SoapUI and create a new SOAP project, define the location of the WSDL of the CDA Redaction web service as is showed on the next figure:
This will create a project with samples of the supported SOAP requests.
SOAP request
The following figure shows the reduce SOAP request. The XML element payload contains the base64 version of the CDA document
vMR document
SOAP response
Conclusion