I'm attempting to extract some very large messages from Interoperability/Ensemble, and I'm just not getting something right ...
The closest I've come to getting something useful is this:
ClassMethod GetHL7Msg(pId As %String) As %Stream.TmpCharacter [ SqlName = GetMsg, SqlProc ]
{
Set tHl7 = ##class(EnsLib.HL7.Message).%OpenId(pId,,.tSC)
Throw:$$$ISERR(tSC) .GetErr(-400, "HL7 Message with ID "_pId_" Not Found.")
Set tMsg = ##class(%Stream.TmpCharacter).%New()
Set tSC = tHl7.OutputToLibraryStream(..png)
.png)





