RawContent only has first 10k of the message, how do I pull out the full message?
We have the following code, but recently had a few issues with messages sent to downstream systems being rejected.
After investigating, seems that the message being sent is being truncated, the RawContent that we are pulling from Ens.EnsLib_HL7.Message only has the first 10k of the message
We are storing message body IDs in a table, then when we receive later messages, we look up the corresponding record in the table,
extract the message and alter some fields from the saved message based on the received message and send onto downstream systems
Is there a simple way of getting the full message into RawContent rather than just the first 10k?
example of the code...
EnsMsgBodyID has the value of the previously saved message body id
&SQL(SELECT RawContent into :RawContent FROM Ens.EnsLib_HL7.Message WHERE ID = :EnsMsgBodyID)
set newHl7 = ##class(EnsLib.HL7.Message).ImportFromString(RawContent)
Do newHl7.PokeDocType("Hl7Template_2.4:"_"Hl7_General")
Do newHl7.%Save()
Alter various fields in newHl7
set status = ..SendRequestAsync(downstreamsystem,newHl7)