added getDeviceAndTimeForPatient