Versions Compared

Key

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

Table of Contents

Introduction

  • OpenCDS uses the following as defaults: 
    • HL7 vMR 1.0 logical model for both transport and inferencing data structures,
    • the HL7 Decision Support Service (DSS) messaging standard

...

  • This introduction will use the vMR 1.0 standard for the payload, SOAP, and rules written for
    • (which is based on SOAP), and
    • Drools 5. 
  • OpenCDS also includes support for other payloads, including standards:
    • Payloads:
      • full HL7 FHIR
    (and
      • partial support for HL7 C-CDA using 3rd party extensions
    ), REST, and
      • custom input data structures using plug-ins
    • Messaging standard:
      • REST, when using the FHIR Decision Support messages
    • Inferencing using:
      • several releases of Drools 6 (KIE)
      • custom inferencing using Java via plug-ins
      • Weka adapter
  • This introduction will stick to the vMR 1.0 standard for the payload, DSS with SOAP, and rules written for Drools 5. 

SOAP

The SOAP envelope which contains the content consists of the following code.

...

        <dss:evaluateAtSpecifiedTime>
           <interactionId scopingEntityId="edu.utah" interactionId="123"  submissionTime="2012-01-20T07:59:35.123"/>
           <specifiedTime>2012-01-01T00:00:00.000</specifiedTime>
              
<evaluationRequest clientLanguage="" clientTimeZoneOffset="">
                <kmEvaluationRequest>
                    <kmId scopingEntityId="edu.utah" businessId="AcuteBloodLoss" version="1.0.0"/>
                </kmEvaluationRequest>
                <dataRequirementItemData>
                    
<driId itemId="testPayload">
                        <containingEntityId scopingEntityId="edu.utah" businessId="ABLData"  version="1.0.0"/>
                    </driId>
                    <data>
                        <informationModelSSId scopingEntityId="org.opencds.vmr" businessId="VMR"   version="1.0"/>
                        <base64EncodedPayload>BASE64ENCODEDPAYLOAD</base64EncodedPayload>
                    </data>
                </dataRequirementItemData>
            </evaluationRequest>
        </dss:evaluateAtSpecifiedTime>

...

    version- The version of the information model used. e.g. 2.0

BASE64PAYLOAD

Current OpenCDS only supports CDSInput and CDSOutputAsVMR to receive and send data, respectively. The content is encoded and transmitted using base64 format. You can use a free web encoder/decoder such as http://www.base64encode.org/ to make this conversion.

An example CDSInput payload will look like:

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxDRFNJbnB1dD4NCjx2bXJJbnB1dD4NCjxwYXRpZW50Pg0KPGJpcn
RoVGltZSB2YWx1ZT0iMTk2MzA1MjUiLz4NCjxnZW5kZXIgY29kZVN5c3RlbT0iMi4xNi44NDAuMS4xMTM4ODMuMS4xMS4xIiBjb2RlU3lzd
GVtTmFtZT0iSEw3IiBjb2RlPSJNIi8+DQo8Y2xpbmljYWxTdGF0ZW1lbnQgeHNpOnR5cGU9IlByb2JsZW0iPg0KPHRlbXBsYXRlSWQgcm9
vdD0iMi4xNi44NDAuMS4xMTM4ODMuMy4xODI5LjExLjcuMi40IiBpZGVudGlmaWVyTmFtZT0iQWN0aXZlUHJvYmxlbUxpc3RFbnRyeUNv
ZGVPbmx5Ii8+DQo8cHJvYmxlbUNvZGUgY29kZVN5c3RlbT0iT0lEIGZvciBJQ0Q5Q00iIGNvZGVTeXN0ZW1OYW1lPSJJQ0Q5Q00iIGNvZ
GU9IjI1MC4wMCI+DQo8ZGlzcGxheU5hbWUgdmFsdWU9IkRpYWJldGVzIG1lbGxpdHVzIi8+DQo8L3Byb2JsZW1Db2RlPg0KPC9jbGluaW
NhbFN0YXRlbWVudD4NCjwvcGF0aWVudD4NCjwvdm1ySW5wdXQ+DQo8L0NEU0lucHV0Pg==

Which decodes to:

<?xml version="1.0" encoding="UTF-8"?>
<CDSInput>
   <vmrInput>
    <patient>
     <birthTime value="19630525"/>
     <gender codeSystem="2.16.840.1.113883.1.11.1" codeSystemName="HL7" code="M"/>
     <clinicalStatement xsi:type="Problem">
     <templateId root="2.16.840.1.113883.3.1829.11.7.2.4" identifierName="ActiveProblemListEntryCodeOnly"/>
     <problemCode codeSystem="OID for ICD9CM" codeSystemName="ICD9CM" code="250.00">
       <displayName value="Diabetes mellitus"/>
     </problemCode>
    </clinicalStatement>
   </patient>
  </vmrInput>
</CDSInput>

...

An example CDSOutputAsVMR payload will look like:

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxDRFNPdXRwdXRBc1ZNUj4NCjx2bXJPdXRwdXQ+DQo8cGF0aWVudD4N
CjxjbGluaWNhbFN0YXRlbWVudCB4c2k6dHlwZT0iSW1hZ2luZ1Byb3Bvc2FsIj4NCjxpZCByb290PSI5YTZkMWJhYy0xN2QzLTQxOTUtODlj
NC0xMTIxYmM4MDliNWEiLz4NCjxwcm9jZWR1cmVDb2RlIGNvZGU9IjE2ODczMTAwOSIgY29kZVN5c3RlbT0iMi4xNi44NDAuMS4xMTM4ODMu
Ni45NiIgY29kZVN5c3RlbU5hbWU9IlNOT01FRC1DVCI+DQo8ZGlzcGxheU5hbWUgdmFsdWU9IkNoZXN0IFgtUmF5Ii8+DQo8L3Byb2NlZHVy
ZUNvZGU+DQo8cHJvcG9zZWRQcm9jZWR1cmVUaW1lPjxsb3cgdmFsdWU9IjIwMTIwODI2Ii8+PGhpZ2ggdmFsdWU9IjIwMTIwODI2Ii8+PC9w
cm9wb3NlZFByb2NlZHVyZVRpbWU+DQo8L2NsaW5pY2FsU3RhdGVtZW50Pg0KPC9wYXRpZW50Pg0KPC92bXJPdXRwdXQ+DQo8L0NEU091dHB1
dEFzVk1SPg==

Which decodes to:

<?xml version="1.0" encoding="UTF-8"?>
<CDSOutputAsVMR>
  <vmrOutput>
   <patient>
    <clinicalStatement xsi:type="ImagingProposal">
     <id root="9a6d1bac-17d3-4195-89c4-1121bc809b5a"/>
     <procedureCode code="168731009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED-CT">
       <displayName value="Chest X-Ray"/>
     </procedureCode>
     <proposedProcedureTime>
       <low value="20120826"/>
       <high value="20120826"/>
     </proposedProcedureTime>

    </clinicalStatement>
   </patient>
  </vmrOutput>
</CDSOutputAsVMR>

...