Use case

A user must build an interface that requires queries to multiple data sources that are based on a single input message.

The consolidated message is received by the downstream system as a single transaction. This contains data collated from the multiple data sources.

Receiver scenario

This user is an Information Developer building an interface that receives an event notification message in XML format that is received by a Cloverleaf thread.

In a secondary message (Step 7), the questionnaire (Step 5) is combined with the demographics (Step 4). This is then sent to a separate web service API end point.

The order of operation is:

  1. The interface creates a DTC transaction upon receipt of the event notification.
  2. The interface extracts the enterprise ID from the transaction and performs a web-service query to an enterprise main patient index (EMPI) service. This service returns all of the IDs that are known for the patient. This list of IDs includes an encounter ID.
  3. Using DTC, the interface stores these IDs for later use in the DTC staging database, keyed on the DTC transaction ID.
  4. The interface makes an invocation to a second web service. This service returns the patient resource (demographics), returned in XML format. This demographic information is stored in the DTC staging database, keyed on the DTC transaction ID.
  5. The interface makes an invocation to a third web service which returns a questionnaire ID. This ID is stored in the DTC staging database.
  6. When all web service invocations are complete, this data from the DTC staging database is collated to create a single outbound transaction:
    • Enterprise ID
    • Patient demographic resource
    • Encounter ID
    • Questionnaire ID
  7. Secondary message delivery. The questionnaire results are combined with the demographics retrieved earlier. Cloverleaf picks up these stored values and enriches the outbound questionnaire transaction with these IDs.
  8. The outbound message is delivered to the downstream system for processing.

Testing the interface

The user must test the interface that was built in the receiver scenario.

  • The Testing Tool is used to verify all data in and out of the DTC process.
  • Breakpoints are set at each stage in processing. This validates that the data stored in the staging database applies to the scenario being built.
  • Users can view each outbound transaction and inbound reply used during processing.