{
  "x402Version": 2,
  "id": 39129,
  "slug": "39129",
  "resource": "https://api.magentlab.com/api/calc/hacor",
  "description": "Duan 2017 HACOR (ESM Table 2): HR ≤120 → 0, ≥121 → 1; pH ≥7.35 → 0, 7.30–7.34 → 2, 7.25–7.29 → 3, <7.25 → 4; GCS 15 → 0, 13–14 → 2, 11–12 → 5, ≤10 → 10; P/F ≥201 → 0, 176–200 → 2, 151–175 → 3, 126–150 → 4, 101–125 → 5, ≤100 → 6; RR ≤30 → 0, 31–35 → 1, 36–40 → 2, 41–45 → 3, ≥46 → 4. Max 25. Low ≤5, high >5. Not an intubation or NIV-failure order. magent does not read an ABG, GCS the patient, or a ventilator.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "gcs": 15,
                "heart_rate_bpm": 80,
                "pf_ratio": 300,
                "ph": 7.4,
                "respiratory_rate": 18
              },
              {
                "gcs": 15,
                "heart_rate_bpm": 80,
                "pf_ratio": 300,
                "ph": 7.4,
                "respiratory_rate": 18
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "citation": {
                  "authors": "Duan J, Han X, Bai L, Zhou L, Huang S",
                  "doi": "10.1007/s00134-016-4601-3",
                  "id": "duan-2017",
                  "pmid": "27812731",
                  "source": "Intensive Care Med. 2017;43(2):192-199",
                  "title": "Assessment of heart rate, acidosis, consciousness, oxygenation, and respiratory rate to predict noninvasive ventilation failure in hypoxemic patients"
                },
                "components": [
                  {
                    "factor": "heart_rate_bpm",
                    "points": 0,
                    "present": false,
                    "value": 80
                  },
                  {
                    "factor": "ph",
                    "points": 0,
                    "present": false,
                    "value": 7.4
                  },
                  {
                    "factor": "gcs",
                    "points": 0,
                    "present": false,
                    "value": 15
                  },
                  {
                    "factor": "pf_ratio",
                    "points": 0,
                    "present": false,
                    "value": 300
                  },
                  {
                    "factor": "respiratory_rate",
                    "points": 0,
                    "present": false,
                    "value": 18
                  }
                ],
                "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.",
                "formula": "hacor",
                "formula_expression": "HACOR = HR(≤120→0, ≥121→1) + pH(≥7.35→0, 7.30–7.34→2, 7.25–7.29→3, <7.25→4) + GCS(15→0, 13–14→2, 11–12→5, ≤10→10) + P/F(≥201→0, 176–200→2, 151–175→3, 126–150→4, 101–125→5, ≤100→6) + RR(≤30→0, 31–35→1, 36–40→2, 41–45→3, ≥46→4); Duan 2017 ESM Table 2; max 25; low ≤5, high >5",
                "gcs": 15,
                "hacor_band": "low",
                "heart_rate_bpm": 80,
                "max_score": 25,
                "pf_ratio": 300,
                "ph": 7.4,
                "respiratory_rate": 18,
                "score": 0
              },
              {
                "citation": {
                  "authors": "Duan J, Han X, Bai L, Zhou L, Huang S",
                  "doi": "10.1007/s00134-016-4601-3",
                  "id": "duan-2017",
                  "pmid": "27812731",
                  "source": "Intensive Care Med. 2017;43(2):192-199",
                  "title": "Assessment of heart rate, acidosis, consciousness, oxygenation, and respiratory rate to predict noninvasive ventilation failure in hypoxemic patients"
                },
                "components": [
                  {
                    "factor": "heart_rate_bpm",
                    "points": 0,
                    "present": false,
                    "value": 80
                  },
                  {
                    "factor": "ph",
                    "points": 0,
                    "present": false,
                    "value": 7.4
                  },
                  {
                    "factor": "gcs",
                    "points": 0,
                    "present": false,
                    "value": 15
                  },
                  {
                    "factor": "pf_ratio",
                    "points": 0,
                    "present": false,
                    "value": 300
                  },
                  {
                    "factor": "respiratory_rate",
                    "points": 0,
                    "present": false,
                    "value": 18
                  }
                ],
                "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.",
                "formula": "hacor",
                "formula_expression": "HACOR = HR(≤120→0, ≥121→1) + pH(≥7.35→0, 7.30–7.34→2, 7.25–7.29→3, <7.25→4) + GCS(15→0, 13–14→2, 11–12→5, ≤10→10) + P/F(≥201→0, 176–200→2, 151–175→3, 126–150→4, 101–125→5, ≤100→6) + RR(≤30→0, 31–35→1, 36–40→2, 41–45→3, ≥46→4); Duan 2017 ESM Table 2; max 25; low ≤5, high >5",
                "gcs": 15,
                "hacor_band": "low",
                "heart_rate_bpm": 80,
                "max_score": 25,
                "pf_ratio": 300,
                "ph": 7.4,
                "respiratory_rate": 18,
                "score": 0
              }
            ],
            "path": "/api/calc/hacor"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "gcs": {
                          "description": "Total Glasgow Coma Scale 3-15 as assigned by the caller. Duan 2017 ESM Table 2: 15 → 0, 13-14 → 2, 11-12 → 5, ≤10 → 10. Not a GCS 10-12 / ≤9 table. magent does not GCS the patient.",
                          "type": "integer"
                        },
                        "heart_rate_bpm": {
                          "description": "Heart rate in beats/min (integer 30-220). Duan 2017 ESM Table 2: ≤120 → 0, ≥121 → 1.",
                          "type": "integer"
                        },
                        "pf_ratio": {
                          "description": "PaO2/FiO2 ratio (20-800). Duan 2017 ESM Table 2: ≥201 → 0, 176-200 → 2, 151-175 → 3, 126-150 → 4, 101-125 → 5, ≤100 → 6. magent does not read an ABG or a ventilator.",
                          "type": "number"
                        },
                        "ph": {
                          "description": "Arterial pH (6.80-7.80). Duan 2017 ESM Table 2: ≥7.35 → 0, 7.30-7.34 → 2, 7.25-7.29 → 3, <7.25 → 4. magent does not read an ABG.",
                          "type": "number"
                        },
                        "respiratory_rate": {
                          "description": "Respiratory rate in breaths/min (integer 4-80). Duan 2017 ESM Table 2: ≤30 → 0, 31-35 → 1, 36-40 → 2, 41-45 → 3, ≥46 → 4.",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "heart_rate_bpm",
                        "ph",
                        "gcs",
                        "pf_ratio",
                        "respiratory_rate"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "hacor",
    "niv",
    "respiratory",
    "hypoxemia",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T05:26:40.804Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-13T05:26:40.668Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "gcs": 15,
                  "heart_rate_bpm": 80,
                  "pf_ratio": 300,
                  "ph": 7.4,
                  "respiratory_rate": 18
                },
                {
                  "gcs": 15,
                  "heart_rate_bpm": 80,
                  "pf_ratio": 300,
                  "ph": 7.4,
                  "respiratory_rate": 18
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "citation": {
                    "authors": "Duan J, Han X, Bai L, Zhou L, Huang S",
                    "doi": "10.1007/s00134-016-4601-3",
                    "id": "duan-2017",
                    "pmid": "27812731",
                    "source": "Intensive Care Med. 2017;43(2):192-199",
                    "title": "Assessment of heart rate, acidosis, consciousness, oxygenation, and respiratory rate to predict noninvasive ventilation failure in hypoxemic patients"
                  },
                  "components": [
                    {
                      "factor": "heart_rate_bpm",
                      "points": 0,
                      "present": false,
                      "value": 80
                    },
                    {
                      "factor": "ph",
                      "points": 0,
                      "present": false,
                      "value": 7.4
                    },
                    {
                      "factor": "gcs",
                      "points": 0,
                      "present": false,
                      "value": 15
                    },
                    {
                      "factor": "pf_ratio",
                      "points": 0,
                      "present": false,
                      "value": 300
                    },
                    {
                      "factor": "respiratory_rate",
                      "points": 0,
                      "present": false,
                      "value": 18
                    }
                  ],
                  "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.",
                  "formula": "hacor",
                  "formula_expression": "HACOR = HR(≤120→0, ≥121→1) + pH(≥7.35→0, 7.30–7.34→2, 7.25–7.29→3, <7.25→4) + GCS(15→0, 13–14→2, 11–12→5, ≤10→10) + P/F(≥201→0, 176–200→2, 151–175→3, 126–150→4, 101–125→5, ≤100→6) + RR(≤30→0, 31–35→1, 36–40→2, 41–45→3, ≥46→4); Duan 2017 ESM Table 2; max 25; low ≤5, high >5",
                  "gcs": 15,
                  "hacor_band": "low",
                  "heart_rate_bpm": 80,
                  "max_score": 25,
                  "pf_ratio": 300,
                  "ph": 7.4,
                  "respiratory_rate": 18,
                  "score": 0
                },
                {
                  "citation": {
                    "authors": "Duan J, Han X, Bai L, Zhou L, Huang S",
                    "doi": "10.1007/s00134-016-4601-3",
                    "id": "duan-2017",
                    "pmid": "27812731",
                    "source": "Intensive Care Med. 2017;43(2):192-199",
                    "title": "Assessment of heart rate, acidosis, consciousness, oxygenation, and respiratory rate to predict noninvasive ventilation failure in hypoxemic patients"
                  },
                  "components": [
                    {
                      "factor": "heart_rate_bpm",
                      "points": 0,
                      "present": false,
                      "value": 80
                    },
                    {
                      "factor": "ph",
                      "points": 0,
                      "present": false,
                      "value": 7.4
                    },
                    {
                      "factor": "gcs",
                      "points": 0,
                      "present": false,
                      "value": 15
                    },
                    {
                      "factor": "pf_ratio",
                      "points": 0,
                      "present": false,
                      "value": 300
                    },
                    {
                      "factor": "respiratory_rate",
                      "points": 0,
                      "present": false,
                      "value": 18
                    }
                  ],
                  "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.",
                  "formula": "hacor",
                  "formula_expression": "HACOR = HR(≤120→0, ≥121→1) + pH(≥7.35→0, 7.30–7.34→2, 7.25–7.29→3, <7.25→4) + GCS(15→0, 13–14→2, 11–12→5, ≤10→10) + P/F(≥201→0, 176–200→2, 151–175→3, 126–150→4, 101–125→5, ≤100→6) + RR(≤30→0, 31–35→1, 36–40→2, 41–45→3, ≥46→4); Duan 2017 ESM Table 2; max 25; low ≤5, high >5",
                  "gcs": 15,
                  "hacor_band": "low",
                  "heart_rate_bpm": 80,
                  "max_score": 25,
                  "pf_ratio": 300,
                  "ph": 7.4,
                  "respiratory_rate": 18,
                  "score": 0
                }
              ],
              "path": "/api/calc/hacor"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "gcs": {
                            "description": "Total Glasgow Coma Scale 3-15 as assigned by the caller. Duan 2017 ESM Table 2: 15 → 0, 13-14 → 2, 11-12 → 5, ≤10 → 10. Not a GCS 10-12 / ≤9 table. magent does not GCS the patient.",
                            "type": "integer"
                          },
                          "heart_rate_bpm": {
                            "description": "Heart rate in beats/min (integer 30-220). Duan 2017 ESM Table 2: ≤120 → 0, ≥121 → 1.",
                            "type": "integer"
                          },
                          "pf_ratio": {
                            "description": "PaO2/FiO2 ratio (20-800). Duan 2017 ESM Table 2: ≥201 → 0, 176-200 → 2, 151-175 → 3, 126-150 → 4, 101-125 → 5, ≤100 → 6. magent does not read an ABG or a ventilator.",
                            "type": "number"
                          },
                          "ph": {
                            "description": "Arterial pH (6.80-7.80). Duan 2017 ESM Table 2: ≥7.35 → 0, 7.30-7.34 → 2, 7.25-7.29 → 3, <7.25 → 4. magent does not read an ABG.",
                            "type": "number"
                          },
                          "respiratory_rate": {
                            "description": "Respiratory rate in breaths/min (integer 4-80). Duan 2017 ESM Table 2: ≤30 → 0, 31-35 → 1, 36-40 → 2, 41-45 → 3, ≥46 → 4.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "heart_rate_bpm",
                          "ph",
                          "gcs",
                          "pf_ratio",
                          "respiratory_rate"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}