An investigation found a number of hospitals skirt a state law.