fileset-local: Restricting Dir Parse to 1 File of Many???

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf fileset-local: Restricting Dir Parse to 1 File of Many???

  • Creator
    Topic
  • #52356
    Jennifer Hardesty
    Participant

      Happy March!

      I know I always come here with off-the-wall puzzles.  (You should really see the things I work out on my own or the ones that keep me awake at night. 😉 )  Anyway, here’s one that I’ve been thinking about for a couple of days and I do have an immediate (an future) use for it.

      I have a huge backlog to load, in this case all of the translations and any filtering have already been done and all that remains is to send the resulting HL7 messages to the vendor/application via TCP/IP connection.  The backlog has been broken down in to hundreds of messages per file, one file representing a day in the year.

      The problem I have run into is that fileset-local wants to grab all of the files during a Directory Parse and I would prefer that it grab one single file, process it, send all of that data to the vendor, and then once that is complete, pick up the next file and begin the whole thing over.  I’m not sure how to make this limitation.  I do not want to do it using Advanced Scheduling because that relies on time, which would be guesswork at it’s best.

      Has anyone done this?  Do you have a tcl script or somesuch you can share?

      Thanks in advance for any advice or thoughts or suggestions!

    Viewing 2 reply threads
    • Author
      Replies
      • #73894
        Jeff Anderson
        Participant

          Just an idea… But you could create a directory, say “staging” and put all of your files in it. Then move one of the files to the “inbound” directory of your process to get things started. Then create a TCL for the TPS Deletion that does something like:


          set fileToCopy [lindex 0 [eval ls -1t staging]]

          set evalCopy “$fileToCopy inbound”; eval exec $evalCopy


          Basically the idea is to move one file at a time into your inbound directory until the messages are exhasted. The mechanism is the TPS Deletion, as files are deleted, you send a new file in to be processed. You could also use the Send OK procs TPS, whatever makes the most sense for you.

        • #73895
          John Mercogliano
          Participant

            Jennifer,

            John Mercogliano
            Sentara Healthcare
            Hampton Roads, VA

          • #73896
            Jennifer Hardesty
            Participant

              I’m sorry I didn’t get back right away.  I ended up doing something manually for a temp backload, but John’s tcl code is much closer to what I have in mind for my longer term issues. 😉

              Thank you for the inspiration!

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