{"uid":"cap_8s2vvzaqjR3J_ROvqGaFJ","slug":"magent-pack-years-calculator-2b178ca4","name":"magent Pack-Years Calculator","description":"NCI pack-year smoking exposure: pack_years = packs_per_day x years_smoked. One pack per day for one year is one pack-year; two packs per day for 0.5 year is the same. Provide packs_per_day (0-10) or cigarettes_per_day (0-200; 20 cigarettes = 1 pack), not both, plus years_smoked (0-80). magent does not take a smoking history interview. Not a lung-cancer screening order, COPD diagnosis, or medical device.","url":"https://api.magentlab.com/api/calc/pack_years","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","required":["years_smoked"],"properties":{"years_smoked":{"type":"number","description":"Years smoked (0-80, magent clamp; NCI does not publish an input band). NCI: 2 packs/day for 0.5 year = 1 pack-year. magent does not take a smoking history interview."},"packs_per_day":{"type":"number","description":"Cigarette packs smoked per day (0-10, magent clamp; NCI does not publish an input band). Provide this or cigarettes_per_day, not both. NCI: 1 pack/day for 1 year = 1 pack-year."},"cigarettes_per_day":{"type":"number","description":"Cigarettes smoked per day (0-200, magent clamp). Converted as packs_per_day = cigarettes_per_day / 20. Provide this or packs_per_day, not both."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dSAQMzz9w2-4CCOpmU-2t","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates NCI-defined pack-year smoking exposure from daily cigarette or pack consumption and years smoked","exampleAgentPrompt":"Calculate the pack years for a patient who smoked 1.5 packs per day for 25 years.","exampleUseCases":[{"title":"EHR smoking history summarization","prompt":"I need to convert a patient's smoking history into pack years — they smoked about 20 cigarettes a day for 35 years. What's their pack-year total?"},{"title":"Research cohort exposure scoring","prompt":"For a study participant who smoked 2 packs a day for 10 years, what is their cumulative pack-year exposure?"},{"title":"Clinical intake form automation","prompt":"A new patient reports smoking half a pack daily for 40 years. Can you compute their pack years for the intake record?"}],"resultDescription":"Returns a numeric pack-years value computed as (packs_per_day × years_smoked), following the NCI definition where 1 pack/day for 1 year equals 1 pack-year. If cigarettes_per_day is provided, it is first divided by 20 to convert to packs.","failureModes":["Both packs_per_day and cigarettes_per_day supplied simultaneously — only one is accepted","years_smoked missing from query params — required field","Values outside clamped ranges (packs_per_day >10, cigarettes_per_day >200, years_smoked >80) may be clamped or rejected","Payment not provided or x402 payment failure resulting in 402 response","Invalid numeric types for parameters"],"whenToPreferThis":"Use this endpoint when you need a fast, programmatic NCI-standard pack-year computation from structured inputs (daily consumption + duration). It is not a lung cancer screening tool, COPD diagnostic, or medical interview — choose it for EHR enrichment, research scoring, or clinical documentation automation where you already have the two required numeric inputs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:14:29.900Z","isFirstParty":false}