Emergency · LIVE
Rapid Emergency Medicine Score (Olsson)
REMS
Compute the Olsson 2004 Rapid Emergency Medicine Score from mean arterial pressure, heart rate, respiratory rate, SpO2, GCS, and age.
Markdown: /docs/rems.md · Canonical: https://magentlab.com/docs/rems
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Olsson 2004 Rapid Emergency Medicine Score from mean arterial pressure, heart rate, respiratory rate, SpO2, GCS, and age.
When to use
When an agent needs the published Olsson 2004 REMS total for nonsurgical adult ED patients and must not substitute MEWS, NEWS, or APACHE II GCS scoring.
When not to use
- Not a medical device and not an ICU-admission, triage, or monitoring order. magent does not examine the patient.
- This is Olsson 2004 Rapid Emergency Medicine Score (Table 1: RAPS vitals + SpO2 + age) only. It is not MEWS, NEWS, NEWS2, or APACHE II.
- GCS uses the RAPS/REMS 0–4 table (14–15 → 0 through 3–4 → 4), not APACHE II's 15−GCS (0–12). Max is 26, not 34.
- Adult ED; age is years 18–120. magent does not convert pediatric REMS variants.
- MAP, heart rate, respiratory rate, SpO2, and GCS are caller-assigned. magent does not compute MAP from SBP/DBP or score eye/verbal/motor.
Formula
REMS = map_points + hr_points + rr_points + spo2_points + gcs_points + age_points; Olsson 2004 Table 1 (RAPS vitals + SpO2 + age); max 26
Citation
- Authors
- Olsson T, Terent A, Lind L
- Source
- J Intern Med. 2004;255(5):579-587
Worked example
Normal adult ED vitals
Given:
age=40gcs=15heart_rate_bpm=80map_mm_hg=90respiratory_rate=16spo2_percent=96
- MAP 90 → 0; HR 80 → 0; RR 16 → 0; SpO2 96 → 0; GCS 15 → 0; age 40 → 0
- Score = 0 (max 26)
GCS 3 is RAPS 4, not 15−GCS
Given:
age=40gcs=3heart_rate_bpm=80map_mm_hg=90respiratory_rate=16spo2_percent=96
- MAP 90 → 0; HR 80 → 0; RR 16 → 0; SpO2 96 → 0; GCS 3 → 4 (RAPS/REMS 3–4 band); age 40 → 0
- Score = 4 (max 26). APACHE II 15−GCS would have assigned 12 for GCS.
Also searched as
- rapid emergency medicine score
- REMS
- Olsson REMS
- RAPS plus age
- ED mortality score
- rapid emergency medicine
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
/api/calc/rems?map_mm_hg=90&heart_rate_bpm=80&respiratory_rate=16&spo2_percent=96&gcs=15&age=40
Full URL: https://api.magentlab.com/api/calc/rems?map_mm_hg=90&heart_rate_bpm=80&respiratory_rate=16&spo2_percent=96&gcs=15&age=40
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/rems?map_mm_hg=90&heart_rate_bpm=80&respiratory_rate=16&spo2_percent=96&gcs=15&age=40"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
map_mm_hg |
integer | required | Mean arterial pressure in mm Hg (integer 30-180). Olsson 2004 Table 1: ≤49 → 4, 50-69 → 2, 70-109 → 0, 110-129 → 2, 130-159 → 3, ≥160 → 4. magent does not compute MAP from SBP/DBP. |
heart_rate_bpm |
integer | required | Heart rate in beats/min (integer 30-220). Olsson 2004 Table 1: ≤39 → 4, 40-54 → 2, 55-69 → 1, 70-109 → 0, 110-139 → 2, 140-179 → 3, ≥180 → 4. |
respiratory_rate |
integer | required | Respiratory rate in breaths/min (integer 0-80). Olsson 2004 Table 1: ≤5 → 4, 6-9 → 2, 10-11 → 1, 12-24 → 0, 25-34 → 1, 35-49 → 3, ≥50 → 4. |
spo2_percent |
integer | required | Pulse oximetry SpO2 percent (integer 50-100). Olsson 2004 Table 1: >89 → 0, 86-89 → 1, 75-85 → 3, <75 → 4. |
gcs |
integer | required | Glasgow Coma Scale total 3-15, caller-assigned. Olsson 2004 REMS/RAPS 0-4: 14-15 → 0, 11-13 → 1, 8-10 → 2, 5-7 → 3, 3-4 → 4. Not APACHE II 15−GCS. magent does not score eye/verbal/motor. |
age |
integer | required | Age in years (integer 18-120). Adult ED. Olsson 2004 Table 1: <45 → 0, 45-54 → 2, 55-64 → 3, 65-74 → 5, >74 → 6. |
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": [
{
"age": "40",
"gcs": "15",
"heart_rate_bpm": "80",
"map_mm_hg": "90",
"respiratory_rate": "16",
"spo2_percent": "96"
},
{
"age": "40",
"gcs": "15",
"heart_rate_bpm": "80",
"map_mm_hg": "90",
"respiratory_rate": "16",
"spo2_percent": "96"
}
]
}
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/rems",
"items": [
{
"components": [
{
"value": 90,
"factor": "map_mm_hg",
"points": 0,
"present": false
},
{
"value": 80,
"factor": "heart_rate_bpm",
"points": 0,
"present": false
},
{
"value": 16,
"factor": "respiratory_rate",
"points": 0,
"present": false
},
{
"value": 96,
"factor": "spo2_percent",
"points": 0,
"present": false
},
{
"value": 15,
"factor": "gcs",
"points": 0,
"present": false
},
{
"value": 40,
"factor": "age",
"points": 0,
"present": false
}
],
"age": 40,
"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": "Olsson T, Terent A, Lind L",
"doi": "10.1111/j.1365-2796.2004.01321.x",
"id": "olsson-2004",
"pmid": "15078500",
"source": "J Intern Med. 2004;255(5):579-587",
"title": "Rapid Emergency Medicine score: a new prognostic tool for in-hospital mortality in nonsurgical emergency department patients"
},
"formula": "rems",
"formula_expression": "REMS = map_points + hr_points + rr_points + spo2_points + gcs_points + age_points; Olsson 2004 Table 1 (RAPS vitals + SpO2 + age); max 26",
"max_score": 26,
"score": 0,
"heart_rate_bpm": 80,
"spo2_percent": 96,
"respiratory_rate": 16,
"gcs": 15,
"map_mm_hg": 90
},
{
"components": [
{
"value": 90,
"factor": "map_mm_hg",
"points": 0,
"present": false
},
{
"value": 80,
"factor": "heart_rate_bpm",
"points": 0,
"present": false
},
{
"value": 16,
"factor": "respiratory_rate",
"points": 0,
"present": false
},
{
"value": 96,
"factor": "spo2_percent",
"points": 0,
"present": false
},
{
"value": 15,
"factor": "gcs",
"points": 0,
"present": false
},
{
"value": 40,
"factor": "age",
"points": 0,
"present": false
}
],
"age": 40,
"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": "Olsson T, Terent A, Lind L",
"doi": "10.1111/j.1365-2796.2004.01321.x",
"id": "olsson-2004",
"pmid": "15078500",
"source": "J Intern Med. 2004;255(5):579-587",
"title": "Rapid Emergency Medicine score: a new prognostic tool for in-hospital mortality in nonsurgical emergency department patients"
},
"formula": "rems",
"formula_expression": "REMS = map_points + hr_points + rr_points + spo2_points + gcs_points + age_points; Olsson 2004 Table 1 (RAPS vitals + SpO2 + age); max 26",
"max_score": 26,
"score": 0,
"heart_rate_bpm": 80,
"spo2_percent": 96,
"respiratory_rate": 16,
"gcs": 15,
"map_mm_hg": 90
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | rems |
formula_expression |
string | Exact expression used |
score |
integer | REMS points 0-26 |
max_score |
integer | Always 26 |
map_mm_hg |
integer | Mean arterial pressure used, mm Hg |
heart_rate_bpm |
integer | Heart rate used, bpm |
respiratory_rate |
integer | Respiratory rate used, breaths/min |
spo2_percent |
integer | SpO2 used, percent |
gcs |
integer | Glasgow Coma Scale total used |
age |
integer | Age used, years |
components |
array | Per-vital points |
citation |
object | Olsson 2004 J Intern Med citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"value": 90,
"factor": "map_mm_hg",
"points": 0,
"present": false
},
{
"value": 80,
"factor": "heart_rate_bpm",
"points": 0,
"present": false
},
{
"value": 16,
"factor": "respiratory_rate",
"points": 0,
"present": false
},
{
"value": 96,
"factor": "spo2_percent",
"points": 0,
"present": false
},
{
"value": 15,
"factor": "gcs",
"points": 0,
"present": false
},
{
"value": 40,
"factor": "age",
"points": 0,
"present": false
}
],
"age": 40,
"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": "Olsson T, Terent A, Lind L",
"doi": "10.1111/j.1365-2796.2004.01321.x",
"id": "olsson-2004",
"pmid": "15078500",
"source": "J Intern Med. 2004;255(5):579-587",
"title": "Rapid Emergency Medicine score: a new prognostic tool for in-hospital mortality in nonsurgical emergency department patients"
},
"formula": "rems",
"formula_expression": "REMS = map_points + hr_points + rr_points + spo2_points + gcs_points + age_points; Olsson 2004 Table 1 (RAPS vitals + SpO2 + age); max 26",
"max_score": 26,
"score": 0,
"heart_rate_bpm": 80,
"spo2_percent": 96,
"respiratory_rate": 16,
"gcs": 15,
"map_mm_hg": 90
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_map_mm_hg |
map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged. |
| 400 | invalid_heart_rate |
heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged. |
| 400 | invalid_rts_respiratory_rate |
respiratory_rate must be an integer from 0 to 80. Returned before settlement; you are not charged. |
| 400 | invalid_spo2 |
spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged. |
| 400 | invalid_gcs_total |
gcs must be an integer from 3 to 15. Returned before settlement; you are not charged. |
| 400 | invalid_age |
age must be an integer from 18 to 120 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
- MEWS — Compute the Subbe 2001 modified Early Warning Score from systolic BP, heart rate, respiratory rate, temperature, and caller-assigned AVPU.
- NEWS — Compute the RCP 2012 National Early Warning Score from respiratory rate, SpO2, supplemental oxygen, temperature, systolic BP, heart rate, and caller-assigned AVPU.
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.