Parse HL7 Content from JSON Request into EnsLib.HL7.Message Object
Good morning -
I am attempting to pass some HL7 content (say, a complete ADT message) from one server to another via REST/JSON - for reasons.
I can get the data across but when I try to create an EnsLib.HL7.Message object from the message in the JSON body, I end up with just the start of an HL7 msg in the resulting object. Looks like: MSH|^~\&
The start of the code accepting the data looks like this:
S tInput = tReq.Message
S tMsg = ##class(EnsLib.HL7.Message).%New()
D tMsg.ImportFromString(tInput)
S tMsg.DocType = "2.3.1:ADT_A01"
So now if I take that tMsg and try to send it to an Adapterless Business Service and/or simply try to output what it receives to a file, I get basically nothing. I've tried multiple methods to get the string HL7 Content (from the JSON body) into the EnsLib.HL7.Message object to no avail. I feel like I'm missing something quite simple so tossing this out there in hopes I can move past this on to better things. Thanks,
Craig R