I maybe wrong, but shouldn't you have some kind of date limitation in your selects, unless you change the agency for a patient or the balance goes to zero, it looks like from your selection you're going to keep getting the same patients plus new ones until the balance is zero or the agency value changes, maybe you should use claim date, or if these are bad debt accounts, the bad debt date to limit the search for patients. You might want to check and see if there's any kind of date updated when the account is assigned to an agency. Here the agency is assigned on the same date as the claim is produced, so we simply test for claim date, and from searching the DPM for BAR.PAT there doesn't appear to be any dates assigned to agency, but the experts at Meditech might know if one exists that's just not obvious.
Dennis Peterson St. Luke's Hospital IT Department Duluth, MN 55805 (218) 249-5517 ________________________________ From: Gauntt, Brandon K. [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 20, 2007 3:49 PM To: [email protected]; [EMAIL PROTECTED] Subject: BAR report question I have a report that I wrote for a bad debt collection agency that should be straightforward to download weekly for one agency. The problem I have is that the same patient prints over and over again. I have attached the source code hoping that I am just missing something very simple. I am hoping that someone can help point out my mistake. Any help would be appreciated. Thanks, Brandon Gauntt Director - Information Services Hopkins County Memorial Hospital 903-439-4054 Office www.hcmh.com <http://www.hcmh.com/> This e-mail, facsimile, or letter and any files or attachments transmitted with it contains information that is confidential and privileged. This information is intended only for the use of the individual(s) and entity(ies) to whom it is addressed. If you are the intended recipient, further disclosures are prohibited without proper authorization. If you are not the intended recipient, any disclosure, copying, printing, or use of this information is strictly prohibited and possibly a violation of federal or state law and regulations. If you have received this information in error, please notify Baylor Health Care System immediately at 1-866-402-1661 or via e-mail at [EMAIL PROTECTED] Baylor Health Care System, its subsidiaries, and affiliates hereby claim all applicable privileges related to this information.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= To subscribe or unsubscribe to the meditech-l, visit MTUsers.COM. To check the status of the meditech-l, visit MTUsers.NET. For help, email [EMAIL PROTECTED] ______________________________________ meditech-l mailing list [email protected] http://mtusers.com/mailman/listinfo/meditech-l
