Contract law rests on the centuries-old concept of “mutual assent,” in which both sides agree to a price before services are rendered. But patients rarely know upfront how much their medical care will cost.