Emergency · LIVE
H-Impairment Index (Hack)
HII
Return the Hack 2014 H-Impairment Index (sum of completed 0-4 task scores divided by 4 times the number of tasks completed).
Markdown: /docs/hii.md · Canonical: https://magentlab.com/docs/hii
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Return the Hack 2014 H-Impairment Index (sum of completed 0-4 task scores divided by 4 times the number of tasks completed).
When to use
When an agent has already assigned Hack 2014 bedside-task integers and needs the published current HII, not a serial decline, discharge order, or legal sobriety decision.
When not to use
- Not a medical device. Not a diagnosis, discharge order, or legal sobriety test.
- Each of the five bedside tasks is a caller-assigned integer 0-4. magent does not examine the patient.
- Omitted tasks (not attempted) are excluded from both the numerator and the denominator. The denominator is 4 times the number of completed tasks, not always 20.
- Returns the current index only. Serial decline over time is not modeled.
- Does not take or echo a blood alcohol concentration.
- Hack 2014 published the index arithmetic only. magent does not apply later performance papers or invent impairment bands.
Formula
HII = (gross_motor + mentation_speech + tracing_curve + nystagmus + finger_to_nose) / (4 × tasks_completed); each completed task a caller-assigned integer 0-4; omitted tasks excluded from numerator and denominator; max denominator 20 if all five completed; range 0-1; current index only
Citation
- Authors
- Hack JB, Goldlust EJ, Gibbs F, Zink BJ
- Source
- Am J Drug Alcohol Abuse. 2014;40(2):111-117
Worked example
All five tasks 0
Given:
finger_to_nose=0gross_motor=0mentation_speech=0nystagmus=0tracing_curve=0
- gross_motor 0 + mentation_speech 0 + tracing_curve 0 + nystagmus 0 + finger_to_nose 0 = 0
- HII = 0 / (4 × 5) = 0.0
Two completed tasks of 2
Given:
gross_motor=2mentation_speech=2
- completed sum = 2 + 2 = 4
- HII = 4 / (4 × 2) = 0.5 (denominator is 8, not 20)
All five tasks 4
Given:
finger_to_nose=4gross_motor=4mentation_speech=4nystagmus=4tracing_curve=4
- gross_motor 4 + mentation_speech 4 + tracing_curve 4 + nystagmus 4 + finger_to_nose 4 = 20
- HII = 20 / (4 × 5) = 1.0
Also searched as
- H-Impairment Index
- Hack Impairment Index
- HII score
- alcohol impairment index
- Hack 2014 HII
- ED alcohol impairment
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
/api/calc/hii?gross_motor=0&mentation_speech=0&tracing_curve=0&nystagmus=0&finger_to_nose=0
Full URL: https://api.magentlab.com/api/calc/hii?gross_motor=0&mentation_speech=0&tracing_curve=0&nystagmus=0&finger_to_nose=0
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/hii?gross_motor=0&mentation_speech=0&tracing_curve=0&nystagmus=0&finger_to_nose=0"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
gross_motor |
integer | optional · 0, 1, 2, 3, 4 | Caller-assigned Hack 2014 HII gross motor function (integer 0-4). Omit when that task was not attempted. magent does not examine the patient. |
mentation_speech |
integer | optional · 0, 1, 2, 3, 4 | Caller-assigned Hack 2014 HII mentation and speech (integer 0-4). Omit when that task was not attempted. magent does not examine the patient. |
tracing_curve |
integer | optional · 0, 1, 2, 3, 4 | Caller-assigned Hack 2014 HII tracing curve (integer 0-4). Omit when that task was not attempted. magent does not examine the patient. |
nystagmus |
integer | optional · 0, 1, 2, 3, 4 | Caller-assigned Hack 2014 HII nystagmus (integer 0-4). Omit when that task was not attempted. magent does not examine the patient. |
finger_to_nose |
integer | optional · 0, 1, 2, 3, 4 | Caller-assigned Hack 2014 HII finger-to-nose (integer 0-4). Omit when that task was not attempted. magent does not examine the patient. |
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.
- 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": [
{
"finger_to_nose": "0",
"gross_motor": "0",
"mentation_speech": "0",
"nystagmus": "0",
"tracing_curve": "0"
},
{
"finger_to_nose": "0",
"gross_motor": "0",
"mentation_speech": "0",
"nystagmus": "0",
"tracing_curve": "0"
}
]
}
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/hii",
"items": [
{
"components": [
{
"value": 0,
"factor": "gross_motor",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "mentation_speech",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "tracing_curve",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "nystagmus",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "finger_to_nose",
"points": 0,
"present": true
}
],
"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": "Hack JB, Goldlust EJ, Gibbs F, Zink BJ",
"doi": "10.3109/00952990.2013.865034",
"id": "hack-2014",
"pmid": "24555813",
"source": "Am J Drug Alcohol Abuse. 2014;40(2):111-117",
"title": "The H-Impairment Index (HII): a standardized assessment of alcohol-induced impairment in the Emergency Department"
},
"formula": "hii",
"formula_expression": "HII = (gross_motor + mentation_speech + tracing_curve + nystagmus + finger_to_nose) / (4 × tasks_completed); each completed task a caller-assigned integer 0-4; omitted tasks excluded from numerator and denominator; max denominator 20 if all five completed; range 0-1; current index only",
"max_score": 1,
"score": 0.0,
"max_points": 20,
"task_sum": 0,
"tasks_completed": 5
},
{
"components": [
{
"value": 0,
"factor": "gross_motor",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "mentation_speech",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "tracing_curve",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "nystagmus",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "finger_to_nose",
"points": 0,
"present": true
}
],
"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": "Hack JB, Goldlust EJ, Gibbs F, Zink BJ",
"doi": "10.3109/00952990.2013.865034",
"id": "hack-2014",
"pmid": "24555813",
"source": "Am J Drug Alcohol Abuse. 2014;40(2):111-117",
"title": "The H-Impairment Index (HII): a standardized assessment of alcohol-induced impairment in the Emergency Department"
},
"formula": "hii",
"formula_expression": "HII = (gross_motor + mentation_speech + tracing_curve + nystagmus + finger_to_nose) / (4 × tasks_completed); each completed task a caller-assigned integer 0-4; omitted tasks excluded from numerator and denominator; max denominator 20 if all five completed; range 0-1; current index only",
"max_score": 1,
"score": 0.0,
"max_points": 20,
"task_sum": 0,
"tasks_completed": 5
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | hii |
formula_expression |
string | Exact expression used |
score |
number | Hack 2014 HII (completed sum / (4 × tasks completed)); range 0-1 |
max_score |
integer | Always 1 (published HII ceiling) |
task_sum |
integer | Sum of completed caller-assigned task scores |
tasks_completed |
integer | Count of tasks that were attempted (1-5) |
max_points |
integer | 4 × tasks_completed (20 if all five completed) |
components |
array | Per-task points; omitted tasks have present false and do not enter the index |
citation |
object | Hack et al. Am J Drug Alcohol Abuse 2014 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"value": 0,
"factor": "gross_motor",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "mentation_speech",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "tracing_curve",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "nystagmus",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "finger_to_nose",
"points": 0,
"present": true
}
],
"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": "Hack JB, Goldlust EJ, Gibbs F, Zink BJ",
"doi": "10.3109/00952990.2013.865034",
"id": "hack-2014",
"pmid": "24555813",
"source": "Am J Drug Alcohol Abuse. 2014;40(2):111-117",
"title": "The H-Impairment Index (HII): a standardized assessment of alcohol-induced impairment in the Emergency Department"
},
"formula": "hii",
"formula_expression": "HII = (gross_motor + mentation_speech + tracing_curve + nystagmus + finger_to_nose) / (4 × tasks_completed); each completed task a caller-assigned integer 0-4; omitted tasks excluded from numerator and denominator; max denominator 20 if all five completed; range 0-1; current index only",
"max_score": 1,
"score": 0.0,
"max_points": 20,
"task_sum": 0,
"tasks_completed": 5
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_hii_task |
each Hack 2014 HII task must be an integer from 0 to 4 (or omitted when that task was not attempted). Returned before settlement; you are not charged. |
| 400 | invalid_flag |
boolean clinical flags must be true or false 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
- CIWA-Ar — Sum the ten Sullivan 1989 CIWA-Ar items (nine caller-assigned 0-7 plus orientation 0-4) and return the published total (max 67).
- CAGE — Sum the four Ewing 1984 CAGE items and return whether two or more answers are affirmative.
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.