Overview
MiTensión classifies blood pressure readings using the American Heart Association (AHA) guidelines. The classification system evaluates both systolic (“La Alta”) and diastolic (“La Baja”) values to determine the blood pressure state.Classification Levels
The app uses six distinct classification levels, each with its own color coding for quick visual identification:Low Blood Pressure
Hypotension (Baja)Systolic < 90 mmHg OR Diastolic < 60 mmHg
Normal
Normal RangeSystolic 90-119 mmHg AND Diastolic 60-79 mmHg
Elevated
Elevated (Elevada)Systolic 120-129 mmHg AND Diastolic < 80 mmHg
High Stage 1
Hypertension Stage 1 (Alta 1)Systolic 130-139 mmHg OR Diastolic 80-89 mmHg
High Stage 2
Hypertension Stage 2 (Alta 2)Systolic 140-179 mmHg OR Diastolic 90-119 mmHg
Hypertensive Crisis
Crisis HipertensivaSystolic > 180 mmHg OR Diastolic > 120 mmHg
Classification Logic
The classification algorithm evaluates readings in order of severity, from most critical to least:Step 1: Check for Hypertensive Crisis
Step 1: Check for Hypertensive Crisis
The most critical condition is checked first:
Step 2: Check for Hypertension Stage 2
Step 2: Check for Hypertension Stage 2
If not in crisis, check for Stage 2 hypertension:This uses the OR operator, meaning either value meeting the threshold qualifies.
Step 3: Check for Hypertension Stage 1
Step 3: Check for Hypertension Stage 1
Check for Stage 1 hypertension:
Step 4: Check for Elevated
Step 4: Check for Elevated
Elevated blood pressure requires BOTH conditions:
Note the AND operator: systolic must be elevated (≥120) AND diastolic must remain normal (<80).
Step 5: Check for Hypotension
Step 5: Check for Hypotension
Low blood pressure is checked:
Step 6: Default to Normal
Step 6: Default to Normal
If none of the above conditions are met, the reading is classified as normal:
Color Coding System
Each classification level has a specific color for visual identification throughout the app:| Classification | Color | Hex Value | Purpose |
|---|---|---|---|
| Baja (Low) | Blue | #0000FF | Indicates hypotension |
| Normal | Dark Green | #008000 | Healthy blood pressure |
| Elevada (Elevated) | Orange | #FFA500 | Warning sign |
| Alta 1 (Stage 1) | Red | #FF0000 | Moderate concern |
| Alta 2 (Stage 2) | Crimson | #DC143C | High concern |
| Crisis Hipertensiva | Dark Red | #8B0000 | Critical condition |
Implementation Reference
The classification system is implemented inEstadoTension.kt:
The classification function is located at
app/src/main/java/com/fxn/mitension/util/EstadoTension.kt:21Usage in the App
The classification system is used throughout MiTensión to:- Color-code calendar entries - Days are marked with colors corresponding to average readings
- Provide visual feedback - Immediate classification after entering measurements
- Display legend - Users can view the classification guide from the menu
- Track trends - Historical data shows patterns in blood pressure categories
Key Considerations
Classifications follow the American Heart Association (AHA) guidelines, as noted in the code comments.