There is a hotel just across the road from Heuston called the Aisling Hotel, tried to Yahoo it for you but cannot find a web link. That would only be about 5 min walk.
I've never stayed in it so can't recommend it, but it's only new so I'd say it's nice enough. Not sure what star rating it has. But it's very near to Heuston.
The Crowne Plaza hotel & Holiday Inn in Santry are the nearest hotels to Beaumont.
Both located in Santry woods. You can catch a 16a bus which passes by Beaumont House pub on the Old swords road.
Beaumont Hospital is less than 5 mins walk from there
There is also the Hilton Hotel at Clarehall on Malahide Road. Very short taxi ride.
There are some direct buses that services Beaumont hospital so maybe ring the hospital to see what route they pass by & pick a hotel accordingly.