# Clinical Calculator API
> Standard clinical and nursing calculators as an API — the everyday medical maths, computed locally. The bsa endpoint computes body surface area from weight and height by the Mosteller, Du Bois and Haycock formulas (used for chemotherapy and drug dosing). The egfr endpoint estimates kidney function from serum creatinine, age and sex using the race-free CKD-EPI 2021 equation, and the Cockcroft-Gault creatinine clearance when a weight is given (creatinine in mg/dL or µmol/L). The drip-rate endpoint computes an IV infusion's drops per minute and millilitres per hour from the volume, time and drop factor. The gcs endpoint scores the Glasgow Coma Scale from its eye, verbal and motor components and gives the severity band. Everything is computed locally and deterministically, so it is instant and private. INFORMATIONAL ONLY — not medical advice; always verify with clinical judgement and approved tools. Ideal for healthcare and nursing apps, clinical decision-support prototypes, medical education, and EHR tooling. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is clinical maths; for drug reference data use a drug API and for BMI, BMR and calories use a health-calculator API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/medcalc-api/..."
```

## Pricing
- **Free** (Free) — 8,835 calls/Mo, 2 req/s
- **Starter** ($10/Mo) — 18,450 calls/Mo, 8 req/s
- **Pro** ($30/Mo) — 234,500 calls/Mo, 20 req/s
- **Mega** ($68/Mo) — 1,215,000 calls/Mo, 50 req/s

## Endpoints

### Clinical

#### `GET /v1/bsa` — Body surface area

**Parameters:**
- `weight` (query, required, string) — kg Example: `70`
- `height` (query, required, string) — cm Example: `170`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/medcalc-api/v1/bsa?weight=70&height=170"
```

**Response:**
```json
{
    "data": {
        "bsa_m2": {
            "du_bois": 1.8097,
            "haycock": 1.8257,
            "mosteller": 1.8181
        },
        "height_cm": 170,
        "weight_kg": 70,
        "disclaimer": "informational only, not medical advice"
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:02.208Z",
        "request_id": "6c6831dc-59e3-4eb7-b98b-aaacffd16e90"
    },
    "status": "ok",
    "message": "Body surface area",
    "success": true
}
```

#### `GET /v1/drip-rate` — IV infusion drip rate

**Parameters:**
- `volume` (query, required, string) — mL Example: `1000`
- `hours` (query, optional, string) — or minutes Example: `8`
- `drop_factor` (query, optional, string) — gtt/mL (default 20) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/medcalc-api/v1/drip-rate?volume=1000&hours=8&drop_factor=20"
```

**Response:**
```json
{
    "data": {
        "time_min": 480,
        "volume_ml": 1000,
        "disclaimer": "informational only, not medical advice",
        "ml_per_hour": 125,
        "drops_per_minute": 41.667,
        "drop_factor_gtt_ml": 20,
        "drops_per_minute_rounded": 42
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:02.337Z",
        "request_id": "3688c346-68c0-46f7-aba4-1bdacfbda02f"
    },
    "status": "ok",
    "message": "IV drip rate",
    "success": true
}
```

#### `GET /v1/egfr` — eGFR + creatinine clearance

**Parameters:**
- `creatinine` (query, required, string) — Serum creatinine Example: `1.0`
- `creatinine_unit` (query, optional, string) — mg/dL|umol/L Example: `mg/dL`
- `age` (query, required, string) — years Example: `50`
- `sex` (query, required, string) — male|female Example: `male`
- `weight` (query, optional, string) — kg (Cockcroft-Gault) Example: `70`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/medcalc-api/v1/egfr?creatinine=1.0&creatinine_unit=mg%2FdL&age=50&sex=male&weight=70"
```

**Response:**
```json
{
    "data": {
        "age": 50,
        "sex": "male",
        "crcl_unit": "mL/min",
        "egfr_unit": "mL/min/1.73m²",
        "disclaimer": "informational only, not medical advice",
        "creatinine_mg_dl": 1,
        "egfr_ckd_epi_2021": 91.69,
        "creatinine_clearance_cockcroft_gault": 87.5
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:02.441Z",
        "request_id": "c62ddb69-ffc1-4613-a8e5-fab5f8ba1a2b"
    },
    "status": "ok",
    "message": "eGFR",
    "success": true
}
```

#### `GET /v1/gcs` — Glasgow Coma Scale

**Parameters:**
- `eye` (query, required, string) — 1-4 Example: `4`
- `verbal` (query, required, string) — 1-5 Example: `5`
- `motor` (query, required, string) — 1-6 Example: `6`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/medcalc-api/v1/gcs?eye=4&verbal=5&motor=6"
```

**Response:**
```json
{
    "data": {
        "eye": 4,
        "max": 15,
        "motor": 6,
        "total": 15,
        "verbal": 5,
        "severity": "minor (13-15)",
        "disclaimer": "informational only, not medical advice"
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:02.549Z",
        "request_id": "6178e75f-e9d3-465a-948d-cffeb4cc00bb"
    },
    "status": "ok",
    "message": "Glasgow Coma Scale",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/medcalc-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "name": "Clinical Calculator API",
        "notes": "INFORMATIONAL ONLY — not medical advice. eGFR uses CKD-EPI 2021 (race-free). BSA in m². Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/bsa",
                "params": {
                    "height": "cm",
                    "weight": "kg"
                },
                "returns": "body surface area (Mosteller, Du Bois, Haycock)"
            },
            {
                "path": "/v1/egfr",
                "params": {
                    "age": "years",
                    "sex": "male|female",
                    "weight": "kg (for Cockcroft-Gault)",
                    "creatinine": "serum creatinine",
                    "creatinine_unit": "mg/dL|umol/L"
                },
                "returns": "eGFR and creatinine clearance"
            },
            {
                "path": "/v1/drip-rate",
                "params": {
                    "volume": "mL",
                    "minutes": "or hours",
                    "drop_factor": "gtt/mL (default 20)"
                },
                "returns": "drops per minute and mL/hour"
            },
            {
                "path": "/v1/gcs",
                "params": {
                    "eye": "1-4",
                    "motor": "1-6",
                    "verbal": "1-5"
                },
                "returns": "the GCS total and severity"
            },
     
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/medcalc-api
OpenAPI spec: https://www.oanor.com/api/medcalc-api/openapi.json
