It seems to be in need of some commas. Jin , thinking of medical treatments , decides to use donuts from the present day as treatment for beriberi. "thinking of medical treatments" is a participle phrase modifying "Jin".
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.