module.exports = { slug: "body-surface-area-mosteller", title: "Body surface area (Mosteller formula)", deck_category: "health", description: "Estimates body surface area in square meters from height and weight using the Mosteller formula.", inputs: [ { name: "height_cm", type: "number", unit: "cm", required: true, description: "Height in centimeters", min: 0 }, { name: "weight_kg", type: "number", unit: "kg", required: true, description: "Body weight in kilograms", min: 0 } ], outputs: [ { name: "bsa", unit: "m^2", description: "Estimated body surface area" } ], steps: [ "bsa = sqrt(height_cm * weight_kg / 3600).", "Round the result to 2 decimal places." ], constants: [ { name: "divisor", value: 3600, unit: "cm*kg", source: 0 } ], sources: [ { kind: "doi", value: "10.1056/NEJM198710223171717", title: "Simplified calculation of body-surface area", publisher: "New England Journal of Medicine, Mosteller RD, 1987;317(17):1098", retrieved_utc: "2026-09-30T19:20:00Z", note: "Source of the sqrt(height*weight/3600) formula." } ], disclaimer: "General formula only. Not medical advice. Dosing decisions belong to a licensed clinician and the product's label.", questionText(inputs) { return `What is the Mosteller body surface area for a person ${inputs.height_cm} cm tall weighing ${inputs.weight_kg} kg?`; }, run(inputs) { const { height_cm, weight_kg } = inputs; if (typeof height_cm !== "number" || height_cm <= 0) throw new Error("height_cm must be a positive number"); if (typeof weight_kg !== "number" || weight_kg <= 0) throw new Error("weight_kg must be a positive number"); const bsaRaw = Math.sqrt((height_cm * weight_kg) / 3600); const bsa = Math.round(bsaRaw * 100) / 100; return { answer: `${bsa.toFixed(2)} m^2`, values: { bsa } }; }, examples: [ { name: "worked example", inputs: { height_cm: 180, weight_kg: 80 }, expected: { answer: "2.00 m^2" }, check: "180*80 = 14400; 14400/3600 = 4; sqrt(4) = 2.00 exactly." }, { name: "test vector: smaller adult", inputs: { height_cm: 160, weight_kg: 55 }, expected: { answer: "1.56 m^2" }, check: "160*55 = 8800; 8800/3600 = 2.44444; sqrt(2.44444) = 1.56347, rounds to 1.56." } ] };