Question
· Jan 24, 2018

Inserting into HL7 from within BPL

I'm looking at an issue where I need to grab an ID number from an external SQL table when it doesn't exist in a HL7 message, and then add it to the HL7 message.

I have built the logic within a BPL which checks for the lack of ID, and then pulls the ID from the SQL table (and storing its value using the context functionality within the BPL) however I am at a loss as to how I then take the ID and add it to the HL7 message before passing it to a router.

I'm not aware of how I would call the context value from within a DTL (or if that is even the correct way of proceeding) so I'm hoping someone here can point me the right direction.

Discussion (2)2
Log in or sign up to continue

When calling a SQL call, I normally return the value in a Snapshot. 

You can do this 1 of two ways...

1. Set two variables....One for the Outbound HL7 Message, and one for the structure of your snapshot. Set your source equal to your snapshot variable and your target being the Outbound HL7 context variable. Use a Data transformation to take the information from the Snapshot and insert it into the HL7.

2. Create a variable for your ID variable, and loop through the Snapshot to set that ID variable. Then create a dummy data transformation that you can use to set your HL7 field to your context.ID variable.

I have plenty of examples of doing this in either way. There might be others that have a better solution, its just what I have used in the past.

Scott Roth

The Ohio State University Wexner Medical Center