{
  "engine": {
    "id": "cpe-011",
    "code": "CPE-011",
    "name": "Anemia Classification Pattern Engine",
    "version": "1.0.0",
    "url": "https://biod.ai/tools/anemia",
    "status": "Executable specification v1.0.0, ported by Biod from the CBC_ANEMIA_001 prototype and rewritten as deterministic rules. Reviewed by Dr. Vinicius Amaral, D.O. Not for clinical production use."
  },
  "notice": "Clinical decision support for licensed clinicians. Synthetic-data demonstration. Not FDA cleared. Physician adjudication required.",
  "rules": [
    {
      "id": "AN-SCOPE-01",
      "name": "Patients under 18 routed out",
      "group": "Scope and validity",
      "status": "active",
      "classification": "Priority 1",
      "summary": "Patients under 18 routed out. Evaluates age_years below 18.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "age_years < 18"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Routing: pediatric hematology pathway"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Adult thresholds do not apply."
          ]
        }
      ],
      "evidence": [
        "EV-WHO-HB-2011"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-scope-01"
    },
    {
      "id": "AN-01",
      "name": "Anemia present, with severity",
      "group": "Classification",
      "status": "active",
      "classification": "Priority 3",
      "summary": "Anemia present, with severity. Evaluates hemoglobin below 13.0 g/dL (men), below 12.0 g/dL (non-pregnant women), below 11.0 g/dL (pregnancy).",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "hemoglobin < 13.0 g/dL (men), < 12.0 g/dL (non-pregnant women), < 11.0 g/dL (pregnancy)"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Anemia by WHO thresholds",
            "Severity: mild (11.0 to the sex threshold), moderate (8.0 to 10.9), severe (below 8.0 g/dL)"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Anemia is a finding, not a cause."
          ]
        }
      ],
      "evidence": [
        "EV-WHO-HB-2011"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-01"
    },
    {
      "id": "AN-02",
      "name": "Morphology by MCV",
      "group": "Classification",
      "status": "active",
      "classification": "Priority 4",
      "summary": "Morphology by MCV. Evaluates MCV entered with anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "MCV entered with anemia present"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Microcytic: MCV below 80 fL",
            "Normocytic: 80 to 100 fL",
            "Macrocytic: above 100 fL"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Mixed deficiencies can produce a normal MCV."
          ]
        }
      ],
      "evidence": [
        "EV-TEFFERI-2003"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-02"
    },
    {
      "id": "AN-03",
      "name": "Marrow response",
      "group": "Classification",
      "status": "active",
      "classification": "Priority 4",
      "summary": "Marrow response. Evaluates reticulocyte percentage and hematocrit available.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "reticulocyte percentage and hematocrit available"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Corrected reticulocyte count = reticulocyte % × (hematocrit ÷ 45)",
            "Reticulocyte production index = corrected count ÷ maturation factor",
            "RPI of 2 or more: appropriate marrow response (blood loss, hemolysis or recovery); below 2: inadequate response"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Interpret with the clinical context."
          ]
        }
      ],
      "evidence": [
        "EV-TEFFERI-2003"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-03"
    },
    {
      "id": "AN-04",
      "name": "Mixed anemia suspected",
      "group": "Classification",
      "status": "active",
      "classification": "Priority 5",
      "summary": "Mixed anemia suspected. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "RDW above 14.5% with a normal MCV"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "A high RDW with a normal MCV suggests two processes with opposite effects on cell size (for example iron deficiency with B12 or folate deficiency)"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "A prompt."
          ]
        }
      ],
      "evidence": [
        "EV-TEFFERI-2003"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-04"
    },
    {
      "id": "AN-10",
      "name": "Iron-deficiency pattern",
      "group": "Etiologic patterns",
      "status": "active",
      "classification": "Priority 3",
      "summary": "Iron-deficiency pattern. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "ferritin < 30 ng/mL (or < 100 with inflammation) with transferrin saturation < 20%",
            "usually microcytic"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Pattern compatible with iron deficiency: see the Iron Deficiency Pattern Engine"
          ]
        },
        {
          "heading": "Recommended next steps (for physician review)",
          "items": [
            "Establish the source of iron loss or poor absorption"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Cause still to be found."
          ]
        }
      ],
      "evidence": [
        "EV-CAMASCHELLA-2015"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-10"
    },
    {
      "id": "AN-11",
      "name": "Anemia of inflammation pattern",
      "group": "Etiologic patterns",
      "status": "active",
      "classification": "Priority 4",
      "summary": "Anemia of inflammation pattern. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "CRP raised or chronic inflammatory disease, infection or malignancy",
            "ferritin ≥ 100 ng/mL with transferrin saturation < 20%",
            "normocytic or mildly microcytic"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Pattern compatible with anemia of inflammation, possibly with coexisting iron deficiency"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Cannot exclude a coexisting deficiency."
          ]
        }
      ],
      "evidence": [
        "EV-CAMASCHELLA-2015"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-11"
    },
    {
      "id": "AN-12",
      "name": "Thalassemia-trait pattern",
      "group": "Etiologic patterns",
      "status": "active",
      "classification": "Priority 4",
      "summary": "Thalassemia-trait pattern. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "microcytic",
            "Mentzer index (MCV ÷ RBC) below 13",
            "ferritin ≥ 30 and transferrin saturation ≥ 20%",
            "RDW not raised"
          ]
        },
        {
          "heading": "Supportive, not required",
          "items": [
            "target cells on the film",
            "high RBC count"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Pattern that favors thalassemia trait: hemoglobin electrophoresis can confirm"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "A screen, not a diagnosis."
          ]
        }
      ],
      "evidence": [
        "EV-MENTZER-1973"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-12"
    },
    {
      "id": "AN-13",
      "name": "Megaloblastic pattern",
      "group": "Etiologic patterns",
      "status": "active",
      "classification": "Priority 3",
      "summary": "Megaloblastic pattern. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "macrocytic",
            "vitamin B12 < 300 pg/mL or folate low or MMA raised, OR hypersegmented neutrophils"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Pattern compatible with vitamin B12 or folate deficiency: see the Vitamin B12 and Folate Pattern Engine"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Check B12 before folic acid."
          ]
        }
      ],
      "evidence": [
        "EV-DEVALIA-2014"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-13"
    },
    {
      "id": "AN-14",
      "name": "Hemolysis pattern",
      "group": "Etiologic patterns",
      "status": "active",
      "classification": "Priority 2",
      "summary": "Hemolysis pattern. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "reticulocyte production index ≥ 2 or reticulocytes ≥ 2%",
            "at least two of: LDH above the upper limit, haptoglobin low, indirect bilirubin raised, spherocytes or schistocytes on the film",
            "OR a positive direct antiglobulin test with one marker"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Pattern compatible with hemolysis"
          ]
        },
        {
          "heading": "Recommended next steps (for physician review)",
          "items": [
            "Direct antiglobulin test, blood film and a search for the cause (autoimmune, mechanical, hereditary, drug, infection)"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Does not name the type."
          ]
        }
      ],
      "evidence": [
        "EV-JAGER-2020"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-14"
    },
    {
      "id": "AN-15",
      "name": "Blood-loss pattern",
      "group": "Etiologic patterns",
      "status": "active",
      "classification": "Priority 2",
      "summary": "Blood-loss pattern. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "reticulocyte response raised or an abrupt fall in hemoglobin",
            "bleeding signs or a source"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Pattern compatible with blood loss"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "The source has to be found."
          ]
        }
      ],
      "evidence": [
        "EV-TEFFERI-2003"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-15"
    },
    {
      "id": "AN-16",
      "name": "Anemia-of-CKD pattern",
      "group": "Etiologic patterns",
      "status": "active",
      "classification": "Priority 4",
      "summary": "Anemia-of-CKD pattern. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "eGFR < 60 mL/min/1.73 m²",
            "normocytic",
            "RPI below 2",
            "iron indices not deficient"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Pattern compatible with anemia of chronic kidney disease: see the CKD Pattern Engine"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Other causes remain open."
          ]
        }
      ],
      "evidence": [
        "EV-KDIGO-ANEMIA-2012"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-16"
    },
    {
      "id": "AN-17",
      "name": "Cytopenias: marrow involvement possible",
      "group": "Etiologic patterns",
      "status": "active",
      "classification": "Priority 1",
      "summary": "Cytopenias: marrow involvement possible. Evaluates hemoglobin below 10 g/dL with WBC below 3.5 ×10³/µL and platelets below 100 ×10³/µL (pancytopenia).",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "hemoglobin < 10 g/dL with WBC < 3.5 ×10³/µL and platelets < 100 ×10³/µL (pancytopenia)",
            "OR anemia with platelets < 50 ×10³/µL"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Pattern that raises marrow failure, infiltration or severe megaloblastic anemia"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Needs hematology evaluation."
          ]
        }
      ],
      "evidence": [
        "EV-TEFFERI-2003",
        "EV-DEVALIA-2014"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-17"
    },
    {
      "id": "AN-18",
      "name": "Macrocytosis from non-vitamin causes",
      "group": "Etiologic patterns",
      "status": "active",
      "classification": "Priority 5",
      "summary": "Macrocytosis from non-vitamin causes. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "macrocytic",
            "alcohol use disorder OR liver disease OR hypothyroidism (TSH raised) OR macrocytosis-causing drug OR age 60 and over with cytopenias"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Non-vitamin causes of macrocytosis are present: alcohol, liver disease, hypothyroidism, drugs (hydroxyurea, methotrexate, zidovudine), myelodysplasia"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Can coexist with a vitamin deficiency."
          ]
        }
      ],
      "evidence": [
        "EV-TEFFERI-2003"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-18"
    },
    {
      "id": "AN-19",
      "name": "Hypothyroid contribution",
      "group": "Etiologic patterns",
      "status": "active",
      "classification": "Priority 6",
      "summary": "Hypothyroid contribution. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "TSH > 4.5 mIU/L"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Hypothyroidism can contribute to a normocytic or macrocytic anemia: see the Thyroid Pattern Engine"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "A contributor, not a cause."
          ]
        }
      ],
      "evidence": [
        "EV-TEFFERI-2003"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-19"
    },
    {
      "id": "AN-SAFE-01",
      "name": "Severe anemia",
      "group": "Safety",
      "status": "active",
      "classification": "Priority 1",
      "summary": "Severe anemia. Evaluates hemoglobin below 7.0 g/dL, OR below 8.0 g/dL with chest pain, dyspnea at rest or syncope.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "hemoglobin < 7.0 g/dL, OR < 8.0 g/dL with chest pain, dyspnea at rest or syncope"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Urgent clinical assessment: severe anemia"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Transfusion decisions belong to the treating physician."
          ]
        }
      ],
      "evidence": [
        "EV-WHO-HB-2011"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-safe-01"
    },
    {
      "id": "AN-SAFE-02",
      "name": "Abrupt fall in hemoglobin",
      "group": "Safety",
      "status": "active",
      "classification": "Priority 1",
      "summary": "Abrupt fall in hemoglobin. Evaluates hemoglobin fell by 2 g/dL or more from a prior value (3 g/dL or more is urgent).",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "hemoglobin fell by 2 g/dL or more from a prior value (3 g/dL or more is urgent)"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Possible active bleeding or acute hemolysis"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "A trend flag."
          ]
        }
      ],
      "evidence": [
        "EV-TEFFERI-2003"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-safe-02"
    },
    {
      "id": "AN-SAFE-03",
      "name": "Thrombotic microangiopathy pattern",
      "group": "Safety",
      "status": "active",
      "classification": "Priority 1",
      "summary": "Thrombotic microangiopathy pattern. Evaluates schistocytes on the film.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "schistocytes on the film",
            "platelets < 100 ×10³/µL"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Urgent: pattern compatible with thrombotic microangiopathy (TTP, HUS, DIC)"
          ]
        },
        {
          "heading": "Recommended next steps (for physician review)",
          "items": [
            "Urgent hematology evaluation, including ADAMTS13 testing"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Time-critical."
          ]
        }
      ],
      "evidence": [
        "EV-ISTH-TTP-2020"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-safe-03"
    },
    {
      "id": "AN-SAFE-04",
      "name": "Overt gastrointestinal bleeding",
      "group": "Safety",
      "status": "active",
      "classification": "Priority 1",
      "summary": "Overt gastrointestinal bleeding. Evaluates melena, hematochezia or hematemesis.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "melena, hematochezia or hematemesis"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Urgent assessment of a possible active gastrointestinal bleed"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Routine pathway not appropriate."
          ]
        }
      ],
      "evidence": [
        "EV-AGA-2020"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-safe-04"
    },
    {
      "id": "AN-SAFE-05",
      "name": "Blasts or marked leukocytosis",
      "group": "Safety",
      "status": "active",
      "classification": "Priority 1",
      "summary": "Blasts or marked leukocytosis. Evaluates blasts on the film OR WBC above 30 ×10³/µL.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "blasts on the film OR WBC > 30 ×10³/µL"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Urgent hematology evaluation: possible acute leukemia"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Time-critical."
          ]
        }
      ],
      "evidence": [
        "EV-TEFFERI-2003"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-safe-05"
    },
    {
      "id": "AN-MISS-01",
      "name": "Information needed",
      "group": "Missing data",
      "status": "active",
      "classification": "Priority 8",
      "summary": "Information needed. Evaluates anemia present.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "anemia present",
            "reticulocyte count, ferritin or other first-line studies missing"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "The first-line studies for this morphology are incomplete"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Names what is needed."
          ]
        }
      ],
      "evidence": [
        "EV-TEFFERI-2003"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-miss-01"
    },
    {
      "id": "AN-CALC-01",
      "name": "Derived values",
      "group": "Calculations",
      "status": "module",
      "classification": "Context",
      "summary": "Derived values. Evaluates inputs available.",
      "sections": [
        {
          "heading": "Condition",
          "items": [
            "inputs available"
          ]
        },
        {
          "heading": "What it reports",
          "items": [
            "Mentzer index, corrected reticulocyte count, RPI, transferrin saturation"
          ]
        },
        {
          "heading": "Diagnostic boundary",
          "items": [
            "Informational."
          ]
        }
      ],
      "evidence": [
        "EV-MENTZER-1973"
      ],
      "url": "https://biod.ai/tools/anemia/rules/an-calc-01"
    }
  ],
  "evidence": [
    {
      "id": "EV-WHO-HB-2011",
      "citation": "World Health Organization. Haemoglobin concentrations for the diagnosis of anaemia and assessment of severity. Geneva: WHO; 2011.",
      "supports": [
        "Anemia thresholds and severity grades"
      ]
    },
    {
      "id": "EV-TEFFERI-2003",
      "citation": "Tefferi A. Anemia in adults: a contemporary approach to diagnosis. Mayo Clin Proc. 2003;78(10):1274-1280.",
      "supports": [
        "Classification by MCV and reticulocyte response; first-line studies"
      ]
    },
    {
      "id": "EV-CAMASCHELLA-2015",
      "citation": "Camaschella C. Iron-deficiency anemia. N Engl J Med. 2015;372(19):1832-1843.",
      "supports": [
        "Iron deficiency and anemia of inflammation"
      ]
    },
    {
      "id": "EV-MENTZER-1973",
      "citation": "Mentzer WC Jr. Differentiation of iron deficiency from thalassaemia trait. Lancet. 1973;1(7808):882.",
      "supports": [
        "Mentzer index below 13 favors thalassemia trait"
      ]
    },
    {
      "id": "EV-DEVALIA-2014",
      "citation": "Devalia V, Hamilton MS, Molloy AM; British Committee for Standards in Haematology. Guidelines for the diagnosis and treatment of cobalamin and folate disorders. Br J Haematol. 2014;166(4):496-513.",
      "supports": [
        "Megaloblastic anemia and its evaluation"
      ]
    },
    {
      "id": "EV-JAGER-2020",
      "citation": "Jäger U, Barcellini W, Broome CM, et al. Diagnosis and treatment of autoimmune hemolytic anemia in adults: Recommendations from the First International Consensus Meeting. Blood Rev. 2020;41:100648.",
      "supports": [
        "Hemolysis markers and direct antiglobulin testing"
      ]
    },
    {
      "id": "EV-KDIGO-ANEMIA-2012",
      "citation": "KDIGO Anemia Work Group. KDIGO Clinical Practice Guideline for Anemia in Chronic Kidney Disease. Kidney Int Suppl. 2012;2(4):279-335.",
      "supports": [
        "Evaluation of anemia in CKD"
      ]
    },
    {
      "id": "EV-ISTH-TTP-2020",
      "citation": "Zheng XL, Vesely SK, Cataland SR, et al. ISTH guidelines for the diagnosis of thrombotic thrombocytopenic purpura. J Thromb Haemost. 2020;18(10):2486-2495.",
      "supports": [
        "Schistocytes with thrombocytopenia: urgent evaluation including ADAMTS13"
      ]
    },
    {
      "id": "EV-AGA-2020",
      "citation": "Ko CW, Siddique SM, Patel A, et al. AGA Clinical Practice Guidelines on the Gastrointestinal Evaluation of Iron Deficiency Anemia. Gastroenterology. 2020;159(3):1085-1094.",
      "supports": [
        "Gastrointestinal evaluation of iron-deficiency anemia"
      ]
    }
  ]
}