Forum Discussion
Active appointments based on active patients
Hi there,
I have two tables, one table of patient appointments, and one table of patient Episodes, when a patient comes into care they are in an episode of care, and will have appointmets within this, So an example would be the below
appointments;
| Patient | appointment_ID | Appointment_Date | Appointment_Confirm |
| 1 | 1000 | 01/01/2020 | 01/01/2020 |
| 1 | 1001 | 01/02/2020 | 03/04/2020 |
| 2 | 2001 | 01/03/2020 | 01/03/2020 |
| 3 | 2050 | 01/03/2020 | null |
| 4 | 2075 | 01/03/2020 | 10/03/2020 |
episode
| Patient | episode_ID | Episode_Start | Episode_End |
| 1 | 10 | 01/01/2019 | 01/04/2020 |
| 1 | 9 | 01/02/2018 | 03/04/2018 |
| 2 | 21 | 01/03/2020 | 01/03/2020 |
| 3 | 25 | 01/02/2020 | 01/03/2020 |
| 4 | 275 | 01/03/2020 | 10/03/2020 |
thanks to help on this forum I've managed to calculate in the appointmnet table the number of unconfirmed appointments
at any given time, the problem I have now is that I want to include whether the patient was also in an active episode at the time...
so for example, if i was to look at 02/03/2020 patients 1 3 and 4 had not had a confirmed appointment, however patient 3 was not in an active episode, so the result from the calculation should only show as 2...
Hope this makes sense and any help would be appreciated, please not I can include the episode_ID in the appointments table if needed, it's just that some staff don't add the episode correctly
Many thanks
2 Replies
- amitchandak
Super User
mik618 , Seem like a similar problem Current employee in this blog
- mik618
Helper I
Hi amitchandak
THanks, I used this to look at appointments, and active episodes, I'm just not sure how to combine them so the calculation measures unconfirmed appointments, only in the time period where the patient was in an active episode
Thanks