MAGENT

Infection / VTE · LIVE

RASP HIV exposure risk (Vertesi 2003)

RASP

Multiply Vertesi 2003 exclusive Steps A–C (source population, inoculum type, transmission) to Z, take basic_risk = 1/Z, apply volume modifier D as total_risk = basic_risk × D, and return the Table 2 suggested-treatment band.

LIVE $0.005 USDC GET /api/calc/rasp

Markdown: /docs/rasp.md · Canonical: https://magentlab.com/docs/rasp

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Multiply Vertesi 2003 exclusive Steps A–C (source population, inoculum type, transmission) to Z, take basic_risk = 1/Z, apply volume modifier D as total_risk = basic_risk × D, and return the Table 2 suggested-treatment band.

When to use

When an agent has already assigned Vertesi 2003 exclusive A/B/C/D tokens and needs the published product risk and Table 2 band, not a PEP order and not an interpretation of the source patient.

When not to use

  • Not a medical device. Not a PEP, nPEP, or antiretroviral order. magent does not interpret the source patient.
  • Vertesi 2003 Figure 1 scores bake in average Canadian community HIV prevalence. They are not recalibrated for other prevalence.
  • Each of Steps A–D is an exclusive caller-assigned token. magent does not assign source status, inoculum type, transmission method, or volume.
  • Table 2 bands are published suggestions, not a treatment mandate. Not HIRI-MSM and not Menza.

Formula

Z = A * B * C; basic_risk = 1/Z; total_risk = basic_risk * D; Vertesi 2003 Figure 1 exclusive A source, B inoculum, C transmission, D volume; Table 2 <1/1000 definitely indicated; 1/1000-1/10 000 recommended but optional; 1/10 001-1/100 000 optional but not recommended; >1/100 000 not indicated

Citation

Title
Risk Assessment Stratification Protocol (RASP) to help patients decide on the use of postexposure prophylaxis for HIV exposure
Authors
Vertesi L
Source
CJEM. 2003;5(1):46-48
DOI
10.1017/S1481803500008113

Worked example

Known asymptomatic HIV, fresh blood, deep transcutaneous, 25-g needle

Given: inoculum_type=fresh_bloodinoculum_volume=small_small_bore_lt_22gsource_population=known_hiv_asymptomatictransmission=deep_transcutaneous_visible_bleeding

  1. A known_hiv_asymptomatic = 10; B fresh_blood = 1; C deep_transcutaneous_visible_bleeding = 100
  2. Z = 10 * 1 * 100 = 1000; basic_risk = 1/1000 = 0.001
  3. D small_small_bore_lt_22g = 3; total_risk = 0.001 * 3 = 0.003 (~1 in 333)
  4. Table 2 <1/1000 → definitely indicated. Not a PEP order.

Unknown low-risk, dried old blood, superficial, large-bore needle

Given: inoculum_type=dried_old_bloodinoculum_volume=moderate_large_bore_gt_22gsource_population=unknown_hiv_low_risktransmission=superficial_transcutaneous_no_bleeding

  1. A unknown_hiv_low_risk = 1000; B dried_old_blood = 100; C superficial_transcutaneous_no_bleeding = 200
  2. Z = 1000 * 100 * 200 = 20000000; basic_risk = 1/20000000
  3. D moderate_large_bore_gt_22g = 5; total_risk = 5/20000000 (1 in 4000000)
  4. Table 2 >1/100 000 → not indicated. Not a PEP order.

Also searched as

  • RASP
  • Risk Assessment Stratification Protocol
  • Vertesi HIV exposure
  • HIV postexposure risk
  • needle-stick HIV risk
  • HIV exposure prophylaxis risk
  • Vertesi 2003 RASP

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/rasp?source_population=known_hiv_asymptomatic&inoculum_type=fresh_blood&transmission=deep_transcutaneous_visible_bleeding&inoculum_volume=small_small_bore_lt_22g

Full URL: https://api.magentlab.com/api/calc/rasp?source_population=known_hiv_asymptomatic&inoculum_type=fresh_blood&transmission=deep_transcutaneous_visible_bleeding&inoculum_volume=small_small_bore_lt_22g

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/rasp?source_population=known_hiv_asymptomatic&inoculum_type=fresh_blood&transmission=deep_transcutaneous_visible_bleeding&inoculum_volume=small_small_bore_lt_22g"

Parameters

Name Type Required Description
source_population string required · known_hiv_acute_aids, known_hiv_asymptomatic, unknown_hiv_high_risk, unknown_hiv_low_risk Vertesi 2003 Step A source population as assigned by the caller (exclusive). known_hiv_acute_aids scores 1 (acute AIDS illness); known_hiv_asymptomatic scores 10; unknown_hiv_high_risk scores 100; unknown_hiv_low_risk scores 1000. magent does not interpret the source patient.
inoculum_type string required · fresh_blood, body_fluids_at_risk, dried_old_blood, low_risk_secretions Vertesi 2003 Step B inoculum type as assigned by the caller (exclusive). fresh_blood scores 1; body_fluids_at_risk scores 10 (semen); dried_old_blood scores 100; low_risk_secretions scores 1000 (tears, saliva, urine). magent does not classify the specimen.
transmission string required · intravenous, deep_intramuscular, deep_transcutaneous_visible_bleeding, superficial_transcutaneous_no_bleeding, mucosal_contact, intact_skin Vertesi 2003 Step C method of transmission as assigned by the caller (exclusive). intravenous scores 1; deep_intramuscular scores 10; deep_transcutaneous_visible_bleeding scores 100; superficial_transcutaneous_no_bleeding scores 200; mucosal_contact scores 500; intact_skin scores 1000. magent does not examine the wound.
inoculum_volume string required · massive_transfusion, measurable_gt_1_ml, moderate_large_bore_gt_22g, small_small_bore_lt_22g, trace_surface Vertesi 2003 Step D volume modifier as assigned by the caller (exclusive). massive_transfusion scores 100; measurable_gt_1_ml scores 10; moderate_large_bore_gt_22g scores 5; small_small_bore_lt_22g scores 3; trace_surface scores 1 (suture needle). 22 g exactly is not a published token. magent does not measure volume.

Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

POST /api/calc/rasp Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "inoculum_type": "fresh_blood",
      "inoculum_volume": "small_small_bore_lt_22g",
      "source_population": "known_hiv_asymptomatic",
      "transmission": "deep_transcutaneous_visible_bleeding"
    },
    {
      "inoculum_type": "fresh_blood",
      "inoculum_volume": "small_small_bore_lt_22g",
      "source_population": "known_hiv_asymptomatic",
      "transmission": "deep_transcutaneous_visible_bleeding"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/rasp",
  "items": [
    {
      "z": 1000,
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "citation": {
        "authors": "Vertesi L",
        "doi": "10.1017/S1481803500008113",
        "id": "vertesi-2003",
        "pmid": "12630044",
        "source": "CJEM. 2003;5(1):46-48",
        "title": "Risk Assessment Stratification Protocol (RASP) to help patients decide on the use of postexposure prophylaxis for HIV exposure"
      },
      "formula": "rasp",
      "formula_expression": "Z = A * B * C; basic_risk = 1/Z; total_risk = basic_risk * D; Vertesi 2003 Figure 1 exclusive A source, B inoculum, C transmission, D volume; Table 2 <1/1000 definitely indicated; 1/1000-1/10 000 recommended but optional; 1/10 001-1/100 000 optional but not recommended; >1/100 000 not indicated",
      "basic_risk": 0.001,
      "inoculum_type": "fresh_blood",
      "inoculum_type_score": 1,
      "inoculum_volume": "small_small_bore_lt_22g",
      "risk_level": "definitely_indicated",
      "risk_one_in": 333,
      "source_population": "known_hiv_asymptomatic",
      "source_score": 10,
      "suggested_treatment": "Definitely indicated",
      "total_risk": 0.003,
      "transmission": "deep_transcutaneous_visible_bleeding",
      "transmission_score": 100,
      "volume_modifier": 3
    },
    {
      "z": 1000,
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "citation": {
        "authors": "Vertesi L",
        "doi": "10.1017/S1481803500008113",
        "id": "vertesi-2003",
        "pmid": "12630044",
        "source": "CJEM. 2003;5(1):46-48",
        "title": "Risk Assessment Stratification Protocol (RASP) to help patients decide on the use of postexposure prophylaxis for HIV exposure"
      },
      "formula": "rasp",
      "formula_expression": "Z = A * B * C; basic_risk = 1/Z; total_risk = basic_risk * D; Vertesi 2003 Figure 1 exclusive A source, B inoculum, C transmission, D volume; Table 2 <1/1000 definitely indicated; 1/1000-1/10 000 recommended but optional; 1/10 001-1/100 000 optional but not recommended; >1/100 000 not indicated",
      "basic_risk": 0.001,
      "inoculum_type": "fresh_blood",
      "inoculum_type_score": 1,
      "inoculum_volume": "small_small_bore_lt_22g",
      "risk_level": "definitely_indicated",
      "risk_one_in": 333,
      "source_population": "known_hiv_asymptomatic",
      "source_score": 10,
      "suggested_treatment": "Definitely indicated",
      "total_risk": 0.003,
      "transmission": "deep_transcutaneous_visible_bleeding",
      "transmission_score": 100,
      "volume_modifier": 3
    }
  ]
}

Response

Field Type Description
formula string rasp
formula_expression string Exact expression used
source_population string Caller-assigned Step A token used
inoculum_type string Caller-assigned Step B token used
transmission string Caller-assigned Step C token used
inoculum_volume string Caller-assigned Step D token used
source_score integer Step A score (1, 10, 100, or 1000)
inoculum_type_score integer Step B score (1, 10, 100, or 1000)
transmission_score integer Step C score (1, 10, 100, 200, 500, or 1000)
volume_modifier integer Step D modifier (100, 10, 5, 3, or 1)
z integer A * B * C
basic_risk number 1/Z, 9 decimals
total_risk number basic_risk * D, 9 decimals
risk_one_in integer Nearest integer 1/total_risk (Z/D) for Table 2 fraction notation
risk_level string definitely_indicated, recommended_optional, optional_not_recommended, or not_indicated
suggested_treatment string Vertesi 2003 Table 2 suggested-treatment wording for that risk level
citation object Vertesi 2003 CJEM citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "z": 1000,
  "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
  "citation": {
    "authors": "Vertesi L",
    "doi": "10.1017/S1481803500008113",
    "id": "vertesi-2003",
    "pmid": "12630044",
    "source": "CJEM. 2003;5(1):46-48",
    "title": "Risk Assessment Stratification Protocol (RASP) to help patients decide on the use of postexposure prophylaxis for HIV exposure"
  },
  "formula": "rasp",
  "formula_expression": "Z = A * B * C; basic_risk = 1/Z; total_risk = basic_risk * D; Vertesi 2003 Figure 1 exclusive A source, B inoculum, C transmission, D volume; Table 2 <1/1000 definitely indicated; 1/1000-1/10 000 recommended but optional; 1/10 001-1/100 000 optional but not recommended; >1/100 000 not indicated",
  "basic_risk": 0.001,
  "inoculum_type": "fresh_blood",
  "inoculum_type_score": 1,
  "inoculum_volume": "small_small_bore_lt_22g",
  "risk_level": "definitely_indicated",
  "risk_one_in": 333,
  "source_population": "known_hiv_asymptomatic",
  "source_score": 10,
  "suggested_treatment": "Definitely indicated",
  "total_risk": 0.003,
  "transmission": "deep_transcutaneous_visible_bleeding",
  "transmission_score": 100,
  "volume_modifier": 3
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_rasp RASP inputs must match Vertesi 2003 exclusive source-population, inoculum-type, transmission, and volume scores from that paper. Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • HIRI-MSM — Sum the published Smith 2012 seven-item HIV incidence risk index for MSM (age plus six prior-6-month behaviors, 0–47) and return at_or_above_10 when the total is ≥10.
  • Menza — Sum the four Menza 2009 caller-assigned flags and return the 0–19 point total.

Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /docs/mcp.

Guarantees

  • HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
  • exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.