{
  "x402Version": 2,
  "id": 39584,
  "slug": "39584",
  "resource": "https://api.magentlab.com/api/calc/rapid",
  "description": "Rahman 2014 RAPID score for pleural infection: urea (<5=0, 5-8=1, >8=2 mmol/L), age (<50=0, 50-70=1, >70=2), non-purulent fluid 1, hospital-acquired 1, albumin <27 g/L 1; total 0-7 with low/medium/high bands. Deterministic published arithmetic with citation; not a drain or surgery decision and not Light's criteria.",
  "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": [
              {
                "age": 40,
                "albumin_g_dl": 3.5,
                "albumin_g_l": 35,
                "bun_mg_dl": 11.2,
                "hospital_acquired": false,
                "pleural_purulent": true,
                "urea_mmol_l": 4
              },
              {
                "age": 40,
                "albumin_g_dl": 3.5,
                "albumin_g_l": 35,
                "bun_mg_dl": 11.2,
                "hospital_acquired": false,
                "pleural_purulent": true,
                "urea_mmol_l": 4
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age_years": 40,
                "albumin_g_l": 35,
                "citation": {
                  "authors": "Rahman NM, Kahan BC, Pendleton RC, et al.",
                  "doi": "10.1378/chest.13-1558",
                  "id": "rahman-2014",
                  "pmid": "24264558",
                  "source": "Chest. 2014;145(4):848-855",
                  "title": "A clinical score (RAPID) to identify those at risk for poor outcome at presentation in patients with pleural infection"
                },
                "components": [
                  {
                    "factor": "urea",
                    "points": 0,
                    "present": false,
                    "value": 4
                  },
                  {
                    "factor": "age",
                    "points": 0,
                    "present": false,
                    "value": 40
                  },
                  {
                    "factor": "nonpurulent",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "hospital_acquired",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "albumin",
                    "points": 0,
                    "present": false,
                    "value": 35
                  }
                ],
                "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": "rapid",
                "formula_expression": "RAPID = urea_points + age_points + nonpurulent_points + hospital_acquired_points + albumin_points; urea <5 = 0, 5.0-8.0 = 1, >8 = 2; age <50 = 0, 50-70 = 1, >70 = 2; purulent = 0, non-purulent = 1; community = 0, hospital = 1; albumin >=27 g/L = 0, <27 = 1; max 7",
                "hospital_acquired": false,
                "max_score": 7,
                "pleural_purulent": true,
                "risk_band": "low",
                "score": 0,
                "urea_mmol_l": 4
              },
              {
                "age_years": 40,
                "albumin_g_l": 35,
                "citation": {
                  "authors": "Rahman NM, Kahan BC, Pendleton RC, et al.",
                  "doi": "10.1378/chest.13-1558",
                  "id": "rahman-2014",
                  "pmid": "24264558",
                  "source": "Chest. 2014;145(4):848-855",
                  "title": "A clinical score (RAPID) to identify those at risk for poor outcome at presentation in patients with pleural infection"
                },
                "components": [
                  {
                    "factor": "urea",
                    "points": 0,
                    "present": false,
                    "value": 4
                  },
                  {
                    "factor": "age",
                    "points": 0,
                    "present": false,
                    "value": 40
                  },
                  {
                    "factor": "nonpurulent",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "hospital_acquired",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "albumin",
                    "points": 0,
                    "present": false,
                    "value": 35
                  }
                ],
                "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": "rapid",
                "formula_expression": "RAPID = urea_points + age_points + nonpurulent_points + hospital_acquired_points + albumin_points; urea <5 = 0, 5.0-8.0 = 1, >8 = 2; age <50 = 0, 50-70 = 1, >70 = 2; purulent = 0, non-purulent = 1; community = 0, hospital = 1; albumin >=27 g/L = 0, <27 = 1; max 7",
                "hospital_acquired": false,
                "max_score": 7,
                "pleural_purulent": true,
                "risk_band": "low",
                "score": 0,
                "urea_mmol_l": 4
              }
            ],
            "path": "/api/calc/rapid"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "age": {
                          "description": "Age in years (18-120). <50 scores 0; 50-70 inclusive scores 1; >70 scores 2.",
                          "type": "integer"
                        },
                        "albumin_g_dl": {
                          "description": "Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.",
                          "type": "number"
                        },
                        "albumin_g_l": {
                          "description": "Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. ≥27 scores 0; <27 scores 1.",
                          "type": "number"
                        },
                        "bun_mg_dl": {
                          "description": "BUN in mg/dL (3-140). Converted as urea_mmol_l = bun_mg_dl / 2.8.",
                          "type": "number"
                        },
                        "hospital_acquired": {
                          "description": "Hospital-acquired pleural infection (Rahman 2014). true scores 1; false (community) scores 0.",
                          "type": "boolean"
                        },
                        "pleural_purulent": {
                          "description": "Purulent pleural fluid (Rahman 2014). true scores 0; false (non-purulent) scores 1. magent does not inspect the fluid.",
                          "type": "boolean"
                        },
                        "urea_mmol_l": {
                          "description": "Serum urea in mmol/L (1-50). Provide this or bun_mg_dl, not both. <5 scores 0; 5.0-8.0 inclusive scores 1; >8 scores 2 (Rahman 2014).",
                          "type": "number"
                        }
                      },
                      "required": [
                        "age",
                        "pleural_purulent",
                        "hospital_acquired"
                      ],
                      "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": [
    "rapid",
    "pleural-infection",
    "respiratory",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-12T13:36:52.831Z",
  "quality": {
    "calls30d": 3,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-10-12T13:36:52.703Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age": 40,
                  "albumin_g_dl": 3.5,
                  "albumin_g_l": 35,
                  "bun_mg_dl": 11.2,
                  "hospital_acquired": false,
                  "pleural_purulent": true,
                  "urea_mmol_l": 4
                },
                {
                  "age": 40,
                  "albumin_g_dl": 3.5,
                  "albumin_g_l": 35,
                  "bun_mg_dl": 11.2,
                  "hospital_acquired": false,
                  "pleural_purulent": true,
                  "urea_mmol_l": 4
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age_years": 40,
                  "albumin_g_l": 35,
                  "citation": {
                    "authors": "Rahman NM, Kahan BC, Pendleton RC, et al.",
                    "doi": "10.1378/chest.13-1558",
                    "id": "rahman-2014",
                    "pmid": "24264558",
                    "source": "Chest. 2014;145(4):848-855",
                    "title": "A clinical score (RAPID) to identify those at risk for poor outcome at presentation in patients with pleural infection"
                  },
                  "components": [
                    {
                      "factor": "urea",
                      "points": 0,
                      "present": false,
                      "value": 4
                    },
                    {
                      "factor": "age",
                      "points": 0,
                      "present": false,
                      "value": 40
                    },
                    {
                      "factor": "nonpurulent",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "hospital_acquired",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "albumin",
                      "points": 0,
                      "present": false,
                      "value": 35
                    }
                  ],
                  "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": "rapid",
                  "formula_expression": "RAPID = urea_points + age_points + nonpurulent_points + hospital_acquired_points + albumin_points; urea <5 = 0, 5.0-8.0 = 1, >8 = 2; age <50 = 0, 50-70 = 1, >70 = 2; purulent = 0, non-purulent = 1; community = 0, hospital = 1; albumin >=27 g/L = 0, <27 = 1; max 7",
                  "hospital_acquired": false,
                  "max_score": 7,
                  "pleural_purulent": true,
                  "risk_band": "low",
                  "score": 0,
                  "urea_mmol_l": 4
                },
                {
                  "age_years": 40,
                  "albumin_g_l": 35,
                  "citation": {
                    "authors": "Rahman NM, Kahan BC, Pendleton RC, et al.",
                    "doi": "10.1378/chest.13-1558",
                    "id": "rahman-2014",
                    "pmid": "24264558",
                    "source": "Chest. 2014;145(4):848-855",
                    "title": "A clinical score (RAPID) to identify those at risk for poor outcome at presentation in patients with pleural infection"
                  },
                  "components": [
                    {
                      "factor": "urea",
                      "points": 0,
                      "present": false,
                      "value": 4
                    },
                    {
                      "factor": "age",
                      "points": 0,
                      "present": false,
                      "value": 40
                    },
                    {
                      "factor": "nonpurulent",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "hospital_acquired",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "albumin",
                      "points": 0,
                      "present": false,
                      "value": 35
                    }
                  ],
                  "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": "rapid",
                  "formula_expression": "RAPID = urea_points + age_points + nonpurulent_points + hospital_acquired_points + albumin_points; urea <5 = 0, 5.0-8.0 = 1, >8 = 2; age <50 = 0, 50-70 = 1, >70 = 2; purulent = 0, non-purulent = 1; community = 0, hospital = 1; albumin >=27 g/L = 0, <27 = 1; max 7",
                  "hospital_acquired": false,
                  "max_score": 7,
                  "pleural_purulent": true,
                  "risk_band": "low",
                  "score": 0,
                  "urea_mmol_l": 4
                }
              ],
              "path": "/api/calc/rapid"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "age": {
                            "description": "Age in years (18-120). <50 scores 0; 50-70 inclusive scores 1; >70 scores 2.",
                            "type": "integer"
                          },
                          "albumin_g_dl": {
                            "description": "Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.",
                            "type": "number"
                          },
                          "albumin_g_l": {
                            "description": "Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. ≥27 scores 0; <27 scores 1.",
                            "type": "number"
                          },
                          "bun_mg_dl": {
                            "description": "BUN in mg/dL (3-140). Converted as urea_mmol_l = bun_mg_dl / 2.8.",
                            "type": "number"
                          },
                          "hospital_acquired": {
                            "description": "Hospital-acquired pleural infection (Rahman 2014). true scores 1; false (community) scores 0.",
                            "type": "boolean"
                          },
                          "pleural_purulent": {
                            "description": "Purulent pleural fluid (Rahman 2014). true scores 0; false (non-purulent) scores 1. magent does not inspect the fluid.",
                            "type": "boolean"
                          },
                          "urea_mmol_l": {
                            "description": "Serum urea in mmol/L (1-50). Provide this or bun_mg_dl, not both. <5 scores 0; 5.0-8.0 inclusive scores 1; >8 scores 2 (Rahman 2014).",
                            "type": "number"
                          }
                        },
                        "required": [
                          "age",
                          "pleural_purulent",
                          "hospital_acquired"
                        ],
                        "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"
  }
}