Immigration crackdown threatens NHS workforce, data show