← 返回 Skills 市场
aipoch-ai

Bmi Bsa Calculator

作者 AIpoch · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
166
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install bmi-bsa-calculator
功能描述
Calculate Body Mass Index (BMI) and Body Surface Area (BSA) for clinical assessment and drug dosing. Supports multiple BSA formulas (DuBois, Mosteller, Hayco...
使用说明 (SKILL.md)

BMI & BSA Calculator

Overview

Clinical calculator for anthropometric measurements used in health assessment, obesity screening, and chemotherapy dosing calculations.

Key Capabilities:

  • BMI Calculation: Standard and adjusted BMI formulas
  • BSA Estimation: Multiple validated formulas (DuBois, Mosteller, Haycock)
  • Weight Classification: WHO and CDC category assignment
  • Dosing Support: Chemotherapy and medication dose calculations
  • Pediatric Support: Age-appropriate norms and calculations
  • Unit Flexibility: Metric and imperial input support

When to Use

✅ Use this skill when:

  • Calculating chemotherapy doses requiring BSA (mg/m²)
  • Screening for obesity or underweight in clinical practice
  • Adjusting drug doses based on body composition
  • Documenting baseline anthropometrics in patient charts
  • Teaching medical students clinical calculations
  • Quick assessment in resource-limited settings

❌ Do NOT use when:

  • BMI alone for clinical diagnosis → Use comprehensive metabolic assessment
  • Pregnancy weight assessment → Use gestational weight gain charts
  • Pediatric growth evaluation → Use WHO/CDC growth charts with percentiles
  • Body composition analysis → Use DEXA or bioimpedance
  • Athletic/muscular patients → Consider body fat % instead of BMI

Integration:

  • Upstream: ehr-semantic-compressor (patient data extraction), automated-soap-note-generator (vital signs)
  • Downstream: drug-interaction-checker (dose calculation), medication-reconciliation (dosing verification)

Core Capabilities

1. BMI Calculation

Calculate Body Mass Index with classification:

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):

Category BMI Range Clinical Significance
Underweight \x3C 18.5 Malnutrition risk
Normal 18.5 - 24.9 Healthy range
Overweight 25.0 - 29.9 Increased risk
Obese I 30.0 - 34.9 High risk
Obese II 35.0 - 39.9 Very high risk
Obese III ≥ 40.0 Extremely high risk

Adjusted BMI:

  • BMI Prime: BMI / 25 (obesity severity index)
  • Ponderal Index: BMI for tall/short individuals
  • Age-adjusted: For elderly patients (>65)

2. BSA Calculation

Multiple formulas for different clinical scenarios:

# 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:

Formula Equation Best For
DuBois 0.007184 × W^0.425 × H^0.725 Adults (most common)
Mosteller √(W × H / 3600) Adults (simplified)
Haycock 0.024265 × W^0.5378 × H^0.3964 Pediatrics
Gehan-George 0.0235 × W^0.51456 × H^0.42246 Oncology
Yu 0.015925 × W^0.5 × H^0.5 Asian populations

3. Drug Dosing Calculations

Apply BSA to medication dosing:

# 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:

  • Carboplatin: AUC-based (Calvert formula)
  • 5-FU: 400-600 mg/m²
  • Doxorubicin: 60-75 mg/m² (lifetime max 450-550 mg/m²)
  • Paclitaxel: 135-175 mg/m²

4. Pediatric Calculations

Age-appropriate calculations for children:

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:

  • BMI percentiles (not absolute values)
  • Growth chart integration
  • Age-specific BSA formulas
  • Body composition changes with development

Common Patterns

Pattern 1: Chemotherapy Dosing

Scenario: Calculate carboplatin dose for cancer patient.

# 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:

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

Pattern 2: Obesity Screening

Scenario: BMI assessment for weight management clinic.

# 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}")

Pattern 3: Pediatric Growth Assessment

Scenario: Calculate child's BSA for medication dosing.

# 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")

Pattern 4: Rapid Clinical Assessment

Scenario: Quick BMI/BSA for admission vital signs.

# 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

Complete Workflow Example

Comprehensive patient assessment:

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")

Quality Checklist

Input Validation:

  • Weight realistic (2-300 kg range)
  • Height realistic (50-250 cm range)
  • Units clearly specified (kg/lbs, cm/in)
  • Age appropriate for formulas used

Calculation Accuracy:

  • Formula selection appropriate for patient
  • BSA formula matches clinical context
  • Pediatric vs. adult norms correctly applied
  • Rounding appropriate (1-2 decimal places)

Clinical Interpretation:

  • CRITICAL: BMI is screening tool, not diagnostic
  • Ethnicity-specific cutoffs considered
  • Muscle mass considered (athletes)
  • Age adjustments applied (elderly/children)

Documentation:

  • Formula used documented (DuBois vs. Mosteller)
  • Units clearly stated
  • Date of calculation recorded
  • Dose limits verified for chemotherapy

Common Pitfalls

Calculation Errors:

  • Unit confusion → Pounds vs. kg, inches vs. cm

    • ✅ Always verify units; convert if necessary
  • Wrong formula → Using adult BSA for infants

    • ✅ Use Haycock for children \x3C 12 years
  • BMI over-interpretation → Diagnosing based on BMI alone

    • ✅ BMI is screening tool; clinical correlation required

Clinical Misuse:

  • Athletes misclassified → Muscular patients marked obese

    • ✅ Consider waist circumference or body fat %
  • Elderly inappropriate norms → Same cutoffs for all ages

    • ✅ Use age-adjusted BMI for >65 years
  • Ignoring ethnicity → Universal cutoffs applied

    • ✅ Asian populations: lower obesity thresholds

Dosing Errors:

  • BSA rounding → 1.79 m² rounded to 1.8 m²

    • ✅ Use precise values for chemotherapy
  • Max dose ignored → Exceeding lifetime limits

    • ✅ Always check cumulative doses (doxorubicin)

References

Available in references/ directory:

  • bsa_formulas_comparison.md - Formula accuracy by population
  • pediatric_norms.md - Growth charts and percentiles
  • chemotherapy_dosing.md - BSA-based drug calculations
  • ethnic_adjustments.md - Population-specific cutoffs
  • calculator_validation.md - Comparison with reference standards

Scripts

Located in scripts/ directory:

  • main.py - CLI calculator interface
  • calculator.py - Core BMI/BSA calculations
  • formulas.py - Multiple BSA formula implementations
  • pediatric.py - Child-specific calculations
  • dosing.py - Medication dose calculations
  • reports.py - Clinical report generation

Limitations

  • BMI Limitations: Doesn't distinguish fat from muscle; varies by ethnicity
  • BSA Estimation: All formulas are approximations; 10-15% variation normal
  • Extreme Values: Very short/tall patients may have inaccurate estimates
  • Not for Diagnosis: BMI/BSA are tools, not clinical diagnoses
  • Amputees: Standard formulas inaccurate; adjustment needed
  • Pregnancy: Special considerations not included

Parameters

Parameter Type Default Required Description
--weight, -w float - Yes Weight in kilograms
--height, -H float - Yes Height in centimeters
--dose, -d float - No Standard drug dose per m² in mg (optional)
--format, -f string text No Output format (text, json)
--output, -o string - No Output file path (optional)

Usage

Basic Usage

# 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 Assessment

Risk Indicator Assessment Level
Code Execution Python script executed locally Low
Network Access No external API calls Low
File System Access Optional file output only Low
Data Exposure No sensitive data stored Low
Clinical Risk Results used for medical decisions Medium

Security Checklist

  • No hardcoded credentials or API keys
  • No unauthorized file system access
  • Input validation for weight/height
  • Output does not expose sensitive information
  • Error messages sanitized
  • Script execution in sandboxed environment

Prerequisites

# Python 3.7+
# No additional packages required (uses standard library)

Evaluation Criteria

Success Metrics

  • Successfully calculates BMI using standard formula
  • Successfully calculates BSA using DuBois formula
  • Correctly categorizes BMI (Underweight, Normal, Overweight, Obese)
  • Calculates drug doses based on BSA when provided

Test Cases

  1. Normal Adult: 70kg, 175cm → BMI 22.9 (Normal), BSA ~1.85 m²
  2. Drug Dosing: 70kg, 175cm, 100mg/m² → Dose 185mg
  3. JSON Output: Valid JSON with all fields

Lifecycle Status

  • Current Stage: Draft
  • Next Review Date: 2026-03-06
  • Known Issues: None
  • Planned Improvements:
    • Add additional BSA formulas (Haycock, Mosteller)
    • Add pediatric BMI percentiles
    • Add unit conversion (lbs, ft/in)

⚕️ 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.

安全使用建议
This skill appears coherent and low risk: it contains simple local Python code for BMI/BSA/dosing and requests no secrets. Before using: (1) review and test outputs carefully — these calculations can affect clinical dosing and should be validated before applying clinically; (2) avoid running the skill on systems containing protected health information unless the environment is trusted and compliant (HIPAA, audit/logging); (3) if you plan to integrate with EHRs or drug-check services, provide credentials and connectors separately and verify secure handling; (4) note the skill allows shell execution and file writes — permit autonomous invocation only if you trust the execution environment. The requirements.txt listing standard-library modules is odd but harmless.
功能分析
Type: OpenClaw Skill Name: bmi-bsa-calculator Version: 0.1.0 The skill bundle provides a clinical calculator for Body Mass Index (BMI) and Body Surface Area (BSA). The core logic in `scripts/main.py` implements standard medical formulas (DuBois) using Python's math library and includes basic input validation for weight and height. While the documentation in `SKILL.md` is more extensive than the provided code—referencing missing scripts like `calculator.py` and `formulas.py` and describing features not yet implemented in the main script—the existing code is functional, lacks external dependencies, and contains no indicators of malicious intent, data exfiltration, or prompt injection.
能力评估
Purpose & Capability
The name/description match the provided code and SKILL.md examples. The Python script implements BMI, BSA (DuBois) and simple dose calculations used in the documentation. References to upstream/downstream integrations are descriptive and do not require additional credentials within this bundle.
Instruction Scope
SKILL.md instructs the agent to run local calculations and optionally write output files (examples use the included script). It does not direct the agent to read unrelated system files, export data to external endpoints, or access secrets. The allowed-tools list (Read, Write, Bash, Edit) is broader than strictly necessary but used here to run the included CLI and save results.
Install Mechanism
There is no install spec or network download. The skill is instruction-only with an included local Python script; no external packages are required and no archives are extracted. This represents a low install risk.
Credentials
The skill requests no environment variables or credentials (primaryEnv none). SKILL.md mentions integration with EHR and drug-checking tools but does not request those credentials—this is plausible (integration would require separate wiring) but users should be aware that real EHR integration would necessitate secure auth and policies outside this skill.
Persistence & Privilege
always:false and model-invocation is allowed (the platform default). The skill permits running shell commands (Bash) and writing files, which is consistent with running the included CLI but does grant the agent the ability to execute shell commands when invoked. There is no request to modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bmi-bsa-calculator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bmi-bsa-calculator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release: BMI & BSA Calculator for clinical and pediatric use. - Calculates Body Mass Index (BMI) with weight classification based on adult/pediatric standards. - Estimates Body Surface Area (BSA) using multiple formulas: DuBois, Mosteller, Haycock, Gehan-George, and Yu. - Supports both adult and pediatric anthropometric assessment, including percentile and risk categorization. - Provides utilities for chemotherapy and medication dosing by BSA, with sample clinical workflows. - Accepts metric and imperial inputs, with detailed documentation and example usages.
元数据
Slug bmi-bsa-calculator
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Bmi Bsa Calculator 是什么?

Calculate Body Mass Index (BMI) and Body Surface Area (BSA) for clinical assessment and drug dosing. Supports multiple BSA formulas (DuBois, Mosteller, Hayco... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 166 次。

如何安装 Bmi Bsa Calculator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bmi-bsa-calculator」即可一键安装,无需额外配置。

Bmi Bsa Calculator 是免费的吗?

是的,Bmi Bsa Calculator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Bmi Bsa Calculator 支持哪些平台?

Bmi Bsa Calculator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Bmi Bsa Calculator?

由 AIpoch(@aipoch-ai)开发并维护,当前版本 v0.1.0。

💬 留言讨论