{"uid":"cap_DcgnsqK0IGYljUlqU7X8g","slug":"magent-denver-hiv-risk-score-dhrs-calculator-fae8e0b5","name":"Magent Denver HIV Risk Score (DHRS) Calculator","description":"Haukoos 2012 Table 2 FULL Denver HIV score (not abbreviated). Age bands, sex, ethnicity, and five caller-assigned flags (sm vi rai idu pht). Range -14 to 81. Caller-assigned. Not a diagnosis.","url":"https://api.magentlab.com/api/calc/dhrs","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":["age","sex","ethnicity","sm","vi","rai","idu","pht"],"properties":{"sm":{"type":"boolean","description":"Haukoos 2012 Table 2 item sm. Caller-assigned boolean. +22 if true. Magent docs map this to the paper's sex-with-a-male coefficient; magent does not take a sexual history."},"vi":{"type":"boolean","description":"Haukoos 2012 Table 2 item vi. Caller-assigned boolean. -10 if true. Do not drop this item. Magent docs map this to the paper's vaginal-intercourse coefficient."},"age":{"type":"integer","description":"Age in years (integer 18-120). Haukoos 2012 Table 2: <22 or >60 scores 0; 22-25 or 55-60 scores 4; 26-32 or 47-54 scores 10; 33-46 scores 12. Caller-assigned."},"idu":{"type":"boolean","description":"Haukoos 2012 Table 2 item idu. Caller-assigned boolean. +9 if true. Magent docs map this to the paper's injection-drug-use coefficient."},"pht":{"type":"boolean","description":"Haukoos 2012 Table 2 item pht. Caller-assigned boolean. -4 if true. Magent docs map this to the paper's past-HIV-testing coefficient."},"rai":{"type":"boolean","description":"Haukoos 2012 Table 2 item rai. Caller-assigned boolean. +8 if true. Do not drop this item. Magent docs map this to the paper's receptive-anal-intercourse coefficient."},"sex":{"enum":["female","male"],"type":"string","description":"female or male as assigned by the caller (Haukoos 2012 Table 2 gender). female scores 0; male scores 21."},"ethnicity":{"enum":["black","hispanic","white","other"],"type":"string","description":"Caller-assigned ethnicity as used in Haukoos 2012 Table 2 (not param race). black scores 9; hispanic scores 3; white scores 0; other scores 0 (paper: American Indian or Alaska Native, Native Hawaiian, or non-Hawaiian Pacific Islander). magent does not assign race or ethnicity."}}}},"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_q6J8Q58El_A8zCsAvFA1J","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":"Computes the full Haukoos 2012 Table 2 Denver HIV Risk Score from age, sex, ethnicity, and five behavioral/historical flags, returning an integer risk score in the range -14 to 81.","exampleAgentPrompt":"Calculate the full Haukoos 2012 Denver HIV Risk Score for a 35-year-old black male — sm is true, vi is false, rai is true, idu is false, and pht is true.","exampleUseCases":[{"title":"ED HIV screening triage prioritization","prompt":"I need the Denver HIV Risk Score for a 28-year-old Hispanic male presenting to the ER — sm is true, vi is false, rai is true, idu is true, and pht is false. Use the full Haukoos 2012 table."},{"title":"Research cohort risk stratification","prompt":"Score this study participant using the Haukoos DHRS: age 45, female, white ethnicity, sm false, vi true, rai false, idu false, pht true."},{"title":"Public health workflow automation","prompt":"Run the full Denver HIV risk score for a 22-year-old black male with sm true, vi false, rai false, idu true, pht false — I need the integer score for our risk-stratification pipeline."}],"resultDescription":"Returns an integer Denver HIV Risk Score computed from the Haukoos 2012 Table 2 algorithm, with a value between -14 and 81. Higher scores indicate greater estimated HIV risk based on the supplied demographic and behavioral parameters. This is not a diagnosis.","failureModes":["Missing required query parameters (age, sex, ethnicity, or any of the five boolean flags) returns an error","Age outside the integer range 18-120 may be rejected or yield unexpected scoring","Invalid enum values for sex (not 'male'/'female') or ethnicity (not 'black'/'hispanic'/'white'/'other') return validation errors","Non-boolean values for sm, vi, rai, idu, or pht cause parameter parse failures","Payment not attached or insufficient USDC balance returns HTTP 402"],"whenToPreferThis":"Use this endpoint when you need the complete, unabbreviated Haukoos 2012 Table 2 Denver HIV Risk Score — including all five behavioral flags (sm, vi, rai, idu, pht) — rather than an abbreviated variant. Prefer this over generic HIV risk tools when you need a deterministic, published, citable algorithm with a known score range (-14 to 81) for clinical decision support, triage, or research pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:07:02.183Z","isFirstParty":false}