{
  "x402Version": 2,
  "id": 39251,
  "slug": "39251",
  "resource": "https://api.magentlab.com/api/calc/cgram",
  "description": "Liang 2020 COVID-GRAM logistic probability of critical illness (ICU, invasive ventilation, or death) among hospitalized COVID-19 from age, caller-assigned chest radiograph abnormality, hemoptysis, dyspnea, unconsciousness, comorbidity count, cancer history, neutrophil-to-lymphocyte ratio, LDH (U/L), and direct bilirubin (umol/L). Table 3 coefficients. magent does not read the film or count comorbidities. Not a diagnosis or ICU-allocation order.",
  "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": 30,
                "cancer_history": false,
                "chest_xray_abnormal": false,
                "direct_bilirubin_umol_l": 3,
                "dyspnea": false,
                "hemoptysis": false,
                "ldh_u_l": 150,
                "nlr": 2,
                "number_of_comorbidities": 0,
                "unconsciousness": false
              },
              {
                "age": 30,
                "cancer_history": false,
                "chest_xray_abnormal": false,
                "direct_bilirubin_umol_l": 3,
                "dyspnea": false,
                "hemoptysis": false,
                "ldh_u_l": 150,
                "nlr": 2,
                "number_of_comorbidities": 0,
                "unconsciousness": false
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age": 30,
                "cancer_history": false,
                "chest_xray_abnormal": false,
                "citation": {
                  "authors": "Liang W, Liang H, Ou L, Chen B, Chen A, Li C, et al.",
                  "doi": "10.1001/jamainternmed.2020.2033",
                  "id": "liang-2020-covid-gram",
                  "pmid": "32396163",
                  "source": "JAMA Intern Med. 2020;180(8):1081-1089",
                  "title": "Development and Validation of a Clinical Risk Score to Predict the Occurrence of Critical Illness in Hospitalized Patients With COVID-19"
                },
                "direct_bilirubin_umol_l": 3,
                "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.",
                "dyspnea": false,
                "estimated_probability_percent": 0.7,
                "formula": "covid_gram",
                "formula_expression": "lp = 1.2205*chest_xray_abnormal + 0.0276*age + 1.5116*hemoptysis + 0.632*dyspnea + 1.5494*unconsciousness + 0.4668*number_of_comorbidities + 1.4037*cancer_history + 0.0562*nlr + 0.0024*ldh_u_l + 0.1376*direct_bilirubin_umol_l - 6.6127; probability = exp(lp)/(1+exp(lp)); Liang 2020 Table 3 logistic (printed ORs; intercept -6.6127 matches constant 0.001); critical illness = ICU, invasive ventilation, or death; LDH U/L; direct bilirubin umol/L; magent does not read the chest film or count comorbidities; Liang 2020 did not publish low/medium/high cutoffs",
                "hemoptysis": false,
                "ldh_u_l": 150,
                "logit": -4.8995,
                "nlr": 2,
                "number_of_comorbidities": 0,
                "unconsciousness": false
              },
              {
                "age": 30,
                "cancer_history": false,
                "chest_xray_abnormal": false,
                "citation": {
                  "authors": "Liang W, Liang H, Ou L, Chen B, Chen A, Li C, et al.",
                  "doi": "10.1001/jamainternmed.2020.2033",
                  "id": "liang-2020-covid-gram",
                  "pmid": "32396163",
                  "source": "JAMA Intern Med. 2020;180(8):1081-1089",
                  "title": "Development and Validation of a Clinical Risk Score to Predict the Occurrence of Critical Illness in Hospitalized Patients With COVID-19"
                },
                "direct_bilirubin_umol_l": 3,
                "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.",
                "dyspnea": false,
                "estimated_probability_percent": 0.7,
                "formula": "covid_gram",
                "formula_expression": "lp = 1.2205*chest_xray_abnormal + 0.0276*age + 1.5116*hemoptysis + 0.632*dyspnea + 1.5494*unconsciousness + 0.4668*number_of_comorbidities + 1.4037*cancer_history + 0.0562*nlr + 0.0024*ldh_u_l + 0.1376*direct_bilirubin_umol_l - 6.6127; probability = exp(lp)/(1+exp(lp)); Liang 2020 Table 3 logistic (printed ORs; intercept -6.6127 matches constant 0.001); critical illness = ICU, invasive ventilation, or death; LDH U/L; direct bilirubin umol/L; magent does not read the chest film or count comorbidities; Liang 2020 did not publish low/medium/high cutoffs",
                "hemoptysis": false,
                "ldh_u_l": 150,
                "logit": -4.8995,
                "nlr": 2,
                "number_of_comorbidities": 0,
                "unconsciousness": false
              }
            ],
            "path": "/api/calc/cgram"
          },
          "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 (integer 1-120). Liang 2020 Table 3: +0.0276 per year (OR 1.03 per year). Development cohort ages 1-95.",
                          "type": "integer"
                        },
                        "cancer_history": {
                          "description": "Cancer history as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.4037 (OR 4.07), separate from the comorbidity count.",
                          "type": "boolean"
                        },
                        "chest_xray_abnormal": {
                          "description": "Chest radiograph abnormality as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.2205 (OR 3.39). magent does not read the film.",
                          "type": "boolean"
                        },
                        "direct_bilirubin_umol_l": {
                          "description": "Direct bilirubin in umol/L (0-200). Liang 2020 Table 3: +0.1376 per umol/L (OR 1.15). magent does not convert mg/dL.",
                          "type": "number"
                        },
                        "dyspnea": {
                          "description": "Dyspnea (shortness of breath) as assigned by the caller (true or false). Liang 2020 Table 3: true adds 0.632 (OR 1.88).",
                          "type": "boolean"
                        },
                        "hemoptysis": {
                          "description": "Hemoptysis as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.5116 (OR 4.53).",
                          "type": "boolean"
                        },
                        "ldh_u_l": {
                          "description": "Lactate dehydrogenase in U/L (1-5000). Liang 2020 Table 3: +0.0024 per U/L (OR 1.002). magent does not convert other LDH units.",
                          "type": "number"
                        },
                        "nlr": {
                          "description": "Neutrophil-to-lymphocyte ratio (0.01-200). Liang 2020 Table 3: +0.0562 per unit (OR 1.06). Caller assigns the ratio; magent does not compute it from counts.",
                          "type": "number"
                        },
                        "number_of_comorbidities": {
                          "description": "Caller-assigned count of comorbidities as Liang 2020 defined (integer 0-10): COPD, diabetes, hypertension, cardiovascular disease, cerebrovascular disease, hepatitis B, cancer, chronic kidney disease, immunodeficiency. Table 3: +0.4668 per comorbidity (OR 1.60). magent does not count diagnoses.",
                          "type": "integer"
                        },
                        "unconsciousness": {
                          "description": "Unconsciousness as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.5494 (OR 4.71).",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "age",
                        "chest_xray_abnormal",
                        "hemoptysis",
                        "dyspnea",
                        "unconsciousness",
                        "number_of_comorbidities",
                        "cancer_history",
                        "nlr",
                        "ldh_u_l",
                        "direct_bilirubin_umol_l"
                      ],
                      "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": [
    "covid-gram",
    "covid-19",
    "critical-illness",
    "infection",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T01:26:20.369Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-13T01:26:20.228Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age": 30,
                  "cancer_history": false,
                  "chest_xray_abnormal": false,
                  "direct_bilirubin_umol_l": 3,
                  "dyspnea": false,
                  "hemoptysis": false,
                  "ldh_u_l": 150,
                  "nlr": 2,
                  "number_of_comorbidities": 0,
                  "unconsciousness": false
                },
                {
                  "age": 30,
                  "cancer_history": false,
                  "chest_xray_abnormal": false,
                  "direct_bilirubin_umol_l": 3,
                  "dyspnea": false,
                  "hemoptysis": false,
                  "ldh_u_l": 150,
                  "nlr": 2,
                  "number_of_comorbidities": 0,
                  "unconsciousness": false
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age": 30,
                  "cancer_history": false,
                  "chest_xray_abnormal": false,
                  "citation": {
                    "authors": "Liang W, Liang H, Ou L, Chen B, Chen A, Li C, et al.",
                    "doi": "10.1001/jamainternmed.2020.2033",
                    "id": "liang-2020-covid-gram",
                    "pmid": "32396163",
                    "source": "JAMA Intern Med. 2020;180(8):1081-1089",
                    "title": "Development and Validation of a Clinical Risk Score to Predict the Occurrence of Critical Illness in Hospitalized Patients With COVID-19"
                  },
                  "direct_bilirubin_umol_l": 3,
                  "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.",
                  "dyspnea": false,
                  "estimated_probability_percent": 0.7,
                  "formula": "covid_gram",
                  "formula_expression": "lp = 1.2205*chest_xray_abnormal + 0.0276*age + 1.5116*hemoptysis + 0.632*dyspnea + 1.5494*unconsciousness + 0.4668*number_of_comorbidities + 1.4037*cancer_history + 0.0562*nlr + 0.0024*ldh_u_l + 0.1376*direct_bilirubin_umol_l - 6.6127; probability = exp(lp)/(1+exp(lp)); Liang 2020 Table 3 logistic (printed ORs; intercept -6.6127 matches constant 0.001); critical illness = ICU, invasive ventilation, or death; LDH U/L; direct bilirubin umol/L; magent does not read the chest film or count comorbidities; Liang 2020 did not publish low/medium/high cutoffs",
                  "hemoptysis": false,
                  "ldh_u_l": 150,
                  "logit": -4.8995,
                  "nlr": 2,
                  "number_of_comorbidities": 0,
                  "unconsciousness": false
                },
                {
                  "age": 30,
                  "cancer_history": false,
                  "chest_xray_abnormal": false,
                  "citation": {
                    "authors": "Liang W, Liang H, Ou L, Chen B, Chen A, Li C, et al.",
                    "doi": "10.1001/jamainternmed.2020.2033",
                    "id": "liang-2020-covid-gram",
                    "pmid": "32396163",
                    "source": "JAMA Intern Med. 2020;180(8):1081-1089",
                    "title": "Development and Validation of a Clinical Risk Score to Predict the Occurrence of Critical Illness in Hospitalized Patients With COVID-19"
                  },
                  "direct_bilirubin_umol_l": 3,
                  "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.",
                  "dyspnea": false,
                  "estimated_probability_percent": 0.7,
                  "formula": "covid_gram",
                  "formula_expression": "lp = 1.2205*chest_xray_abnormal + 0.0276*age + 1.5116*hemoptysis + 0.632*dyspnea + 1.5494*unconsciousness + 0.4668*number_of_comorbidities + 1.4037*cancer_history + 0.0562*nlr + 0.0024*ldh_u_l + 0.1376*direct_bilirubin_umol_l - 6.6127; probability = exp(lp)/(1+exp(lp)); Liang 2020 Table 3 logistic (printed ORs; intercept -6.6127 matches constant 0.001); critical illness = ICU, invasive ventilation, or death; LDH U/L; direct bilirubin umol/L; magent does not read the chest film or count comorbidities; Liang 2020 did not publish low/medium/high cutoffs",
                  "hemoptysis": false,
                  "ldh_u_l": 150,
                  "logit": -4.8995,
                  "nlr": 2,
                  "number_of_comorbidities": 0,
                  "unconsciousness": false
                }
              ],
              "path": "/api/calc/cgram"
            },
            "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 (integer 1-120). Liang 2020 Table 3: +0.0276 per year (OR 1.03 per year). Development cohort ages 1-95.",
                            "type": "integer"
                          },
                          "cancer_history": {
                            "description": "Cancer history as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.4037 (OR 4.07), separate from the comorbidity count.",
                            "type": "boolean"
                          },
                          "chest_xray_abnormal": {
                            "description": "Chest radiograph abnormality as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.2205 (OR 3.39). magent does not read the film.",
                            "type": "boolean"
                          },
                          "direct_bilirubin_umol_l": {
                            "description": "Direct bilirubin in umol/L (0-200). Liang 2020 Table 3: +0.1376 per umol/L (OR 1.15). magent does not convert mg/dL.",
                            "type": "number"
                          },
                          "dyspnea": {
                            "description": "Dyspnea (shortness of breath) as assigned by the caller (true or false). Liang 2020 Table 3: true adds 0.632 (OR 1.88).",
                            "type": "boolean"
                          },
                          "hemoptysis": {
                            "description": "Hemoptysis as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.5116 (OR 4.53).",
                            "type": "boolean"
                          },
                          "ldh_u_l": {
                            "description": "Lactate dehydrogenase in U/L (1-5000). Liang 2020 Table 3: +0.0024 per U/L (OR 1.002). magent does not convert other LDH units.",
                            "type": "number"
                          },
                          "nlr": {
                            "description": "Neutrophil-to-lymphocyte ratio (0.01-200). Liang 2020 Table 3: +0.0562 per unit (OR 1.06). Caller assigns the ratio; magent does not compute it from counts.",
                            "type": "number"
                          },
                          "number_of_comorbidities": {
                            "description": "Caller-assigned count of comorbidities as Liang 2020 defined (integer 0-10): COPD, diabetes, hypertension, cardiovascular disease, cerebrovascular disease, hepatitis B, cancer, chronic kidney disease, immunodeficiency. Table 3: +0.4668 per comorbidity (OR 1.60). magent does not count diagnoses.",
                            "type": "integer"
                          },
                          "unconsciousness": {
                            "description": "Unconsciousness as assigned by the caller (true or false). Liang 2020 Table 3: true adds 1.5494 (OR 4.71).",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "age",
                          "chest_xray_abnormal",
                          "hemoptysis",
                          "dyspnea",
                          "unconsciousness",
                          "number_of_comorbidities",
                          "cancer_history",
                          "nlr",
                          "ldh_u_l",
                          "direct_bilirubin_umol_l"
                        ],
                        "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"
  }
}