Ratchet is the Autobot Medic in Transformers: Dark of the Moon.
Ratchet later witnessed the resurrection of Sentinel Prime - and stayed at the NEST Headquarters with Wheeljack. It is unknown if he witnessed the death of Ironhide, and the betrayal of Sentinel Prime]].
When he and the other Autobots were expelled from Earth alongside the other Autobots, and left in the Xantium - which was destroyed by Starscream. Luckily, he and the other Autobots survived and made it to Chicago. There, he participated in the final battle.
He later appeared alongside Bumblebee, Sideswipe, Wheeljack and Mirage - who were all being held hostage by Soundwave, Barricade and several Decepticon Protoforms. Atfer witnessing the death of Wheeljack - Ratchet and the others were saved when Wheelie and Brains hiijacked and crash-landed a massive Decepticon Ship. Ratchet fought back at the Decepticons - killing several.
Ratchet survived the Chicago battle - and made his final, yet most notable appearence at the very end of the film when he said to Bumblebee "You fought bravely." Ratchet stayed on Earth along with Optimus and the other Autobots, and is one of the eight Autobots confirmed to have survived the film (the others being Optimus, Bumblebee, Sideswipe, Mirage and The Wreckers).