Privatising hospitals could be outlawed under changes being considered after the death of a toddler whose parents waited for hours in an emergency room.