assign each word a part of speech

A mistake at a pharmacy sent to the hospital.

A - adjective

mistake - noun
at - preposition
a - adjective
pharmacy - noun
sent - verb
to - preposition
the - adjective
hospital - noun

By the way, that is not a complete sentence.