Praise be to Allah.
Inserting a catheter into the patient’s body to drain urine and waste from his stomach does not invalidate the fast, because that does not come under the heading of food or drink, and it is not akin to food or drink.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
The Lawgiver has only forbidden us to eat or drink – i.e., during the fast – so whatever takes the place of food or drink comes under the same ruling as food and drink, and whatever is not like that and does not come under the heading of food or drink in terms of wording or meaning, the ruling on food and drink cannot be applied to it.
End quote from Majmoo‘ Fataawa wa Rasaa’il al-‘Uthaymeen (19/205)
He also said:
If a person inserts a scope into the stomach until it reaches it, then that breaks the fast – i.e., according to our madhhab.
But the correct view is that it does not break the fast, unless there is some oil or the like on this scope that reaches the stomach by means of this scope, in which case it does break the fast, and it is not permissible to use it during an obligatory fast except in cases of necessity.
If a person had an opening in his stomach, and something entered his stomach through this opening, then according to our madhhab his fast would be broken thereby, just as it would be broken by a deep stab wound.
But the correct view is that the fast is not broken thereby, unless this opening is made in place of the mouth, so that food and drink enter through it, in cases of oesophageal blockage, ulcers and the like, in which case whatever enters through it breaks the fast, just as if it entered through the mouth. This is the view favoured by Shaykh al-Islam Ibn Taymiyah. End quote from ash-Sharh al-Mumti‘ (6/370).
Shaykh Sulaymaan al-Maajid (may Allah preserve him) said:
Catheterisation means inserting a tube into the urethra for various medical purposes. It does not break the fast of one who is fasting, because it is not food or drink, and does not come under the heading of other things that break the fast. End quote.
And Allah knows best.