Sandoval was hit on the back (left) foot by a pitch from Stephen Strasburg in the bottom of the third inning, but he stayed in the game for a couple of more innings.
"Pablo started to continue to get more tight and sore as the night went on after being hit by the pitch, so we got him out of there," said Red Sox manager John Farrell. "He got a scan here tonight and it shows no hairline [fracture] or any issues structurally. We'll check him in the morning, whether or not he's available. We'll determine it at that time."
Ramirez, who hadn't played the infield even in Spring Training this season, moved from left field to third base. It was Ramirez's first appearance at the hot corner since 2012. Shane Victorino was inserted into Sandoval's fifth spot in the batting order and went to right field. Daniel Nava moved from right to left.
Brock Holt, Boston's lone backup infielder, was already in the game at shortstop due to Xander Bogaerts sitting out with a sore right knee.
Ian Browne is a reporter for MLB.com. Read his blog, Brownie Points, and follow him on Twitter @IanMBrowne. This story was not subject to the approval of Major League Baseball or its clubs.