Emergency · LIVE
Hamilton anxiety rating scale
HAM-A
Sum fourteen caller-assigned Hamilton 1959 HAM-A items (each integer 0-4) and return the published 0-56 total. Does not apply later total-score severity bands.
Markdown: /docs/hamilton-anxiety.md · Canonical: https://magentlab.com/docs/hamilton-anxiety
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum fourteen caller-assigned Hamilton 1959 HAM-A items (each integer 0-4) and return the published 0-56 total. Does not apply later total-score severity bands.
When to use
When an agent already has Hamilton 1959 0-4 integers for the fourteen items and needs the published total. magent does not interview the patient, diagnose anxiety, or apply later 17/24 cutoffs.
When not to use
- Not a medical device and not an anxiety diagnosis or treatment order.
- Each of the fourteen items is a caller-assigned integer 0-4 (0 not present, 1 mild, 2 moderate, 3 severe, 4 very severe). magent does not interview the patient.
- This is Hamilton 1959 HAM-A only (fourteen items; max 56). magent does not score GAD-7, PHQ-9, or Hamilton depression.
- Hamilton 1959 published no total-score severity bands. This tool returns score and max_score only. It does not apply later 17/24 website or review cutoffs.
Formula
HAM-A = anxious_mood + tension + fears + insomnia + intellectual + depressed_mood + somatic_muscular + somatic_sensory + cardiovascular + respiratory + gastrointestinal + genitourinary + autonomic + interview_behavior; each caller-assigned 0-4; max 56; Hamilton 1959; no total-score severity bands
Citation
- Authors
- Hamilton M
- Source
- Br J Med Psychol. 1959;32(1):50-55
Worked example
All items 0
Given:
anxious_mood=0autonomic=0cardiovascular=0depressed_mood=0fears=0gastrointestinal=0genitourinary=0insomnia=0intellectual=0interview_behavior=0respiratory=0somatic_muscular=0somatic_sensory=0tension=0
- anxious_mood, tension, fears, insomnia, intellectual, depressed_mood, somatic_muscular, somatic_sensory, cardiovascular, respiratory, gastrointestinal, genitourinary, autonomic, and interview_behavior are 0 as assigned by the caller
- Score = 0 (max 56). Hamilton 1959 published no total-score severity band.
All items 4
Given:
anxious_mood=4autonomic=4cardiovascular=4depressed_mood=4fears=4gastrointestinal=4genitourinary=4insomnia=4intellectual=4interview_behavior=4respiratory=4somatic_muscular=4somatic_sensory=4tension=4
- each of the fourteen Hamilton 1959 items is 4 as assigned by the caller
- Score = 56 (max 56). No total-score severity band.
Also searched as
- HAM-A
- Hamilton anxiety rating scale
- Hamilton Anxiety Scale
- HARS
- Hamilton 1959 anxiety
- HAM-A score
- 14-item Hamilton anxiety
- anxiety neurosis rating
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/hamilton_anxiety?anxious_mood=0&tension=0&fears=0&insomnia=0&intellectual=0&depressed_mood=0&somatic_muscular=0&somatic_sensory=0&cardiovascular=0&respiratory=0&gastrointestinal=0&genitourinary=0&autonomic=0&interview_behavior=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/hamilton_anxiety?anxious_mood=0&tension=0&fears=0&insomnia=0&intellectual=0&depressed_mood=0&somatic_muscular=0&somatic_sensory=0&cardiovascular=0&respiratory=0&gastrointestinal=0&genitourinary=0&autonomic=0&interview_behavior=0"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
anxious_mood |
integer | required | Caller-assigned Hamilton 1959 anxious mood (integer 0-4: 0 not present, 1 mild, 2 moderate, 3 severe, 4 very severe): worries, anticipation of the worst, fearful anticipation, irritability. magent does not interview the patient. |
tension |
integer | required | Caller-assigned Hamilton 1959 tension (integer 0-4): feelings of tension, fatigability, startle response, moved to tears easily, trembling, restlessness, inability to relax. magent does not interview the patient. |
fears |
integer | required | Caller-assigned Hamilton 1959 fears (integer 0-4): of dark, of strangers, of being left alone, of animals, of traffic, of crowds. magent does not interview the patient. |
insomnia |
integer | required | Caller-assigned Hamilton 1959 insomnia (integer 0-4): difficulty falling asleep, broken sleep, unsatisfying sleep and fatigue on waking, dreams, nightmares, night terrors. magent does not interview the patient. |
intellectual |
integer | required | Caller-assigned Hamilton 1959 intellectual / cognitive (integer 0-4): difficulty in concentration, poor memory. magent does not interview the patient. |
depressed_mood |
integer | required | Caller-assigned Hamilton 1959 depressed mood (integer 0-4): loss of interest, lack of pleasure in hobbies, depression, early waking, diurnal swing. magent does not interview the patient. |
somatic_muscular |
integer | required | Caller-assigned Hamilton 1959 somatic (muscular) (integer 0-4): pains and aches, twitching, stiffness, myoclonic jerks, grinding of teeth, unsteady voice, increased muscular tone. magent does not interview the patient. |
somatic_sensory |
integer | required | Caller-assigned Hamilton 1959 somatic (sensory) (integer 0-4): tinnitus, blurring of vision, hot and cold flushes, feelings of weakness, pricking sensation. magent does not interview the patient. |
cardiovascular |
integer | required | Caller-assigned Hamilton 1959 cardiovascular symptoms (integer 0-4): tachycardia, palpitations, pain in chest, throbbing of vessels, fainting feelings, missing beat. magent does not interview the patient. |
respiratory |
integer | required | Caller-assigned Hamilton 1959 respiratory symptoms (integer 0-4): pressure or constriction in chest, choking feelings, sighing, dyspnea. magent does not interview the patient. |
gastrointestinal |
integer | required | Caller-assigned Hamilton 1959 gastro-intestinal symptoms (integer 0-4): difficulty in swallowing, wind, abdominal pain, burning sensations, abdominal fullness, nausea, vomiting, borborygmi, looseness of bowels, loss of weight, constipation. magent does not interview the patient. |
genitourinary |
integer | required | Caller-assigned Hamilton 1959 genito-urinary symptoms (integer 0-4): frequency or urgency of micturition, amenorrhea, menorrhagia, development of frigidity, premature ejaculation, loss of libido, impotence. magent does not interview the patient. |
autonomic |
integer | required | Caller-assigned Hamilton 1959 autonomic symptoms (integer 0-4): dry mouth, flushing, pallor, tendency to sweat, giddiness, tension headache, raising of hair. magent does not interview the patient. |
interview_behavior |
integer | required | Caller-assigned Hamilton 1959 behaviour at interview (integer 0-4): fidgeting, restlessness or pacing, tremor of hands, furrowed brow, strained face, sighing or rapid respiration, facial pallor, swallowing. magent does not interview 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": [
{
"anxious_mood": "0",
"autonomic": "0",
"cardiovascular": "0",
"depressed_mood": "0",
"fears": "0",
"gastrointestinal": "0",
"genitourinary": "0",
"insomnia": "0",
"intellectual": "0",
"interview_behavior": "0",
"respiratory": "0",
"somatic_muscular": "0",
"somatic_sensory": "0",
"tension": "0"
},
{
"anxious_mood": "0",
"autonomic": "0",
"cardiovascular": "0",
"depressed_mood": "0",
"fears": "0",
"gastrointestinal": "0",
"genitourinary": "0",
"insomnia": "0",
"intellectual": "0",
"interview_behavior": "0",
"respiratory": "0",
"somatic_muscular": "0",
"somatic_sensory": "0",
"tension": "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/hamilton_anxiety",
"items": [
{
"components": [
{
"value": 0,
"factor": "anxious_mood",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "tension",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "fears",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "insomnia",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "intellectual",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "depressed_mood",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "somatic_muscular",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "somatic_sensory",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "cardiovascular",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "respiratory",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "gastrointestinal",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "genitourinary",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "autonomic",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "interview_behavior",
"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": "Hamilton M",
"doi": "10.1111/j.2044-8341.1959.tb00467.x",
"id": "hamilton-1959",
"pmid": "13638508",
"source": "Br J Med Psychol. 1959;32(1):50-55",
"title": "The assessment of anxiety states by rating"
},
"formula": "hamilton_anxiety",
"formula_expression": "HAM-A = anxious_mood + tension + fears + insomnia + intellectual + depressed_mood + somatic_muscular + somatic_sensory + cardiovascular + respiratory + gastrointestinal + genitourinary + autonomic + interview_behavior; each caller-assigned 0-4; max 56; Hamilton 1959; no total-score severity bands",
"max_score": 56,
"score": 0
},
{
"components": [
{
"value": 0,
"factor": "anxious_mood",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "tension",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "fears",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "insomnia",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "intellectual",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "depressed_mood",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "somatic_muscular",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "somatic_sensory",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "cardiovascular",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "respiratory",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "gastrointestinal",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "genitourinary",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "autonomic",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "interview_behavior",
"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": "Hamilton M",
"doi": "10.1111/j.2044-8341.1959.tb00467.x",
"id": "hamilton-1959",
"pmid": "13638508",
"source": "Br J Med Psychol. 1959;32(1):50-55",
"title": "The assessment of anxiety states by rating"
},
"formula": "hamilton_anxiety",
"formula_expression": "HAM-A = anxious_mood + tension + fears + insomnia + intellectual + depressed_mood + somatic_muscular + somatic_sensory + cardiovascular + respiratory + gastrointestinal + genitourinary + autonomic + interview_behavior; each caller-assigned 0-4; max 56; Hamilton 1959; no total-score severity bands",
"max_score": 56,
"score": 0
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | hamilton_anxiety |
formula_expression |
string | Exact expression used |
score |
integer | Hamilton 1959 HAM-A sum of fourteen caller-assigned 0-4 items (0-56) |
max_score |
integer | Always 56 |
components |
array | Per-item caller-assigned points |
citation |
object | Hamilton Br J Med Psychol 1959 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": "anxious_mood",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "tension",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "fears",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "insomnia",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "intellectual",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "depressed_mood",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "somatic_muscular",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "somatic_sensory",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "cardiovascular",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "respiratory",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "gastrointestinal",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "genitourinary",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "autonomic",
"points": 0,
"present": true
},
{
"value": 0,
"factor": "interview_behavior",
"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": "Hamilton M",
"doi": "10.1111/j.2044-8341.1959.tb00467.x",
"id": "hamilton-1959",
"pmid": "13638508",
"source": "Br J Med Psychol. 1959;32(1):50-55",
"title": "The assessment of anxiety states by rating"
},
"formula": "hamilton_anxiety",
"formula_expression": "HAM-A = anxious_mood + tension + fears + insomnia + intellectual + depressed_mood + somatic_muscular + somatic_sensory + cardiovascular + respiratory + gastrointestinal + genitourinary + autonomic + interview_behavior; each caller-assigned 0-4; max 56; Hamilton 1959; no total-score severity bands",
"max_score": 56,
"score": 0
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_hamilton_anxiety |
Each Hamilton 1959 anxiety item must be an integer 0–4 as published. 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
- GAD-7 — Sum seven caller-assigned Spitzer 2006 GAD-7 integers (0-3) and return the published 0-21 total, 5/10/15 severity cuts, and ≥10 case-finding flag.
- PHQ-9 — Sum nine caller-assigned Kroenke 2001 PHQ-9 integers (0-3) and return the published total (max 27), severity cutpoints, and ≥10 screen.
- 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).
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.