Hi again... couldn't quite find the answer for what I was looking for so hopefully my explaination will help.
My goal is to find unique records of patients who have a 6 month interval of treatment within the database (we want to find people with 6 months weight loss and then see if it is maintained over the subsequent time in the clinic). It doesn't matter when the interval starts and the the most inclusive set of patients under the 6 month criteria would be patients whose difference between the first visit and most recent visit total > 180 days.
I have been able to find these patients relatively easily by using =IF(A3=A2,C3-C2,0) where A column contains the unique patient ID and the C column contains the dates of the visits. However, this only gives me the list of patients who have at least a 6 month interval of time from their first visit to their most recent.
Is there a formula to calculate the days elapsed since the initial visit for each unique patient's record? With this, I can figure out which records are associated to the interval and then find the records for maintenance.
Please see example spreadsheet: example.xlsx
The text in RED is what the output should look like.
PID_ENCID is the unique patientID and EncounterID (1735.04) would signify patient 1735's 4th visit.
I would like to know if there is a formula that would calculate the difference in days against each patient's initial visit. Thus, for patient 1735, the formula would calculate the difference between records 1735.02 - 1735.01, then 1735.03 - 1735.01, and finally 1735.04 - 1735.01.
Let me know if I can provide any more information. I have a feeling this is going to deal with sumproduct formulas.
Bookmarks