Clinical calculator for anthropometric measurements used in health assessment, obesity screening, and chemotherapy dosing calculations.
Key Capabilities:
✅ Use this skill when:
❌ Do NOT use when:
Integration:
ehr-semantic-compressor (patient data extraction), automated-soap-note-generator (vital signs)drug-interaction-checker (dose calculation), medication-reconciliation (dosing verification)Calculate Body Mass Index with classification:
python
from scripts.calculator import BMIBSACalculator
calc = BMIBSACalculator()
# Calculate BMI
result = calc.calculate_bmi(
weight_kg=70,
height_cm=175,
age=45,
sex="male"
)
print(f"BMI: {result.bmi:.1f} kg/m²")
print(f"Category: {result.category}") # Normal weight
print(f"Ideal weight range: {result.ideal_weight_range}")
BMI Categories (WHO):
CategoryBMI RangeClinical SignificanceUnderweight< 18.5Malnutrition riskNormal18.5 - 24.9Healthy rangeOverweight25.0 - 29.9Increased riskObese I30.0 - 34.9High riskObese II35.0 - 39.9Very high riskObese III≥ 40.0Extremely high risk
Adjusted BMI:
Multiple formulas for different clinical scenarios:
python
# Calculate BSA using different formulas
bsa_results = calc.calculate_bsa(
weight_kg=70,
height_cm=175,
formulas=["dubois", "mosteller", "haycock", "gehan_george"]
)
for formula, bsa in bsa_results.items():
print(f"{formula}: {bsa:.2f} m²")
BSA Formulas:
FormulaEquationBest ForDuBois0.007184 × W^0.425 × H^0.725Adults (most common)Mosteller√(W × H / 3600)Adults (simplified)Haycock0.024265 × W^0.5378 × H^0.3964PediatricsGehan-George0.0235 × W^0.51456 × H^0.42246OncologyYu0.015925 × W^0.5 × H^0.5Asian populations
Apply BSA to medication dosing:
python
# Calculate chemotherapy dose
dose = calc.calculate_dose(
bsa=bsa_results["dubois"],
drug="carboplatin",
dose_per_m2=400, # mg/m²
max_dose=800 # mg cap
)
print(f"Calculated dose: {dose:.0f} mg")
print(f"BSA used: {bsa_results['dubois']:.2f} m²")
Common BSA-Based Doses:
Age-appropriate calculations for children:
python
pediatric = calc.pediatric_mode(
weight_kg=25,
height_cm=120,
age_years=8,
sex="female"
)
print(f"BMI-for-age percentile: {pediatric.bmi_percentile}%")
print(f"Weight status: {pediatric.weight_status}")
print(f"BSA (Haycock): {pediatric.bsa:.2f} m²")
Pediatric Considerations:
Scenario: Calculate carboplatin dose for cancer patient.
bash
# Calculate BSA and dose
python scripts/main.py \
--weight 70 \
--height 175 \
--drug carboplatin \
--target-auc 5 \
--creatinine-clearance 80 \
--output dose_calculation.txt
Output:
text
BSA (DuBois): 1.79 m²
Calvert Formula: Dose = Target AUC × (GFR + 25)
= 5 × (80 + 25)
= 525 mg
Maximum dose check: 525 mg ≤ 800 mg ✓
Recommended dose: 525 mg
Scenario: BMI assessment for weight management clinic.
python
# BMI with full assessment
assessment = calc.assess_bmi(
weight_kg=95,
height_cm=165,
age=52,
sex="female",
waist_cm=98
)
print(f"BMI: {assessment.bmi:.1f} (Obese Class II)")
print(f"Waist-to-height ratio: {assessment.whtr:.2f} (High risk)")
print(f"Comorbidity risk: {assessment.health_risk}")
print(f"Recommended: {assessment.recommendations}")
Scenario: Calculate child's BSA for medication dosing.
python
# Pediatric dosing
child = calc.pediatric_assessment(
weight_kg=20,
height_cm=110,
age_years=6,
sex="male"
)
print(f"BSA: {child.bsa:.2f} m² (Haycock formula)")
print(f"BMI percentile: {child.bmi_percentile}th")
print(f"Doxorubicin dose: {child.bsa * 60:.0f} mg")
Scenario: Quick BMI/BSA for admission vital signs.
bash
# Quick calculation
python scripts/main.py --weight 80 --height 180 --quick
# Output:
# BMI: 24.7 kg/m² (Normal)
# BSA: 2.00 m² (DuBois)
# Ideal weight: 65-80 kg
Comprehensive patient assessment:
python
from scripts.calculator import BMIBSACalculator
from scripts.reports import ClinicalReport
# Initialize
calc = BMIBSACalculator()
report = ClinicalReport()
# Patient data
patient = {
"weight_kg": 75,
"height_cm": 170,
"age": 55,
"sex": "female",
"waist_cm": 88
}
# Calculate all metrics
bmi = calc.calculate_bmi(**patient)
bsa = calc.calculate_bsa(**patient, formula="dubois")
assessment = calc.comprehensive_assessment(**patient)
# Generate report
report_data = {
"bmi": bmi,
"bsa": bsa,
"assessment": assessment,
"recommendations": assessment.recommendations
}
report.generate(report_data, output="patient_assessment.pdf")
Input Validation:
Calculation Accuracy:
Clinical Interpretation:
Documentation:
Calculation Errors:
Clinical Misuse:
Dosing Errors:
Available in references/ directory:
bsa_formulas_comparison.md - Formula accuracy by populationpediatric_norms.md - Growth charts and percentileschemotherapy_dosing.md - BSA-based drug calculationsethnic_adjustments.md - Population-specific cutoffscalculator_validation.md - Comparison with reference standardsLocated in scripts/ directory:
main.py - CLI calculator interfacecalculator.py - Core BMI/BSA calculationsformulas.py - Multiple BSA formula implementationspediatric.py - Child-specific calculationsdosing.py - Medication dose calculationsreports.py - Clinical report generationParameterTypeDefaultRequiredDescription--weight, -wfloat-YesWeight in kilograms--height, -Hfloat-YesHeight in centimeters--dose, -dfloat-NoStandard drug dose per m² in mg (optional)--format, -fstringtextNoOutput format (text, json)--output, -ostring-NoOutput file path (optional)
bash
# Calculate BMI and BSA
python scripts/main.py --weight 70 --height 175
# Calculate with drug dosing
python scripts/main.py --weight 70 --height 175 --dose 100
# Output as JSON
python scripts/main.py --weight 70 --height 175 --format json --output results.json
Risk IndicatorAssessmentLevelCode ExecutionPython script executed locallyLowNetwork AccessNo external API callsLowFile System AccessOptional file output onlyLowData ExposureNo sensitive data storedLowClinical RiskResults used for medical decisionsMedium
bash
# Python 3.7+
# No additional packages required (uses standard library)
Current Stage: Draft
Next Review Date: 2026-03-06
Known Issues: None
Planned Improvements:
⚕️ Clinical Note: BMI and BSA are screening and calculation tools, not substitutes for clinical judgment. Always correlate with physical examination, patient history, and other assessments. Double-check all chemotherapy calculations independently.