Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for 72 hr return visits in ER

Status
Not open for further replies.

ERRN

Technical User
Sep 30, 2003
1
CA
I need to find a formula that finds all the patients in a month that come for a return visit within a 72 hrs period. I planned to use 2 fields from one table.
{PP_Present.Arrival_date}
{PP_Present.Patient_identifier}(the patient's unique identifier)
I used the Select expert to limit the date range (1 month), grouped the presentations by the Patient identifier and counted the number of presentations within each group (i.e. how often did a certain patient show up in one month). I then conditionally suppressed all those groups with only 1 or less presentations in the count summary, i.e. only those patients with more than 1 presentation are visible. This seems very clumsy because it is done through formatting rather than selection and I still have not figured out how to eliminate those re-presentations that did not occur within 72 hrs. Any ideas how to do this ? Thanks



 
From within Crystal this might require using the next() or previous functions, but doesn't resolve the issue of not doing it in the select.

In the select you might do a select min(date) and select max(date), and eliminate those with only one visit by using a having count() > 1

Now that you have the 2 fields, you can create a View or use the record selection formula at the group level where max(date)-min(date) < 4

That's one theory anyway, and without specific information (Crystal version, aree you able to create Views/SP's, etc.)I can't really supply a specific answer.

Hopefully you can figure it out from here.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top