Nursing homes removed thousands of beds from New York as they struggle to meet staffing minimums required by law, leaving some residents stuck in hospitals or forced into homes far away from family.