Question
· Jan 30

I build a text string from DTL's source message. What target message type and Business Operation should I use to output the text to a file?

I build a simple text string from an HL7 message in the DTL.  What target message type and Business Operation should I use to write the text to a file?

Product version: IRIS 2024.2
Discussion (2)1
Log in or sign up to continue

There are a few options you could go for here. One would be to have your DTL go from your HL7 Message to Ens.StreamContainer, and then use a code block in your DTL to create and write the stream to store in the stream container.

Something like:

    Set stream = ##class(%Stream.GlobalBinary).%New()
    Do stream.Write(yourTextString)
    set streamContainer=##class(Ens.StreamContainer).%New(stream)

(Above is untested, and you may need to set other values within the container.)

You can then use the operation class EnsLib.File.PassthroughOperation to then write the file out to your desired location.