This is more general than the patient class. I'd refactor it into a public helper.