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
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
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