· Apr 13, 2023

Need to have TCP/IP HL7 Inbound service/adapter just write to file - no persistence anywhere in the engine

Curious if anyone has modified the HL7 TCP/IP Service and adapter class to receive an HL7 message, ACK it, and just dump it straight to a file? I don't want the messages in the engine at all - just receive and dump. Has anyone done this before and have code you're willing to share?

Thank you very much in advance!

Product version: IRIS 2022.2
Discussion (3)2
Log in or sign up to continue

Apologies if too late but I tried the following based on the Non Persistence option used in the EnsLib.HTTP/REST/SOAP Generic classes (also see  Accelerate Ensemble)

1. Custom TCP Service Extends EnsLib.HL7.Service.TCPService:

Class Community.NonPersistService Extends EnsLib.HL7.Service.TCPService

Parameter SETTINGS = "PersistInProcData:Additional";

/// Persist data to operations with invocation InProc<br/>
/// The default is On. <br/>
/// This setting is only used if calling an operation with invocation InProc. <br/>
/// If this setting is off then no message headers will be created and message bodies will not be saved.<br/>
/// If this setting is off there will be no trace in the message viewer. <br/>
/// If this setting is off there will be no retry attempts by the operation - only one attempt will be made. <br/> 
Property PersistInProcData As %Boolean [ InitialExpression = 1 ];

Method OnInit() As %Status
    Set $$$EnsInProcPersist=..PersistInProcData
    Quit ##super()


2. Custom HL7 File Operation invoked InProc that is the target of the service

Class Community.InProcOperation Extends EnsLib.HL7.Operation.FileOperation

Parameter INVOCATION = "InProc";


Note the property description from EnsLib.HTTP.GenericService for PersistInProcData states for synchronous sends but this needs to be removed since not relevant for InProc. Sufficient that InProc target processed via OnMessage.