Protocol: database-inbound Configuration

Clovertech Forums Cloverleaf Protocol: database-inbound Configuration

  • Creator
    Topic
  • #118561
    Sandy McQuay
    Participant

      RHEL 7, CIS 6.2.2

      I’m trying to build in a “delay” for an interface to allow time for an outside MSSQL to be updated so I can query it for my translation.

      I created a SQLite db and a table with 3 columns:

      1. hl7Message (BLOB) where I store the <whole message>
      2. msgDate (DATETIME) where I store the current system date/time
      3. processed (TEXT) where I insert N

      Next I created a thread with the database-outbound protocol  and inserted the required data in the fields from the source system using an Xlate.  This seems to work as expected.

      In a separate process, I created a thread with the database-inbound protocol.  My expectation is to query the database where processed = ‘N’ and pull the hl7Message column, which should be the entire HL7 message.  I’ll then translate it, including the query to the outside MSSQL database, and send it to the downstream system.  Then set the processed column to Y (or eventually delete the entire row, but that’s for later).

      The connection will come up after the 30 second Scan Interval, but it just isn’t reading the database.  I’ll attach screen shots of the protocol configuration.

      I tried several different options with the configuration:

      • On the Database Inbound Protocol Properties
        • Table Schema:  With and without selecting
        • Scope:  Both options

      I am able to query the database outside of the engine.

      Any suggestions are much appreciated.

      Attachments:
      You must be logged in to view attached files.
    Viewing 5 reply threads
    • Author
      Replies
      • #118565
        Jay Hammond
        Participant

          In the DB_Config screenshot, do you not need to have the Table Schema field filled in with your Schema?

        • #118566
          Sandy McQuay
          Participant

            I tried both selecting and not selecting the Table Schema in the config.  Still doesn’t read the db.

            Thanks!

          • #118571
            Sandy McQuay
            Participant

              I figured out my problem.  I was so focused on the protocol set up, that I failed to look at the other tabs, including the fact that Outbound Only was checked on Inbound tab.

              I made a copy of the aforementioned outbound-database for the database-inbound thread.  Guess I only looked at the protocol and routing information.

               

            • #118573
              Jeff Dawson
              Participant

                Hi Sandy,

                I’ve never tried out protocol: database-outbound.  I’m wondering how you accomplished this step of saving the full HL7 message to a column?

                “I created a SQLite db and a table with 3 columns:

                1. hl7Message (BLOB) where I store the <whole message>”

                 

                I setup a similar sqlite table and created an xlate to db schema, attached the Xlate,  I thought the protcol would key off <whole_message> flag and translate late it to the actual full message but it seems it’s behaving like how I expect a constant would work.

                Executed SQL statement: INSERT INTO messages ( msgDT, msgID, msg ) VALUES ( 20200908124430, 33192, <whole_message> )

                I also attached my insert statement, running the testing tool via database protocol I am able to insert to the DB its the full message piece that’s throwing me for a loop.

                 

                Attachments:
                You must be logged in to view attached files.
              • #118577
                Sandy McQuay
                Participant

                  Hi Jeff,

                  My xlate is configured the same way.  Be sure to check “Store original message in metadata for downstream processing” on the route from the source interface, then on the database-outbound protocol configuration, check “Use cached pre-xlate message as whole message.”

                  I’ll attach some screen shots.

                  Attachments:
                  You must be logged in to view attached files.
                • #118581
                  Jeff Dawson
                  Participant

                    Thank you!  I was looking at the route detail level for that and didn’t even think to check at the actual route level.

                Viewing 5 reply threads
                • You must be logged in to reply to this topic.