hi does anyone have or know of a way I can check previous months for unused new patient spots on schedule template? or at least do a new patient count?
anything would be helpful!
if you are using specific spot in the scheduling template, you should be able to create a report in Crystal report to specific spot id and if they have been used.
Something like this might work...it might need some tweaks, but should get you off to a good start...
SELECT DF.ListName, A.ApptStart AS TimeSlotStart, A.ApptStop AS TimeSlotEnd, A.Type AS ApptType
FROM AppointmentsAlloc A
INNER JOIN Schedule S ON A.ScheduleId = S.ScheduleId
INNER JOIN DoctorFacility DF ON S.DoctorResourceId = DF.DoctorFacilityId
LEFT OUTER JOIN
(
SELECT A.AppointmentsId, A.ApptStart, DF.ListName
FROM Appointments A
INNER JOIN DoctorFacility DF ON A.ResourceId = DF.DoctorFacilityId
WHERE CAST(ApptStart AS DATE) = '10/20/2016'
) APPTS ON A.ApptStart = APPTS.ApptStart AND DF.ListName = APPTS.ListName
WHERE CAST(A.ApptStart AS DATE) = CAST(GETDATE() AS DATE)
AND APPTS.AppointmentsId IS NULL