Enable the boolprop cheat in the neighborhood view (boolprop testingcheatsenabled true) then enter your house, select the sick sim, drag his energy down low (but not all the way down) to make him want to go to bed. Whenever he regains energy, drag his energy back down. Do this until it says he is healthy again.
Now you can spawn the make me sick tester to prevent future illnesses. Do so by shift-clicking your sim, clicking "spawn", then clicking "make me sick tester". Once it has spawned, click it and select "make me immune". They can't get sick anymore!