MB3 163b: Types of Illnesses for Which You can Take Medications on Shabbos (328:3-4)

Violating Shabbos for internal injuries. Dental emergencies and toothaches on Shabbos.

Giving medicine to a sick person on Shabbos if it won't improve the condition.

Taking medicine to avoid becoming sick (e.g. asthma medication).