How to calculate medical expenses for NJ State Income Tax

a

I am looking at NJ tax return filed for 2016 and I do not understand how Turbo Tax arrived at the amount allowed for medical expenses based on the instructions on the New Jersey tax website.