fileset-local protocol processing

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf fileset-local protocol processing

  • Creator
    Topic
  • #55264
    Cathy Girard
    Participant

      Multiple files, each containing one HL7 ORU result messages will be placed in a local directory. Will each individual file be automatically continued, processed and deleted from the directory, or will a tcl proc be required?

    Viewing 3 reply threads
    • Author
      Replies
      • #84745
        Jim Kosloskey
        Participant

          Is Cloverleaf placing the files in the directory or picking them up?

          If picking them up then Fileset protocol will by default pick up every file in the named directory, provide each message in each file for further processing (Xlate, Raw Route, etc.), and delete each file when the last message is read from the file.

          If that is what you want, no Tcl should be necessary.

          If, on the other hand, you want to select only certain files from the directory and/or control what files get deleted you could have Tcl at the DirParse UPoC and the File Deletion UPoC.

          If Cloverleaf is placing the files then it would be the responsibility of the system processing those files to delete them.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #84746
          Cathy Girard
          Participant

            Thanks Jim. Our GoAnywhere FTP server will be retrieving the files from the vendor’s application and then placing them in a directory on the Cloverleaf server. There is no special handling required of these files within the directory, so it sounds like the fileset-local protocol with a ‘Single’ style specified, will handle each file as an individual message and send it on to the xlate as regular inbound HL7 messages.

          • #84747
            Charlie Bursell
            Participant

              What Jim says is true but if I can make a suggestion.

              It would not be a good idea to have your FTP server dump the files directly into the Fileset/Local directory which Cloverleaf will use to process the files.

              Since there is probably no file locking it is possible that Cloverleaf could start to process a file before it was completely written by the FTP server.

              Three Options

              Some FTP clients, like Cloverleaf, have the option to write the file to a temporary location and then, after success, move the file to a final location

              Have the FTP server write the files to a different directory.  Have a script that will periodically move files to Fileset/Local directory.  Move is an atomic operation and only the inode is affected if on the same file system.

              Write a DirParse UPoC as alluded to by Jim.  This proc would size the files in the directory and save in a global or namespace variable (Probably an array).  Only when the size is the same for two successive scans would you process the file.  A very common proc.  I have written many of them

              Good luck with it.

            • #84748
              Cathy Girard
              Participant

                Thanks so much for your insight Charlie. Those are three great options to select from.

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