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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activity earlier than a specific time limit

Status
Not open for further replies.

tjjames

IS-IT--Management
Aug 26, 2021
3
GB
Hi All,

I'm trying to use a datetime field that shows the last time a patient record was updated to determine which patient records have been inactive for 90 days. I have {Appointments.AuditUpdateDate} which contains the datetimes for each occasion a record was edited in a table which is linked to {Patient.PatientNumber} in a different table to provide patient information.

In this example I want to run a report that will return patient 123 because they only have activity that happened longer than 90 days ago, but I don't want to see 987 even though they had activity longer ago than 90 days because they also have recent activity.

Patient Number | Audit Date/Time
----------------------------
123 | 01/01/2121 08:00
123 | 01/02/2021 08:36
987 | 01/02/2021 14:00
987 | 08/19/2021 12:41
987 | 08/20/2021 13:21

I'm at a complete loss how to achieve this, any ideas? I'm using CR version 14.1.12.2983 connected via ODBC. I don't know the database type, it's managed by a third party who set up CR for me.

Thanks in advance!

 
I would do it this way.
1. Create a group on Patient Number;
2. Enter the following Group Selection formula (Report => Selection Formula => Group):

Code:
Maximum({Table.Audit Date Time}, {Table.Patient ID}) < CurrentDate - 90

Hope this helps
Pete
 
Perfect, that did the job nicely. Thank you very much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top