results messages into seperate folders by family doc

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf results messages into seperate folders by family doc

  • Creator
    Topic
  • #50809
    Rob Parnell
    Participant

      What I need to do is when I receive a oru message I need to put each oru into a directory for only that family doctor.  Not sure how to go about this.

      Ex

      I receive an oru for doctor smith,  I need to dump this somewhere in a folders specific for dr smith, another messages comes in for dr jones I need to copy this into dr jones folder

      I am running 5.3 on Aix

    Viewing 6 reply threads
    • Author
      Replies
      • #67603
        Charlie Bursell
        Participant

          Can be done quite easily with a UPoC drive or with Fileset/Local and a numFile proc.  With that proc you can change directory and/or filename on the fly

        • #67604
          John Mercogliano
          Participant

            Rob,

              I had to do something similiar but easier. I’ve attached the code to get you started. I only needed to change the file name but you will also need to change the directory which means you will need to update the OBDIR value as well as the OBFILE value that I have in my script.

              What I would do is create a lookup table that contains the doctor id with the directory I want to store there message. You will have to come up with a different way to name the files then I did as it looks like you want one file per message and my way would have multiple messages per day.

            Hope this gives you a running start.

            Good luck,

            John Mercogliano
            Sentara Healthcare
            Hampton Roads, VA

          • #67605
            Jim Kosloskey
            Participant

              If it were me, I would insist the folder be the doctor’s name.

              That way I don’t have to maintain an ever changing Table and the file is driven by the data.

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

            • #67606
              Rob Parnell
              Participant

                Is there a way to validate that the folder is created and if not create the folder

              • #67607
                Jim Kosloskey
                Participant

                  Rob,

                  In Tcl there is a file command as I recall and that coomand has an option that will let you check to see if a directory exists.

                  Also I believe the file command will let you create direcgtories.

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

                • #67608
                  Russ Ross
                  Participant

                    If you want to see an example of creating one file per outbound message look at my post of tps_fileset_outbound at URL:

                    <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=1663&&#8221; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=1663&amp;

                    Russ Ross
                    RussRoss318@gmail.com

                  • #67609
                    Rob Parnell
                    Participant

                      OK the file command worked perfect.  

                      Thanks for the help

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