Vous pouvez remplacer la méthode OnConstructReply de EnsLib.HL7.Service.Standard. La méthode suivante a fonctionné pour moi.

Class DC.CustomACKBS Extends EnsLib.HL7.Service.TCPService
{

Method OnConstructReply(Output pReplyDoc As EnsLib.EDI.Document, pOriginalDoc As EnsLib.EDI.Document, ByRef pReplyCode As %String, ByRef pSC As %Status, pEarlyAck As %Boolean) As %Status
{
    Set pReplyDoc=##class(EnsLib.HL7.Message).%New()
    Set pReplyDoc.DocType="2.4:ACK"
    Set MSHStr="MSH|^~\&|EnsembleHL7|ISC|ARiM Server|ROWA|"_$REPLACE($REPLACE($ZDATETIME($HOROLOG,8,1),":",""), " ","")_"||ACK|"_pOriginalDoc.GetValueAt("MSH:10")_"|P|2.3"
    Set MSHSeg=##class(EnsLib.HL7.Segment).ImportFromString(MSHStr,.tSC,pOriginalDoc.Separators)
    Set MSAStr="MSA|AA|"_pOriginalDoc.GetValueAt("MSH:10")
    Set MSASeg=##class(EnsLib.HL7.Segment).ImportFromString(MSAStr,.tSC,pOriginalDoc.Separators)
    Set tSC=pReplyDoc.SetSegmentAt(MSHSeg,1)
    Set tSC=pReplyDoc.AppendSegment(MSASeg)

    Quit tSC
}

}