The creature was trapped in a fully-equipped automated medical suite, which was clearly intended to keep a certain elderly man alive for as long as possible. In order to achieve that goal, it would need to be able to perform any sort of surgery - and probably, the most likely sort of surgery would be organ transplantation.
So, that means there must have been at least two other things in the room, besides fun-sized painkillers and a guys-only autodoc: blood (or some futuristic substitute), and replacement organs. Given the age of the intended patient, I wouldn't be surprised if there were muscle and bone grafts available as well. Some blood would have been readily available from the operating chair itself - since if a patient starts bleeding out you want to have a transfusion available immediately - and the organs would have been in cold storage somewhere nearby.
There was probably enough biological material available in that room to rebuild a person three or four times over if necessary, and all the creature would have had to do is bang open walls until it found the stuff.