Question
· Jun 10

Handling HL7 Message Response from SOAP Request

We have a vendor that is requiring that the HL7 sent to them is sent as an Encoded message inside a SOAP request but is sending back an HL7 message as the response. 

When the WSDL built the response, it was expecting an encoded message back. I updated the Request and Business Operation to expect an EnsLib.HL7.Message, however I am not sure how to handle the HL7 ACK to post it back to the sending message so it will not cause an Orphan message, and to parse it back correctly in the trace viewer.

When I do a $$$LOGINFO on the pResponse, I get back...

How do I properly parse the HL7 ACK that was returned and file it correctly?

Product version: IRIS 2024.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2024.1 (Build 267_2U) Tue Apr 30 2024 16:06:39 EDT [HealthConnect:7.2.0-1.r1]
Discussion (2)1
Log in or sign up to continue

This is how I solved the issue...

 Set tSC = pRequest.NewResponse(.tResponse)  Quit:$$$ISERR(tSC) tSC
 Set tResponse.encodedMessage = $get(encodedMessage)
 set dMsg = $SYSTEM.Encryption.Base64Decode(tResponse.encodedMessage)
 set pResponse = ##class(EnsLib.HL7.Message).%New()
 set pResponse = ##class(EnsLib.HL7.Message).ImportFromString($Get(dMsg))
 set pResponse.DocType = ##class(EnsLib.HL7.Schema).ResolveSchemaTypeToDocType(pResponse.TypeVersion,pResponse.Name)