{
  "x402Version": 2,
  "id": 39574,
  "slug": "39574",
  "resource": "https://api.magentlab.com/api/calc/aih_original",
  "description": "Alvarez 1999 revised original IAIHG AIH score, not Hennes 2008 simplified. Caller-assigned sex, ALP:AST/ALT ratio, globulin/IgG, ANA/SMA/LKM titer, AMA, viral markers, drugs, alcohol, additive histology, other autoimmune disease; optional HLA/other autoantibodies if seronegative and treatment response. Pretreatment definite >15 / probable 10-15; posttreatment definite >17 / probable 12-17. magent does not read histology. Not a diagnosis or immunosuppression 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": [
              {
                "alcohol_intake": "gt_60",
                "alp_ratio": "gt_3",
                "ama_positive": true,
                "autoantibody_titer": "lt_1_40",
                "biliary_changes": true,
                "globulin_igg": "lt_1x",
                "hepatotoxic_drugs": true,
                "hla_dr3_or_dr4": false,
                "interface_hepatitis": false,
                "liver_cell_rosettes": false,
                "lymphoplasmacytic_infiltrate": false,
                "other_atypical_histology": true,
                "other_autoantibodies": false,
                "other_autoimmune_disease": false,
                "sex": "male",
                "treatment_response": "none",
                "viral_markers_positive": true
              },
              {
                "alcohol_intake": "gt_60",
                "alp_ratio": "gt_3",
                "ama_positive": true,
                "autoantibody_titer": "lt_1_40",
                "biliary_changes": true,
                "globulin_igg": "lt_1x",
                "hepatotoxic_drugs": true,
                "hla_dr3_or_dr4": false,
                "interface_hepatitis": false,
                "liver_cell_rosettes": false,
                "lymphoplasmacytic_infiltrate": false,
                "other_atypical_histology": true,
                "other_autoantibodies": false,
                "other_autoimmune_disease": false,
                "sex": "male",
                "treatment_response": "none",
                "viral_markers_positive": true
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "aih_band": "not_aih",
                "citation": {
                  "authors": "Alvarez F, Berg PA, Bianchi FB, et al.",
                  "doi": "10.1016/s0168-8278(99)80297-9",
                  "id": "alvarez-1999",
                  "pmid": "10580593",
                  "source": "J Hepatol. 1999;31(5):929-938",
                  "title": "International Autoimmune Hepatitis Group Report: review of criteria for diagnosis of autoimmune hepatitis"
                },
                "components": [
                  {
                    "factor": "sex",
                    "points": 0,
                    "present": false,
                    "value": "male"
                  },
                  {
                    "factor": "alp_ratio",
                    "points": -2,
                    "present": true,
                    "value": "gt_3"
                  },
                  {
                    "factor": "globulin_igg",
                    "points": 0,
                    "present": false,
                    "value": "lt_1x"
                  },
                  {
                    "factor": "autoantibody_titer",
                    "points": 0,
                    "present": false,
                    "value": "lt_1_40"
                  },
                  {
                    "factor": "ama_positive",
                    "points": -4,
                    "present": true
                  },
                  {
                    "factor": "viral_markers_positive",
                    "points": -3,
                    "present": true,
                    "value": true
                  },
                  {
                    "factor": "hepatotoxic_drugs",
                    "points": -4,
                    "present": true,
                    "value": true
                  },
                  {
                    "factor": "alcohol_intake",
                    "points": -2,
                    "present": true,
                    "value": "gt_60"
                  },
                  {
                    "factor": "interface_hepatitis",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "lymphoplasmacytic_infiltrate",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "liver_cell_rosettes",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "typical_histology_absent",
                    "points": -5,
                    "present": true
                  },
                  {
                    "factor": "biliary_changes",
                    "points": -3,
                    "present": true
                  },
                  {
                    "factor": "other_atypical_histology",
                    "points": -3,
                    "present": true
                  },
                  {
                    "factor": "other_autoimmune_disease",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "other_autoantibodies",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "hla_dr3_or_dr4",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "treatment_response",
                    "points": 0,
                    "present": false,
                    "value": "none"
                  }
                ],
                "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": "aih_original",
                "formula_expression": "revised original IAIHG AIH (Alvarez 1999) = sex (male 0, female 2) + alp_ratio (lt_1_5 2, 1_5_to_3 0, gt_3 -2) + globulin_igg (lt_1x 0, 1_to_1_5x 1, 1_5_to_2x 2, gt_2x 3) + autoantibody_titer (lt_1_40 0, 1_40 1, 1_80 2, gt_1_80 3) + ama_positive (true -4) + viral_markers (positive -3, negative 3) + hepatotoxic_drugs (true -4, false 1) + alcohol (lt_25 2, 25_to_60 0, gt_60 -2) + histology (interface 3, lymphoplasmacytic 1, rosettes 1, none of those -5, biliary -3, other atypical -3; additive) + other_autoimmune_disease (true 2) + other_autoantibodies (true 2 if titer lt_1_40) + hla_dr3_or_dr4 (true 1 if titer lt_1_40) + treatment_response (complete 2, relapse 3); max 26; pretreatment definite >15, probable 10-15; posttreatment definite >17, probable 12-17",
                "max_score": 26,
                "score": -26,
                "timing": "pretreatment"
              },
              {
                "aih_band": "not_aih",
                "citation": {
                  "authors": "Alvarez F, Berg PA, Bianchi FB, et al.",
                  "doi": "10.1016/s0168-8278(99)80297-9",
                  "id": "alvarez-1999",
                  "pmid": "10580593",
                  "source": "J Hepatol. 1999;31(5):929-938",
                  "title": "International Autoimmune Hepatitis Group Report: review of criteria for diagnosis of autoimmune hepatitis"
                },
                "components": [
                  {
                    "factor": "sex",
                    "points": 0,
                    "present": false,
                    "value": "male"
                  },
                  {
                    "factor": "alp_ratio",
                    "points": -2,
                    "present": true,
                    "value": "gt_3"
                  },
                  {
                    "factor": "globulin_igg",
                    "points": 0,
                    "present": false,
                    "value": "lt_1x"
                  },
                  {
                    "factor": "autoantibody_titer",
                    "points": 0,
                    "present": false,
                    "value": "lt_1_40"
                  },
                  {
                    "factor": "ama_positive",
                    "points": -4,
                    "present": true
                  },
                  {
                    "factor": "viral_markers_positive",
                    "points": -3,
                    "present": true,
                    "value": true
                  },
                  {
                    "factor": "hepatotoxic_drugs",
                    "points": -4,
                    "present": true,
                    "value": true
                  },
                  {
                    "factor": "alcohol_intake",
                    "points": -2,
                    "present": true,
                    "value": "gt_60"
                  },
                  {
                    "factor": "interface_hepatitis",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "lymphoplasmacytic_infiltrate",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "liver_cell_rosettes",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "typical_histology_absent",
                    "points": -5,
                    "present": true
                  },
                  {
                    "factor": "biliary_changes",
                    "points": -3,
                    "present": true
                  },
                  {
                    "factor": "other_atypical_histology",
                    "points": -3,
                    "present": true
                  },
                  {
                    "factor": "other_autoimmune_disease",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "other_autoantibodies",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "hla_dr3_or_dr4",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "treatment_response",
                    "points": 0,
                    "present": false,
                    "value": "none"
                  }
                ],
                "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": "aih_original",
                "formula_expression": "revised original IAIHG AIH (Alvarez 1999) = sex (male 0, female 2) + alp_ratio (lt_1_5 2, 1_5_to_3 0, gt_3 -2) + globulin_igg (lt_1x 0, 1_to_1_5x 1, 1_5_to_2x 2, gt_2x 3) + autoantibody_titer (lt_1_40 0, 1_40 1, 1_80 2, gt_1_80 3) + ama_positive (true -4) + viral_markers (positive -3, negative 3) + hepatotoxic_drugs (true -4, false 1) + alcohol (lt_25 2, 25_to_60 0, gt_60 -2) + histology (interface 3, lymphoplasmacytic 1, rosettes 1, none of those -5, biliary -3, other atypical -3; additive) + other_autoimmune_disease (true 2) + other_autoantibodies (true 2 if titer lt_1_40) + hla_dr3_or_dr4 (true 1 if titer lt_1_40) + treatment_response (complete 2, relapse 3); max 26; pretreatment definite >15, probable 10-15; posttreatment definite >17, probable 12-17",
                "max_score": 26,
                "score": -26,
                "timing": "pretreatment"
              }
            ],
            "path": "/api/calc/aih_original"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "alcohol_intake": {
                          "description": "Caller-assigned average alcohol intake (Alvarez 1999). lt_25 (<25 g/day) scores 2; 25_to_60 scores 0 (gap between the tabulated <25 and >60 cells); gt_60 (>60 g/day) scores -2.",
                          "enum": [
                            "lt_25",
                            "25_to_60",
                            "gt_60"
                          ],
                          "type": "string"
                        },
                        "alp_ratio": {
                          "description": "Caller-assigned ALP:(AST or ALT) ratio as multiples of ULN (Alvarez 1999 note 1). lt_1_5 (<1.5) scores 2; 1_5_to_3 (1.5–3.0) scores 0; gt_3 (>3) scores -2. magent does not take raw enzymes.",
                          "enum": [
                            "lt_1_5",
                            "1_5_to_3",
                            "gt_3"
                          ],
                          "type": "string"
                        },
                        "ama_positive": {
                          "description": "Caller-assigned antimitochondrial antibody. true scores -4; false scores 0 (Alvarez 1999). magent does not assay AMA.",
                          "type": "boolean"
                        },
                        "autoantibody_titer": {
                          "description": "Caller-assigned highest ANA, SMA, or LKM-1 immunofluorescence titer (Alvarez 1999). lt_1_40 scores 0; 1_40 scores 1; 1_80 scores 2; gt_1_80 scores 3. magent does not titer autoantibodies.",
                          "enum": [
                            "lt_1_40",
                            "1_40",
                            "1_80",
                            "gt_1_80"
                          ],
                          "type": "string"
                        },
                        "biliary_changes": {
                          "description": "Caller-assigned biliary changes typical of PBC or PSC (Alvarez 1999 note 5). true scores -3; additive with other histology items. magent does not read histology.",
                          "type": "boolean"
                        },
                        "globulin_igg": {
                          "description": "Caller-assigned serum globulin or IgG as multiples of ULN (Alvarez 1999). lt_1x scores 0; 1_to_1_5x scores 1; 1_5_to_2x scores 2; gt_2x scores 3. magent does not assay globulin or IgG.",
                          "enum": [
                            "lt_1x",
                            "1_to_1_5x",
                            "1_5_to_2x",
                            "gt_2x"
                          ],
                          "type": "string"
                        },
                        "hepatotoxic_drugs": {
                          "description": "Recent or current known or suspected hepatotoxic drugs (Alvarez 1999 note 4). true scores -4; false scores 1.",
                          "type": "boolean"
                        },
                        "hla_dr3_or_dr4": {
                          "description": "Optional. HLA DR3 or DR4 (Alvarez 1999 note 9). true scores 1 only when autoantibody_titer is lt_1_40; otherwise 0. Omit or false scores 0.",
                          "type": "boolean"
                        },
                        "interface_hepatitis": {
                          "description": "Caller-assigned interface hepatitis on liver histology. true scores 3 (Alvarez 1999; additive). magent does not read histology.",
                          "type": "boolean"
                        },
                        "liver_cell_rosettes": {
                          "description": "Caller-assigned liver-cell rosettes. true scores 1 (Alvarez 1999; additive). magent does not read histology.",
                          "type": "boolean"
                        },
                        "lymphoplasmacytic_infiltrate": {
                          "description": "Caller-assigned predominantly lymphoplasmacytic infiltrate. true scores 1 (Alvarez 1999; additive). magent does not read histology.",
                          "type": "boolean"
                        },
                        "other_atypical_histology": {
                          "description": "Caller-assigned other prominent histologic features suggesting a different etiology (Alvarez 1999 note 6). true scores -3; additive. magent does not read histology.",
                          "type": "boolean"
                        },
                        "other_autoantibodies": {
                          "description": "Optional. Seropositivity for other defined autoantibodies (pANCA, anti-LC1, anti-SLA, anti-ASGPR, anti-LP, anti-sulfatide; Alvarez 1999 note 8). true scores 2 only when autoantibody_titer is lt_1_40; otherwise 0. Omit or false scores 0.",
                          "type": "boolean"
                        },
                        "other_autoimmune_disease": {
                          "description": "Any other autoimmune disorder in the patient or first-degree relatives (Alvarez 1999 note 7). true scores 2; false scores 0.",
                          "type": "boolean"
                        },
                        "sex": {
                          "description": "Caller-assigned sex (Alvarez 1999). female scores 2; male scores 0. magent does not examine the patient.",
                          "enum": [
                            "female",
                            "male"
                          ],
                          "type": "string"
                        },
                        "treatment_response": {
                          "description": "Optional. Alvarez 1999 response to therapy, added to presentation points. none or omit: pretreatment bands (definite >15, probable 10-15). complete scores 2; relapse scores 3; both use posttreatment bands (definite >17, probable 12-17). Not an immunosuppression order.",
                          "enum": [
                            "none",
                            "complete",
                            "relapse"
                          ],
                          "type": "string"
                        },
                        "viral_markers_positive": {
                          "description": "Caller-assigned hepatitis A/B/C viral markers (Alvarez 1999 note 3). true scores -3; false (negative) scores 3. magent does not interpret viral serology.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "sex",
                        "alp_ratio",
                        "globulin_igg",
                        "autoantibody_titer",
                        "ama_positive",
                        "viral_markers_positive",
                        "hepatotoxic_drugs",
                        "alcohol_intake",
                        "interface_hepatitis",
                        "lymphoplasmacytic_infiltrate",
                        "liver_cell_rosettes",
                        "biliary_changes",
                        "other_atypical_histology",
                        "other_autoimmune_disease"
                      ],
                      "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": [
    "aih-original",
    "autoimmune",
    "hepatitis",
    "liver",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-12T13:51:58.371Z",
  "quality": {
    "calls30d": 3,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-10-12T13:51:58.226Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "alcohol_intake": "gt_60",
                  "alp_ratio": "gt_3",
                  "ama_positive": true,
                  "autoantibody_titer": "lt_1_40",
                  "biliary_changes": true,
                  "globulin_igg": "lt_1x",
                  "hepatotoxic_drugs": true,
                  "hla_dr3_or_dr4": false,
                  "interface_hepatitis": false,
                  "liver_cell_rosettes": false,
                  "lymphoplasmacytic_infiltrate": false,
                  "other_atypical_histology": true,
                  "other_autoantibodies": false,
                  "other_autoimmune_disease": false,
                  "sex": "male",
                  "treatment_response": "none",
                  "viral_markers_positive": true
                },
                {
                  "alcohol_intake": "gt_60",
                  "alp_ratio": "gt_3",
                  "ama_positive": true,
                  "autoantibody_titer": "lt_1_40",
                  "biliary_changes": true,
                  "globulin_igg": "lt_1x",
                  "hepatotoxic_drugs": true,
                  "hla_dr3_or_dr4": false,
                  "interface_hepatitis": false,
                  "liver_cell_rosettes": false,
                  "lymphoplasmacytic_infiltrate": false,
                  "other_atypical_histology": true,
                  "other_autoantibodies": false,
                  "other_autoimmune_disease": false,
                  "sex": "male",
                  "treatment_response": "none",
                  "viral_markers_positive": true
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "aih_band": "not_aih",
                  "citation": {
                    "authors": "Alvarez F, Berg PA, Bianchi FB, et al.",
                    "doi": "10.1016/s0168-8278(99)80297-9",
                    "id": "alvarez-1999",
                    "pmid": "10580593",
                    "source": "J Hepatol. 1999;31(5):929-938",
                    "title": "International Autoimmune Hepatitis Group Report: review of criteria for diagnosis of autoimmune hepatitis"
                  },
                  "components": [
                    {
                      "factor": "sex",
                      "points": 0,
                      "present": false,
                      "value": "male"
                    },
                    {
                      "factor": "alp_ratio",
                      "points": -2,
                      "present": true,
                      "value": "gt_3"
                    },
                    {
                      "factor": "globulin_igg",
                      "points": 0,
                      "present": false,
                      "value": "lt_1x"
                    },
                    {
                      "factor": "autoantibody_titer",
                      "points": 0,
                      "present": false,
                      "value": "lt_1_40"
                    },
                    {
                      "factor": "ama_positive",
                      "points": -4,
                      "present": true
                    },
                    {
                      "factor": "viral_markers_positive",
                      "points": -3,
                      "present": true,
                      "value": true
                    },
                    {
                      "factor": "hepatotoxic_drugs",
                      "points": -4,
                      "present": true,
                      "value": true
                    },
                    {
                      "factor": "alcohol_intake",
                      "points": -2,
                      "present": true,
                      "value": "gt_60"
                    },
                    {
                      "factor": "interface_hepatitis",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "lymphoplasmacytic_infiltrate",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "liver_cell_rosettes",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "typical_histology_absent",
                      "points": -5,
                      "present": true
                    },
                    {
                      "factor": "biliary_changes",
                      "points": -3,
                      "present": true
                    },
                    {
                      "factor": "other_atypical_histology",
                      "points": -3,
                      "present": true
                    },
                    {
                      "factor": "other_autoimmune_disease",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "other_autoantibodies",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "hla_dr3_or_dr4",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "treatment_response",
                      "points": 0,
                      "present": false,
                      "value": "none"
                    }
                  ],
                  "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": "aih_original",
                  "formula_expression": "revised original IAIHG AIH (Alvarez 1999) = sex (male 0, female 2) + alp_ratio (lt_1_5 2, 1_5_to_3 0, gt_3 -2) + globulin_igg (lt_1x 0, 1_to_1_5x 1, 1_5_to_2x 2, gt_2x 3) + autoantibody_titer (lt_1_40 0, 1_40 1, 1_80 2, gt_1_80 3) + ama_positive (true -4) + viral_markers (positive -3, negative 3) + hepatotoxic_drugs (true -4, false 1) + alcohol (lt_25 2, 25_to_60 0, gt_60 -2) + histology (interface 3, lymphoplasmacytic 1, rosettes 1, none of those -5, biliary -3, other atypical -3; additive) + other_autoimmune_disease (true 2) + other_autoantibodies (true 2 if titer lt_1_40) + hla_dr3_or_dr4 (true 1 if titer lt_1_40) + treatment_response (complete 2, relapse 3); max 26; pretreatment definite >15, probable 10-15; posttreatment definite >17, probable 12-17",
                  "max_score": 26,
                  "score": -26,
                  "timing": "pretreatment"
                },
                {
                  "aih_band": "not_aih",
                  "citation": {
                    "authors": "Alvarez F, Berg PA, Bianchi FB, et al.",
                    "doi": "10.1016/s0168-8278(99)80297-9",
                    "id": "alvarez-1999",
                    "pmid": "10580593",
                    "source": "J Hepatol. 1999;31(5):929-938",
                    "title": "International Autoimmune Hepatitis Group Report: review of criteria for diagnosis of autoimmune hepatitis"
                  },
                  "components": [
                    {
                      "factor": "sex",
                      "points": 0,
                      "present": false,
                      "value": "male"
                    },
                    {
                      "factor": "alp_ratio",
                      "points": -2,
                      "present": true,
                      "value": "gt_3"
                    },
                    {
                      "factor": "globulin_igg",
                      "points": 0,
                      "present": false,
                      "value": "lt_1x"
                    },
                    {
                      "factor": "autoantibody_titer",
                      "points": 0,
                      "present": false,
                      "value": "lt_1_40"
                    },
                    {
                      "factor": "ama_positive",
                      "points": -4,
                      "present": true
                    },
                    {
                      "factor": "viral_markers_positive",
                      "points": -3,
                      "present": true,
                      "value": true
                    },
                    {
                      "factor": "hepatotoxic_drugs",
                      "points": -4,
                      "present": true,
                      "value": true
                    },
                    {
                      "factor": "alcohol_intake",
                      "points": -2,
                      "present": true,
                      "value": "gt_60"
                    },
                    {
                      "factor": "interface_hepatitis",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "lymphoplasmacytic_infiltrate",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "liver_cell_rosettes",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "typical_histology_absent",
                      "points": -5,
                      "present": true
                    },
                    {
                      "factor": "biliary_changes",
                      "points": -3,
                      "present": true
                    },
                    {
                      "factor": "other_atypical_histology",
                      "points": -3,
                      "present": true
                    },
                    {
                      "factor": "other_autoimmune_disease",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "other_autoantibodies",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "hla_dr3_or_dr4",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "treatment_response",
                      "points": 0,
                      "present": false,
                      "value": "none"
                    }
                  ],
                  "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": "aih_original",
                  "formula_expression": "revised original IAIHG AIH (Alvarez 1999) = sex (male 0, female 2) + alp_ratio (lt_1_5 2, 1_5_to_3 0, gt_3 -2) + globulin_igg (lt_1x 0, 1_to_1_5x 1, 1_5_to_2x 2, gt_2x 3) + autoantibody_titer (lt_1_40 0, 1_40 1, 1_80 2, gt_1_80 3) + ama_positive (true -4) + viral_markers (positive -3, negative 3) + hepatotoxic_drugs (true -4, false 1) + alcohol (lt_25 2, 25_to_60 0, gt_60 -2) + histology (interface 3, lymphoplasmacytic 1, rosettes 1, none of those -5, biliary -3, other atypical -3; additive) + other_autoimmune_disease (true 2) + other_autoantibodies (true 2 if titer lt_1_40) + hla_dr3_or_dr4 (true 1 if titer lt_1_40) + treatment_response (complete 2, relapse 3); max 26; pretreatment definite >15, probable 10-15; posttreatment definite >17, probable 12-17",
                  "max_score": 26,
                  "score": -26,
                  "timing": "pretreatment"
                }
              ],
              "path": "/api/calc/aih_original"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "alcohol_intake": {
                            "description": "Caller-assigned average alcohol intake (Alvarez 1999). lt_25 (<25 g/day) scores 2; 25_to_60 scores 0 (gap between the tabulated <25 and >60 cells); gt_60 (>60 g/day) scores -2.",
                            "enum": [
                              "lt_25",
                              "25_to_60",
                              "gt_60"
                            ],
                            "type": "string"
                          },
                          "alp_ratio": {
                            "description": "Caller-assigned ALP:(AST or ALT) ratio as multiples of ULN (Alvarez 1999 note 1). lt_1_5 (<1.5) scores 2; 1_5_to_3 (1.5–3.0) scores 0; gt_3 (>3) scores -2. magent does not take raw enzymes.",
                            "enum": [
                              "lt_1_5",
                              "1_5_to_3",
                              "gt_3"
                            ],
                            "type": "string"
                          },
                          "ama_positive": {
                            "description": "Caller-assigned antimitochondrial antibody. true scores -4; false scores 0 (Alvarez 1999). magent does not assay AMA.",
                            "type": "boolean"
                          },
                          "autoantibody_titer": {
                            "description": "Caller-assigned highest ANA, SMA, or LKM-1 immunofluorescence titer (Alvarez 1999). lt_1_40 scores 0; 1_40 scores 1; 1_80 scores 2; gt_1_80 scores 3. magent does not titer autoantibodies.",
                            "enum": [
                              "lt_1_40",
                              "1_40",
                              "1_80",
                              "gt_1_80"
                            ],
                            "type": "string"
                          },
                          "biliary_changes": {
                            "description": "Caller-assigned biliary changes typical of PBC or PSC (Alvarez 1999 note 5). true scores -3; additive with other histology items. magent does not read histology.",
                            "type": "boolean"
                          },
                          "globulin_igg": {
                            "description": "Caller-assigned serum globulin or IgG as multiples of ULN (Alvarez 1999). lt_1x scores 0; 1_to_1_5x scores 1; 1_5_to_2x scores 2; gt_2x scores 3. magent does not assay globulin or IgG.",
                            "enum": [
                              "lt_1x",
                              "1_to_1_5x",
                              "1_5_to_2x",
                              "gt_2x"
                            ],
                            "type": "string"
                          },
                          "hepatotoxic_drugs": {
                            "description": "Recent or current known or suspected hepatotoxic drugs (Alvarez 1999 note 4). true scores -4; false scores 1.",
                            "type": "boolean"
                          },
                          "hla_dr3_or_dr4": {
                            "description": "Optional. HLA DR3 or DR4 (Alvarez 1999 note 9). true scores 1 only when autoantibody_titer is lt_1_40; otherwise 0. Omit or false scores 0.",
                            "type": "boolean"
                          },
                          "interface_hepatitis": {
                            "description": "Caller-assigned interface hepatitis on liver histology. true scores 3 (Alvarez 1999; additive). magent does not read histology.",
                            "type": "boolean"
                          },
                          "liver_cell_rosettes": {
                            "description": "Caller-assigned liver-cell rosettes. true scores 1 (Alvarez 1999; additive). magent does not read histology.",
                            "type": "boolean"
                          },
                          "lymphoplasmacytic_infiltrate": {
                            "description": "Caller-assigned predominantly lymphoplasmacytic infiltrate. true scores 1 (Alvarez 1999; additive). magent does not read histology.",
                            "type": "boolean"
                          },
                          "other_atypical_histology": {
                            "description": "Caller-assigned other prominent histologic features suggesting a different etiology (Alvarez 1999 note 6). true scores -3; additive. magent does not read histology.",
                            "type": "boolean"
                          },
                          "other_autoantibodies": {
                            "description": "Optional. Seropositivity for other defined autoantibodies (pANCA, anti-LC1, anti-SLA, anti-ASGPR, anti-LP, anti-sulfatide; Alvarez 1999 note 8). true scores 2 only when autoantibody_titer is lt_1_40; otherwise 0. Omit or false scores 0.",
                            "type": "boolean"
                          },
                          "other_autoimmune_disease": {
                            "description": "Any other autoimmune disorder in the patient or first-degree relatives (Alvarez 1999 note 7). true scores 2; false scores 0.",
                            "type": "boolean"
                          },
                          "sex": {
                            "description": "Caller-assigned sex (Alvarez 1999). female scores 2; male scores 0. magent does not examine the patient.",
                            "enum": [
                              "female",
                              "male"
                            ],
                            "type": "string"
                          },
                          "treatment_response": {
                            "description": "Optional. Alvarez 1999 response to therapy, added to presentation points. none or omit: pretreatment bands (definite >15, probable 10-15). complete scores 2; relapse scores 3; both use posttreatment bands (definite >17, probable 12-17). Not an immunosuppression order.",
                            "enum": [
                              "none",
                              "complete",
                              "relapse"
                            ],
                            "type": "string"
                          },
                          "viral_markers_positive": {
                            "description": "Caller-assigned hepatitis A/B/C viral markers (Alvarez 1999 note 3). true scores -3; false (negative) scores 3. magent does not interpret viral serology.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "sex",
                          "alp_ratio",
                          "globulin_igg",
                          "autoantibody_titer",
                          "ama_positive",
                          "viral_markers_positive",
                          "hepatotoxic_drugs",
                          "alcohol_intake",
                          "interface_hepatitis",
                          "lymphoplasmacytic_infiltrate",
                          "liver_cell_rosettes",
                          "biliary_changes",
                          "other_atypical_histology",
                          "other_autoimmune_disease"
                        ],
                        "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"
  }
}