Deduno left Thursday's start against Kansas City after three innings because of soreness in his pitching shoulder. Ramirez fractured his left shin by fouling a ball off his leg in the fifth inning.
Hernandez is 3-1 with a 5.54 ERA in nine appearances, including seven starts, for the Twins this season.
Mastroianni missed 106 games with a stress reaction in his left ankle. He hit .333 in 11 games in Triple-A since finishing a rehab assignment.