Pergunta de entrevista da empresa Flatiron Health

Parsing question - was difficult for me since I approached the problem with the incorrect approach