Alter query to include records with null plancode