Modern Health interview question

How would clean up this code?