Fixed bug to remove duplicate encounters in unionQRSHistory as well