Problem sending to Cloverleaf from an application

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Problem sending to Cloverleaf from an application

  • Creator
    Topic
  • #49559
    Mark Brown
    Participant

    I’m experiencing a problem that makes no sense to me.  I have a program I’ve written that I’m wanting to send HL7 formatted text to the interface engine.  I have done the before without any problems.  

    The application successfully connects to the engine.  But when I send the data, the thread doesn’t show it received anything and my program just sits waiting for an ACK.  I ramped up the engine output and see that it is receiving the message.  At first I saw I was getting a read error and discovered an extra set of 0xD 0x1C at the tail of the message.  I removed those and now I don’t get any error that I can see, but it still isn’t receving the message.  It’s not even NAKing it.

    I’ll tack some of the engine output at the end although I can’t see much that helps me.  I’m excluding the message itself since it has patient data.

    Any ideas?

    Code:

    [pti :sche:DBUG/2:       ibtest] Thread 3 has been enabled
    [pti :sche:INFO/1:       ibtest] Thread has 1 ready events.
    [pti :even:DBUG/0:       ibtest] Processing SOCKET (PDL server) event 0x00AE1BD8
    [pti :even:DBUG/1:       ibtest] Calling cb 0x41e54c
    [pdl :read:DBUG/2:       ibtest] Events: E 0, R 8, W 0
    [pdl :PDL :DBUG/0:       ibtest] read 680 bytes
    [pdl :PDL :DBUG/0:       ibtest] input buffer accepted 680 bytes, now 680
    [pdl :PDL :DBUG/0:       ibtest]  0b 4d 53 48  7c 5e 7e 5c  |.MSH|^~|
    [pdl :PDL :DBUG/0:       ibtest]  26 7c 49 44  58 72 61 64  |&|IDXrad|
    [pdl :PDL :DBUG/0:       ibtest]  7c 30 30 31  7c 48 49 53  ||001|HIS|
    [pdl :PDL :DBUG/0:       ibtest]  7c 30 30 31  7c 32 30 30  ||001|200|
    [pdl :PDL :DBUG/0:       ibtest]  37 31 30 30  31 30 30 34  |71001004|
    [pdl :PDL :DBUG/0:       ibtest]  34 34 30 7c  7c 4f 52 4d  |440||ORM|
    [pdl :PDL :DBUG/0:       ibtest]  5e 4f 30 31  7c 31 31 35  |^O01|115|
    [pdl :PDL :DBUG/0:       ibtest]  37 39 36 39  30 7c 50 7c  |79690|P||
    [pdl :PDL :DBUG/0:       ibtest]  32 2e 32 0d  50 49 44 7c  |2.2.PID||

    [pdl :PDL :DBUG/0:       ibtest]  30 30 34 35  30 30 0d 1c  |004500..|
    [pdl :PDL :DBUG/0:       ibtest] IDLE and 680 bytes but no error: starting READ
    [pdl :PDL :DBUG/2:       ibtest] PDL changed states: old 0, new 1
    [pdl :PDL :DBUG/0:       ibtest] Calling Tcl procedure: hci_pd.read
    [pdl :PDL :DBUG/0:       ibtest] with args: {}
    [pdl :PDL :DBUG/0:       ibtest] Tcl procedure hci_pd.read returns ‘RECEIVE’
    [pdl :PDL :DBUG/0:       ibtest] trying to match phrase: basic-msg
    [pdl :PDL :DBUG/1:       ibtest] PDL setting timeout in 15.00 seconds
    [diag:leak:DBUG/0:       ibtest] diag ev alloc 0x00AD4BA8
    [diag:leak:DBUG/0:       ibtest] diag dqe alloc 0x00AD3B80
    [pti :even:DBUG/0:       ibtest] Registering TIMER () event 0x00AD4BA8 for tid 3
    [pti :even:DBUG/0:       ibtest] Registering TIMER event for tid 3
    [pdl :PDL :DBUG/0:       ibtest] READ operation in progress (680 bytes buffered still, 680 before)
    [pti :sche:INFO/1:       ibtest] Thread has 0 ready events left.
    [pti :sche:DBUG/2:       ibtest] Thread 3 has been enabled
    [pti :sche:INFO/1:       ibtest] Thread has 1 ready events.
    [pti :even:DBUG/0:       ibtest] Processing ACTIVE_TIMER (
    ) event 0x00AE0B50
    [pti :even:DBUG/1:       ibtest] Calling cb 0x5225b3
    [msi :msi :DBUG/1:       ibtest] msiExportStats: export for thread: ibtest
    [pti :even:DBUG/0:       ibtest] Unregistering ACTIVE_TIMER (
    ) event 0x00AE0B50 for tid 3
    [pti :even:DBUG/0:       ibtest] evUnregister ACTIVE_TIMER event 0xAE0B50 for tid 3
    [diag:leak:DBUG/0:       ibtest] diag timeval alloc 0x00AD4208
    [diag:leak:DBUG/0:       ibtest] diag dqe alloc 0x00AEB458
    [pti :even:DBUG/0:       ibtest] Registering ACTIVE_TIMER (
    ) event 0x00AE0B50 for tid 3
    [pti :even:DBUG/0:       ibtest] Registering ACTIVE_TIMER event for tid 3
    [diag:leak:DBUG/0:       ibtest] diag timeval free  0x00AD4208
    [pti :sche:INFO/1:       ibtest] Thread has 0 ready events left.
    [pti :sche:INFO/2:       ibtest] Performing apply callback for thread 3
    [msi :msi :DBUG/1:       ibtest] msiExportStats: export for thread: ibtest
    [pti :sche:DBUG/2:       ibtest] Thread 3 has been enabled
    [pti :sche:INFO/1:       ibtest] Thread has 1 ready events.
    [pti :even:DBUG/0:       ibtest] Processing TIMER (
    ) event 0x00AD4BA8
    [pti :even:DBUG/1:       ibtest] Calling cb 0x41fb71
    [pdl :PDL :DBUG/0:       ibtest] multi_phrase_2: status = timeout
    [pdl :PDL :DBUG/0:       ibtest] Calling Tcl procedure: read.timeout
    [pdl :PDL :DBUG/0:       ibtest] with args: {{status timeout}}
    [pdl :PDL :DBUG/0:       ibtest] pdiIgnoreInput: chop to 1, bolen 0
    [pdl :PDL :DBUG/0:       ibtest] pdiIgnoreInput: after memmove: 0 + 679
    [pdl :PDL :DBUG/0:       ibtest] pdiIgnoreInput: chop to 4294967295, bolen 0
    [pdl :PDL :DBUG/0:       ibtest] pdiIgnoreInput: after clear: 0 + 0
    [pdl :PDL :DBUG/0:       ibtest] Tcl procedure read.timeout returns ‘0’
    [pdl :PDL :DBUG/2:       ibtest] PDL changed states: old 1, new 0
    [pti :even:DBUG/0:       ibtest] Unregistering TIMER (
    ) event 0x00AD4BA8 for tid 3
    [pti :even:DBUG/0:       ibtest] evUnregister TIMER event 0xAD4BA8 for tid 3
    [diag:leak:DBUG/0:       ibtest] diag ev free  0x00AD4BA8
    [pti :sche:INFO/1:       ibtest] Thread has 0 ready events left.
    [pti :sche:DBUG/2:       ibtest] Thread 3 has been enabled
    [pti :sche:INFO/1:       ibtest] Thread has 1 ready events.
    [pti :even:DBUG/0:       ibtest] Processing ACTIVE_TIMER (
    ) event 0x00AE0B50
    [pti :even:DBUG/1:       ibtest] Calling cb 0x5225b3
    [msi :msi :DBUG/1:       ibtest] msiExportStats: export for thread: ibtest
    [pti :even:DBUG/0:       ibtest] Unregistering ACTIVE_TIMER (
    ) event 0x00AE0B50 for tid 3
    [pti :even:DBUG/0:       ibtest] evUnregister ACTIVE_TIMER event 0xAE0B50 for tid 3
    [diag:leak:DBUG/0:       ibtest] diag timeval alloc 0x00AD4208
    [diag:leak:DBUG/0:       ibtest] diag dqe alloc 0x00AEB458
    [pti :even:DBUG/0:       ibtest] Registering ACTIVE_TIMER (
    ) event 0x00AE0B50 for tid 3
    [pti :even:DBUG/0:       ibtest] Registering ACTIVE_TIMER event for tid 3
    [diag:leak:DBUG/0:       ibtest] diag timeval free  0x00AD4208
    [pti :sche:INFO/1:       ibtest] Thread has 0 ready events left.
    [pti :sche:INFO/2:       ibtest] Performing apply callback for thread 3
    [msi :msi :DBUG/1:       ibtest] msiExportStats: export for thread: ibtest
    Engine idle — 10/03/2007 11:04:36

Viewing 1 reply thread
  • Author
    Replies
    • #62473
      Greg Eriksen
      Participant

      In the normal HL7 mlp envelope, the very first character of the entire message string should be a hex 0B, and the final two characters should be a hex 1C and hex 0D.  In your engine output it looks like the message ends with a 1C, so perhaps when you snipped off the duplication at the end, you took a bit too much?

    • #62474
      Russ Ross
      Participant

      After taking a quick look at the cloverleaf log file with EO turned up it seems to me the inbound thread did recieve the HL7 message but as noted by Greg it looks like this

      when it should look like this

      You say this used to work and that could very well be true because the older mlp_tcp.pdl was partially broken in that it only looked for .

      The reason I’m aware of this is because I have a HL7 interface that sometimes contains the character in the HL7 message and the older mlp_tcp.pdl choked on them.

      The newer mlp_tcp.pdl now correctly looks for the 2 character sequence.

      I’m also assuming that you are calling a TPS inbound data proc to generate the ACK reply back to the sending system.

      Russ Ross
      RussRoss318@gmail.com

Viewing 1 reply thread
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10