A liquid medication is basically a regular normal edible syrup that they add a few milligrams of the medication to it. There is no reason that it should lose its status of food just because you had those few milligrams if you would take those milligrams of medication and bake it into a loaf of bread, would you be allowed to eat that loaf of bread on pesach?