IPWorks EDI 2020 Node.js Edition

Questions / Feedback?

Send Method

Send HL7 data to the MLLP client associated with the specified connection Id.

Syntax

mllpserver.send(connectionId, [callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

The Send method sends data for the connection specified by ConnectionId to the associated MLLP client.

Before calling this method, specify the data to send by doing one of the following (the class will use the data from the first valid location):

  • Set the InputFilename property to the path of a file with HL7 data.
  • Set the HL7 data directly to the InputData property.

ConnectionId is the connected client to which the server should Send.

Once the client has received the data, it will respond with an acknowledgement, causing the class's AckIn event to fire.

Sending Data Example

mllpServer.Connections[connectionId].InputData = "HL7Data";
mllpServer.Send(connectionId);

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 Node.js Edition - Version 20.0 [Build 8203]