It is semi-amusing that Castro is going down the tubes because of Cuban medicine - that much-vaunted glory of the world.
Piecing together the details, it sounds like he had GI surgery for some intestinal ailment, whether cancer or diverticultis or whatever, but, for some idiot reason, they never gave him an ostomy.
Ostomies allow the guts to heal post surgery, and prevent surgical infection. They are not fun, but much preferable to unnecessary death.
When you cut out a length of gut, and just re-connect it immediately like a plumber, you are asking for big trouble. The doctors brought over from Spain might very well have suggested a new procedure to create an ostomy, but it might have been too late if everything is breaking down and he is leaking fecal matter into his belly. Like I care, in his case. Mind you, this is all speculation based on minimal news info.