CBORD Problems

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf CBORD Problems

  • Creator
    Topic
  • #48818
    Mark Brown
    Participant

      We’re upgrading our old DOS-based CBORD system to their latest. Their HL7 spec is the same between those versions with one notable exception. They’re now strict about having x0d between segments and now it’s causing us problems.  

      CBORD orders can come in multiple messages. The engine writes the first message to a file and then when the message with the completion code arrives, the file is read and the messages are assembled into one message.  This has been working fine since long before I became “the interface guy.”

      Now, during testing the new server, while ADTs pass through the system just fine, orders are being NAK’d by CBORD.  The orders now have x0a between segments instead of x0d.  I can only guess that being retrieved from a file is causing this character to change.

      I thought maybe a tcl proc could change all the x0a to x0d and so I wrote this (I’m just showing a fragment here) proc would work.  I’m not much of a tcl programmer, but I thought it would work.  It doesn’t.

             run {

                 keylget args MSGID mh                 ;# Fetch the MSGID

                 set msg [msgget $mh]                  ;# Get the Message Handle

      echo <<<< Converting all hex A to hex D >>>>

      regsub -all {xa} $msg xd msg

                 msgset $mh $msg

                 lappend dispList “CONTINUE $mh”

              }

      Any ideas on where I’m going wrong?  Is there a better way to solve this problem?

      Thanks for any help!

    Viewing 1 reply thread
    • Author
      Replies
      • #59797
        Mike Grieger
        Participant

          x0A   to   x0D   – had it right in the explanation, wrong in the code

        • #59798
          Mark Brown
          Participant

            Thanks!  That fixed it.  It’s funny how you can stare at something and never see it.

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