The invention provides a body-worn monitor that measures a patient's vital signs (e.g. blood pressure, SpO2, heart rate, respiratory rate, and temperature) while simultaneously characterizing their activity state (e.g. resting, walking, convulsing, falling). The body-worn monitor processes this information to minimize corruption of the vital signs by motion-related artifacts. A software framework generates alarms/alerts based on threshold values that are either preset or determined in real time. The framework additionally includes a series of ‘;heuristic’; rules that take the patient's activity state and motion into account, and process the vital signs accordingly. These rules, for example, indicate that a walking patient is likely breathing and has a regular heart rate, even if their motion-corrupted vital signs suggest otherwise.