@Manachinov I'm not aware of any other way to buy the medicine aside from what's mentioned below - not through a medicine cabinet (though that is a great idea!), and not through a toddler bookshelf. I have all packs.
Below is the information that @suzushka was referencing for you:
Many of their sicknesses can be cured with sleep. Other possible illness cures:
- Have your sim go to the library and order medicine on the computer. Stock up and take it home in your inventory.
- If you have Seasons have your sim go to a lot that is not off the grid and order medicine on their phone. On the phone go to Household > Purchase Gifts and look for the Medicine. Stock up and take it home in your inventory. [Tip from @MapleSimmer]
- If you have Outdoor Retreat you can become an herbalist. You could use the computer at the library to purchase Herbalist books (one, two & three). You can also get and grow herbalist plants.
- Shortcut: I have a lot of plants in the EA community gallery that I grew in my game, and most are above normal, some are 'perfect' - under #SheriGR. You can download & use them to make a garden, and I think all of the herbalist plants are there as well.
- Pets: You take pets to the vet clinic if they're sick, but sometimes a wellness treat will cure them. You can go to the vet clinic and purchase several wellness treats at the vending machine and keep them in your inventory to try first if the pet becomes ill.
There is some info here, but much would not help off the grid (like using the tea machine - but it does not say the in the label that the tea machine works off the grid, though): https://simscommunity.info/2015/04/04/the-sims-4-get-to-work-how-to-cure-your-sick-sim/