new integrated implementation of PatientVisitCache to ensure visit/patient assignment is always in sync