The third and last post of the series "Integrate Oracle SOA Healthcare and Oracle SOA Suite back-end composites across segregated domains" covers the creation of the back-end SOA composite, that acts as the man in the middle between the two configured SSHI endpoints. The post also covers how to perform the testing of the implementation using the HAPI Testing Console.
As guidance, this series is divided in:
At the end of the article you may also access the list of artifacts produced for this exercise as to a sample message.
Check the message route at the SSHI Reports and observe that three messages were reported: two inbound (ADT A03 and Ack) and one out (ADT A03).
Thank you for reading!!
As guidance, this series is divided in:
- Part 1: Configuration of the separated domains and JMS artifacts
- Part 2: Healthcare (SSHI) configuration
- Part 3: SOA Composite and Testing
At the end of the article you may also access the list of artifacts produced for this exercise as to a sample message.
SOA Back-end composite
The composite to be created will be constituted by three main elements:
- Healthcare Adapter: Exposed service to receive messages from the Healthcare (SSHI) thought the inbound JMS queue
- Mediator: to deliver the message and its properties to the outbound Healthcare Adapter
- Healthcare Adapter: Reference able to send messages to the SSHI environment through the outbound JMS Queue
Create the SOA Application and Project
Create a new SOA Application with the name: soabpmfusion and a project called: sshi-jms-hub
A new empty composite is created
Start by dragging and dropping an Healthcare Adapter from the components box to the Exposed Service lane
A new wizard pops up and the name hcService can be left as the Healthcare Adapter service name
For integration type, select JMS
This time point to the Healthcare (SSHI) domain connection. If it is not created yet, create a new Application Server connection to the newly created SOA-Domain (Domain B)
Since we will receive the HL7 messages arriving from the SSHI domain set the operation as Receive.
There are many options to define the Document handling of the adapter. The message XML schema can be imported from the SSHI to the composite allowing the local consumption of the XSD, it can be referenced from the MDS, use an XSD file from a local location or even receive the message as Base 64 opaque mode. Each of the options has its applicability, however, for this sample, lets select to import from the SSHI the XSD to be used in the composite.
Pick the ADT_A03_def from the document repository on the SSHI.
After all SSHI related configurations are complete, time to define the details for the integration between the SOA Domain (Domain-B) and the SSHI Domain (Domain-A).
Select the Oracle Weblogic JMS option
The next step is about defining the connection to the server where the JMS queues are available. In our sample the JMS queues are available from the SOA Domain. Go head using or setting the connection. If not available yet in your JDeveloper, create it a new connection pointing to SOA-Domain (SOA-B) and select it from the connection options.
Is in this new wizard window that the queue and the JmsAdapter Connection Pool JNDI name are configured. Use the browse button and the magnifiying glass icon to search and select the desired details
Destination Name Queue: jms/hc/SSHIInboundQueue
Message Body: BytesMessage
JNDIName: wis/wls/SSHI_HL7_IN
It is now time to add a new Healthcare Adapter, this time as a composite Reference
And name it as hcReference
The configuration will be similar as the outbound, except that the operations will be Send instead of Receive and the Queue and JNDI Name should be configured as:
Destination Name Queue: jms/hc/SSHIOutboundQueue
Message Body: BytesMessage
JNDIName: wis/wls/SSHI_HL7_OUT
Time to finalize the composite adding the mediator to connect both Healthcare Adapters
Add a new mediator component with the name SSHIMediator defining the Interface Later
Wire the components
The mediator has the mission to assign the message payload together with healthcare properties to the reference Healthcare Adapter. Typically, in a In Memory integration this is achieved using the hc.<property> elements available, but, since the jca.jms is being used, the jms property structure will need to be used instead.
The HC properties to be filled and delivered through to the SSHI are:
- Document Type Name (DOCTYPE_NAME) - Copied from the inbound
- Document Type Version (DOCTYPE_REVISION) - Copied from the inbound
- Destination Endpoint (TO_ENDPOINT) - "SSHI_OUTBOUND_MLLP"
- Message Sequence Id (INTERFACE_SEQUENCE_ID) - Copied from the inbound
- Message Id (MSG_ID) (generated by generateGuid() function)
The image above depicts the following source code:
<assign>
<copy value="$in.property.jca.jms.JMSProperty.DOCTYPE_NAME"
target="$out.property.jca.jms.JMSProperty.DOCTYPE_NAME"/>
<copy expression="'SSHI_OUTBOUND_MLLP'" target="$out.property.jca.jms.JMSProperty.TO_ENDPOINT"/>
<copy value="$in.property.jca.jms.JMSProperty.DOCTYPE_REVISION"
target="$out.property.jca.jms.JMSProperty.DOCTYPE_REVISION"/>
<copy value="$in.property.jca.jms.JMSProperty.INTERFACE_SEQUENCE_ID"
target="$out.property.jca.jms.JMSProperty.INTERFACE_SEQUENCE_ID"/>
<copy expression="ora:generateGUID()" target="$out.property.jca.jms.JMSProperty.MSG_ID"
xmlns:ora="http://schemas.oracle.com/xpath/extension"/>
</assign>
The composite is now complete and ready to be deployed to the SOA Domain (SOA-B)
Testing
The testing will consists of sending a HL7 ADT 03 message through the inbound MLLP endpoint and expect an outbound message being sent to the outbound endpoint. The sample is finalizing with an acknowledge message successfully sent from the HAPI tool to the SSHI environment.
First, is necessary to configure the HAPI Testing Console.
Having the console initiated, lets created two connection:
- Sending Connections: In_Patient_Admition
- Receiving Connections: Out_Patient:Laboratory
Fill the details as described in the following two images:
Add the sample document to the messages tab (link to the sample message is available at the end of this post)
Start both sending and receiving connections - you should have a green sign on each.
Everything is set to test the implementation.
Select the message at the HAPI Console and, being sure that the correct Sending Connection is select and the options are configure for 1 message, press Send
A message will be sent and an successful acknowledge should be identified.
Check the message route at the SSHI Reports and observe that three messages were reported: two inbound (ADT A03 and Ack) and one out (ADT A03).
At the SOA-Domain Enterprise Manager it can be verified that the composite has been successfully completed.
It can be notice that the message went through the MLLP channel to the SSHI endpoint, was translated from HL7 raw format to XML and delivered to the internal delivery channel and through the JMS queues configured at the SOA-Domain (Domain-B).
The message is then picked from the queue by the back-end composite, delivered to the outbound internal delivery channel queue and consequently delivered through the endpoint to the MLLP Server in the SSHI-Domain (Domain A).
All the processed is finalized with the reception of a positive acknowledge from the MLLP HAPIS server.
The message is then picked from the queue by the back-end composite, delivered to the outbound internal delivery channel queue and consequently delivered through the endpoint to the MLLP Server in the SSHI-Domain (Domain A).
All the processed is finalized with the reception of a positive acknowledge from the MLLP HAPIS server.
Thank you for reading!!