Forum Discussion

andersona1983's avatar
6 years ago

Overlapping Appoints of a Specific Type

Hello,

 

I am trying to find overlapping appointments of a certain type, on a date, and producing a report of all those appointments that match this.

 

My data comes in the following format:

 

Client NameAppointment Start DatetimeAppointment End DatetimeService CodeStaff Name
DANE, JOE7/28/2020 10:007/28/2020 11:00H0032CLINICAL RBT 3
DANE, JOE7/30/2020 13:007/30/2020 13:30H0004CLINICAL LEAD C
DANE, JOE7/30/2020 13:007/30/2020 14:00H0032CLINICAL RBT 3
DOE, JANE7/28/2020 8:007/28/2020 10:3097153CLINICAL RBT 2
DOE, JANE7/28/2020 10:307/28/2020 12:0097153CLINICAL RBT 2
DOE, JANE7/28/2020 12:007/28/2020 14:0097153CLINICAL RBT 2
DOE, JANE7/28/2020 14:007/28/2020 15:0097153CLINICAL LEAD A
DOE, JANE7/28/2020 14:007/28/2020 17:0097155CLINICAL LEAD B
DOE, JANE7/28/2020 15:007/28/2020 16:0097153CLINICAL RBT 1
DOE, JOHN7/27/2020 8:007/27/2020 11:00H2019CLINICAL RBT 3
DOE, JOHN7/27/2020 9:007/27/2020 10:00H0032CLINICAL LEAD A
DOE, JOHN7/27/2020 9:007/27/2020 11:00H0032CLINICAL LEAD B
DOE, JOHN7/27/2020 11:007/27/2020 13:30H2019CLINICAL RBT 2
DOE, JOHN7/27/2020 13:307/27/2020 15:00H2019CLINICAL RBT 1
DOE, JOHN7/27/2020 15:007/27/2020 16:00H2019CLINICAL RBT 1
DOE, JOHN7/27/2020 16:007/27/2020 17:00H0004CLINICAL LEAD A
DOE, JOHN7/27/2020 16:007/27/2020 17:00H0032CLINICAL LEAD A
DOE, JOHN7/27/2020 16:007/27/2020 17:00H2019CLINICAL RBT 1

 

CodeType
H0032Super
H0004Super HL
97153Direct
97155Super
H2019Super

 

If the code type matches, and the appointment is overlapping on a date, I need a flag to occur, and the item would be displayed in a report. Any assistance would be help, or to point me in a direction to start. 

2 Replies