Hi, folks. I have an HL7 SIU message inbound that is missing a few fields, such as patient ID and provider ID. I insert this HL7 message and a few of the fields into a SQL database. My SQL team then runs a stored procedure to retrieve the patient ID and provider ID and insert the found values into fields in the table. I would like to then do a select from the table, load the HL7 message and add the fields that were found by the SQL stored procedure into the HL7 message. I'm attempting to use a DTL to accomplish this. My sourceclass is CustomEDI.SQLSIUInRequest and targetClass is EnsLib.HL7.Message
The first statement in my DTL is:
<![CDATA[ set SIUString = source.ImportFromString(source.SchedulingData,.tSC)
if $$$ISERR(tSC) quit
set target = SIUString]]></code>
Any subsequent references to the outbound HL7 fields causes an error.
I assume my problem is trying to copy a string to a fixed HL7 format. Anyone have an idea on how to accomplish what I'd like to do?
My issue is similar to a post titled SQL Store Procedure Output (String) into HL7 message which provides a solution, but I'm not sure where I would put the code to cast the incoming string to an HL7 message.