Peace be upon you. According to Sayyid Sistani, if the remaining medicine has financial value, khums is due on it. As for Sayyid Khamenei, daily consumables like rice and oil must have khums paid on what remains at the end of your khums year, provided they were purchased from your khums profits. However, there is no khums on what you will consume within two or three days after the end of your khums year.