I've had the opportunity to tour the medical facilities on several ships. Especially on the newer ships, the facilities are absolutely state-of-the-art care centers. They are equipped to diagnose and treat emergencies of all kinds, and to do many surgical procedures in an operating room setting.
Their purpose is not for ongoing care, but to treat emergencies so that passenger/patients can either resume their cruise or be stabilized enough to send off to a shore side hospital.
Having said that, I hope none of us ever has to take advantage of this terrific care!