Originally posted by Brandon Grudt
What is the best practice for batching a thread? Here's my situation:
We have a program that accepts real time ADT messaging for Cardiovascular Rehab. Our patients are recurring, and have new encounter numbers each month. The patients are registered into a pre-reg status halfway through the month, with that ADT message containing the new encounter number. The problem with passing those messages is that they will overwrite the encounter nunmber halfway through the month. The patients are only pushed with an admit status AFTER their first visit of the new month. I have no way to change the clinical workflow, so I am stuck needing to grab the pre-reg messages, queue them, then spit them out as a batch on the first of every month.
Is anyone out there currently doing this? What is the best way to perform this? My only solution would be to loop a tcl proc and reset a date variable on every loop, passing only if the month is greater than the month of the original message. This is not best practice, so I'd like to see if there is any better solution.
Thanks in advance.