Check for undefined patient code