Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Hl7 protocol problem  (Read 7351 times)
Claudio B.
Posts: 6


« on: January 22, 2018, 11:10:33 am »

I'm trying to implement software to interface with a clinical chemistry machine in hl7.
I'm finding it difficult to use the hl7 protocol because the ch.dataAvailable () and ch.readLine () statements fail to intercept the check characters of the h7 and <VT> ascii (11).
the program can no longer understand when the transmitters have finished and the genero program is still listening without being able to read anything (empty string).
Only when the sender permanently closes the tcp channel, then I receive everything at once.
Reuben B.
Four Js
Posts: 1062


« Reply #1 on: January 25, 2018, 05:20:17 am »

I would try the following.  Use ch.setDelimiter() to set the delimiter to the last characters of the message <FS>,<CR>  (from my reading <VT> is the first character, I want the characters you know signify the end)

Use ch.read not ch.readLine, that will read the whole message upto the delimiter into the 4gl variable.  From that position use base.StringTokenizer or stringbuffer methods to dice up the HL7 message into the constituent parts.

Is there a tool similar to SoapUI you can use to emulate messages received?  If you wanted support  to look further, a tool like that would be useful.

Reuben


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Claudio B.
Posts: 6


« Reply #2 on: February 08, 2018, 04:16:26 pm »

Thanks for your answer.
I'm trying to communicate lab machinery (Mindray BC-5380).
The mindray is a client and I a server.
I wait the connection with commands:

LET ch = base.Channel.create ()
CALL ch.openServerSocket (null, "2575", "ub")
LET rigaw = ch.readLine ()

after the readline () everything stops until the machine corce connection close.
At this point I read everything at once, but the handshaking fail.
I think the problem is caused by the lack of EOF from the machine and therefore the readline does not intercept the incoming data.
The HL7 protocol only provides control characters <VT> HL7 Message <FS> <CR> (HL7 Minimum Layer Protocol (MLP) )
Claudio B.
Posts: 6


« Reply #3 on: February 08, 2018, 04:17:04 pm »

I'm trying to communicate lab machinery (Mindray BC-5380).
The mindray is a client and I a server.
I wait the connection with commands:

LET ch = base.Channel.create ()
CALL ch.openServerSocket (null, "2575", "ub")
LET rigaw = ch.readLine ()

after the readline () everything stops until the machine corce connection close.
At this point I read everything at once, but the handshaking fail.
I think the problem is caused by the lack of EOF from the machine and therefore the readline does not intercept the incoming data.
The HL7 protocol only provides control characters <VT> HL7 Message <FS> <CR> (HL7 Minimum Layer Protocol (MLP) )
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines