SELECT *
FROM BPS_Patients
WHERE StatusText = 'Active'
AND EXISTS (
       SELECT VISITS.INTERNALID , COUNT(*)
       FROM VISITS
              INNER JOIN VISITTYPE ON VISITTYPE.VISITCODE = VISITS.VISITCODE
       WHERE VISITS.RECORDSTATUS = 1
              AND VISITS.INTERNALID = BPS_Patients.InternalID
              AND VISITS.VISITDATE >= DATEADD(MONTH,-1,GETDATE()) -- Last 1 month. Change the number here. 
              AND VISITTYPE.VisitType in ('Telephone')            -- Telephone Visit Type
       GROUP BY VISITS.INTERNALID HAVING COUNT(*) >= 1            -- Having 1 or more visits
)
ORDER BY SURNAME,FIRSTNAME

-- Search for patients with a Telephone Consultation in the last n months