Hi Robert, Thanks you for the video...Do know where I can find a Virtual Box for NextGen?
@juhaleppala8262
3 жыл бұрын
Hi Robert, Thanks for the video. Any ideas how to change the socket level encoding from utf-8 -> iso-8859-1
@robertrupp7124
3 жыл бұрын
for the server to can pass it as a second argument to "start" i think. github.com/hitgeek/simple-hl7/blob/master/examples/tcp.js#L41 app.start(7777, 'iso-8859-1'); for the client you can do something like this. var client = hl7.Server.createTcpClient(options); client.connect(function(err) { client.client.setEncoding('LATIN1') //check the node docs for what strings are supported here. client.send(hl7Msg, callback); }) by accessing the underlying node socket. github.com/hitgeek/simple-hl7/blob/master/lib/client/tcp-client.js#L28
@juhaleppala8262
3 жыл бұрын
@@robertrupp7124 Thanks!
@tesfayeeyasu8248
3 жыл бұрын
Hi Robert , how to receive data inside the client after sending message(ORM)
@robertrupp7124
3 жыл бұрын
the only data you will receive inside the client is the ACK from the server. client.send(msg, function(err, ack) { console.log(ack.log()); //here is the ACK });
@tesfayeeyasu8248
3 жыл бұрын
@@robertrupp7124 client.client.on('data',function(data) { Console.log(data) } ); is this valid to receive data as client?
@saburius
8 жыл бұрын
Can it also send hl7 messages? The docs mention this but I didn't see any examples.
@robertrupp7124
8 жыл бұрын
+saburius there is a client for sending messages to tcp based hl7 servers. To create a tcp client, check out the lines after "server.createTcpClient()". First connect to a server with the IP address and port, then you can call the send() method with an HL7 message. There is also a FileClient, which saves the HL7 message to a specified network or local folder. SFTP and HTTP(S) are other common transport mechanisms for HL7. These are not supported natively by the library, but can be used with other node packages. If you need to send via SFTP I would recommend the "scp2" package on npm. For HTTPS the "request" package should work well. If you need to send messages (other than acknowledgments) on the same connection that your server is listening on, that isn't really supported, but I could give you some pointers on how to make that work, and integrate that into the library. if you have more questions, open an issue on github, or you can find my contact into on npm.
@saburius
8 жыл бұрын
+Robert Rupp Thank you!
@freddyboys4128
8 жыл бұрын
hi when I start the client I get this error: lib/server/client/tcp-client.js:23 tcpClient.ackCallback(ack); ^ TypeError: tcpClient.ackCallback is not a function however I can see the message on server. How can I solve the problem
@robertrupp7124
8 жыл бұрын
sorry, for the late response. gmail flagged the youtube comment as spam. I think you need to provide a callback to tcpClient.send tcpClient.send(msg, function(ack) { console.log(ack); tcpClient.close(); }); I will need to update that example, or fix that code so that the callback isn't required.
Пікірлер: 13