Wait/Delay in XLATE for SQL Lookup

Homepage Clovertech Forums Cloverleaf Wait/Delay in XLATE for SQL Lookup

  • Creator
    Topic
  • #120187
    Timothy O’Donnell
    Participant

    Good morning! Cloverleaf 20.1 user here. We have a handful of interfaces at our institution where we do live SQL DB lookups for messages in flight. It works well except in situations where there’s a delay by the end user in our EMR to get the necessary data written to the EMR DB. For example, creating a new patient where the Medical Record isn’t available right away but requires an automated registration function to run. So there could be a 30-60 second delay from the time the SIU message is received by Cloverleaf before the Medical Record data is available for that SQL query.

    We were using the sleep command until we ran into an issue so we want to move away from that completely. Is there any other way to implement a delay in the xlate to allow the SQL DB time to get the data it needs before the SQL query fires? I’ve looked on this forum and haven’t found anything promising aside from saving the outbound HL7 to a DB or file and processing the file based on date/time. If this is all that’s possible, we’ll try it but we’d love if there was a way just to include a delay in the xlate somehow without sleeping the process. Thanks in advance!

Viewing 2 reply threads
  • Author
    Replies
    • #120193
      Boris Perov
      Participant

      you could write the raw messages to file and then create a separate thread to pick up any files over 60 seconds old…

    • #120196
      Ab Lugtenburg
      Participant

      Hi i think you can look in the DTC thread , it is a little complicated but there is a webinair made by Rob Abbot. I’m not allowed to link the url here. Or look it up in the help file . In the help file there are also examples

       

       

       

    • #120197
      Todd Hamilton
      Participant

      Tim,

      I agree with Ab. A built-in sleep command for every message is, 99% of the time, NOT the way you want to go. I recommend taking an approach that DTC is designed to support. (You don’t have to use DTC, you can roll your own if you want). Solving the issue using a deterministic state machine model will serve you the best.
      If you decide a state machine model is what you want to do, I HIGHLY recommend diagramming out the flow and logic first BEFORE you write the first line of DTC code. When it comes to DTC, if you can’t solve the issue on paper first, it is nearly impossible to hack out a successful interface ( like we can with simple HL7 interfaces 🙂 ).

      Good Luck.

      todd.hamilton.omaha@gmail.com
      (402) 660-2787

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

Forum Statistics

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