Forum Discussion

TateForgey's avatar
TateForgey
Qrew Assistant Captain
3 years ago

Record with most recent date in one table for each record in another table with the same parent

I've got a tricky request I'm hoping folks can help me with.

I have a patients table. Related to that I have a patient tests table with test dates.  There will be new data containing patient treatments that has a date and a type. I was naturally going to create a table for that and relate it to the patient table. The request is that for every separate test a patient has I identify the most recent treatment and calculate the number of days that occurred before the test. 

I had some "blunt force" ideas about how to get at this using summary fields on the patient, but I feel like there should be a more elegant way. Thanks!


------------------------------
Tate Forgey
------------------------------
No RepliesBe the first to reply