Using temperature sensor to turn on pump milliseconds after temperature spike(help elderly woman)

Having some light knowledge in this subject, but too less....
Using a catheter the tube usually goes into a bag collecting the urine. At intervals the bag is checked and emptied or changed.
The use of a pump is new to me.
Can You explain that "solution"?