fileset-local reading a specific file extension

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf fileset-local reading a specific file extension

  • Creator
    Topic
  • #53408
    Henry Tsou
    Participant

      Hi,

      We are trying to read an inbound HL7 transaction that a card system creates.  It creates several files at a time but we just need the file with .hl7 extension.  Is this done by the inbound TPS?  Anyone has an example?

      thanks in advance.

      Henry

    Viewing 4 reply threads
    • Author
      Replies
      • #77589
        Jim Kosloskey
        Participant

          Henry,

          You would use the DirParse UPoC specified in the Fileset Protocol.

          Your proc will receive a list of the files located by the directory Parse and can modify the list then return it. Cloverleaf will only retrieve the files in your returned list.

          I have a suite of procs used for controlling the DirParse list as well as file Deletion.

          If you would like them as an example or to use as is email me and I will send them to you.

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

        • #77590
          Rick Pritchett
          Participant

            Jim,

            Could I get a copy of these scripts?  I am trying to set the file list so that I only process the file that was created for today only.

          • #77591
            Jim Kosloskey
            Participant

              Rick,

              Send me an email (my address is selectable on my signature).

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

            • #77592
              Robert Kersemakers
              Participant

                Also have a look at this sticky thread for examples.

                https://usspvlclovertch2.infor.com/viewtopic.php?t=7348

                Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

              • #77593
                Charlie Bursell
                Participant

                  Simple.  Your proc would look like:

                  set msg_list [msgget $mh]

                  set out_list [lsearch -all -inline $msg_list “*.hl7”]

                  msgset $mh $out_list

                  return “{CONTINUE $mh}”

                  or really succinct:

                  msgset $mh [lsearch -all -inline [msgget $mh] “*.hl7”]

                  return “{CONTINUE $mh}”

                  😀

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