The prewrite proc

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf The prewrite proc

  • Creator
    Topic
  • #51026
    Graham Hartley
    Participant

      Hi,

      I am fairly new to CloverLeaf.

      Does anybody know why you would use a prewrite proc instead of calling a proc from TPS inbound/outbound data?  I cant think of any use for such a proc.  Any examples of use would be gratefully received.  What can you do with the message in the prewrite that you can’t do with messages in TPS inbound/outbound data?

      Thanks in advance for your help

      Cheers,

      Graham

    Viewing 3 reply threads
    • Author
      Replies
      • #68488
        Nate Kruse
        Participant

          When I’m using both a Tcl script and an Xlate, I’ll stick the Tcl script in the Pre Proc or in the TPS Inbound Data.

          An example is that I have an FRL file with multiple lines per patient (one line for each insurance carrier).  The Tcl script concatenates all of the lines for a single patient into one line.  The Xlate then changes that data into HL7 format.

        • #68489
          Bob Richardson
          Participant

            Greetings,

            We have used the Outbound PreWrite Upoc to process State 11 messages that have pended due to the remote receiver disconnecting (for example).  This upoc allows access to State 11 messages that cannot be grabbed at TPS Outbound time (messages move to State 11 after this upoc).   Historically, the PreWrite was used by Cloverleaf developers in debugging their code (that is the Cloverleaf vendor) according to the urban legends that I am aware of for stuff that lingers in the integrator.

            Another example:  a remote application started to complain about bad data being sent from an interface and asked us to scrub the queue before sending any more data.  Their side had hung and they were in the process of restarting their side.  During this hang, an impressive volume of messages had pended in State 11 in Cloverleaf.  So we plugged in a scrubber proc in the PreWrite upoc to clean the queue as it drained off to the remote.

            I too would be interested in any other examples of using the PreWrite upoc too.

            Thanks.

          • #68490
            Michael Hertel
            Participant

              The Prewrite proc is VERY useful for emergencies.

              It is most useful to us for handling special exception processing that in the past had to be done by deleting the pending outbound messages, tweaking the outbound proc and resending them.

              It is not been useful for day to day ongoing use.

              It has saved our rear ends.

            • #68491
              Tom Rioux
              Participant

                One example I have used in the past is this:

                You have one inbound ADT thread sending to multiple outbound threads.  Say you get A28 message that are sent to all of the downstream systems but one.  For that one system you want to block that message.   You could put a filter on the outbound TPS stack but why xlate the message when you don’t have to?  In this case, I like to place the filter as a pre-xlate proc.  I just find it to be more efficient.  (Of course, this is presuming you are routing by individual message types)

                Just my .02

                Thanks….Tom Rioux

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