Synthetic data only. Never enter patient information; nothing is sent or stored. For clinicians. Not FDA cleared.For licensed clinicians. Educational demonstration on synthetic data. Never enter real patient identifiers or protected health information: everything runs in your browser and nothing is sent or stored. Clinical decision support only; not FDA cleared; physician review is required.
CPE-009 · version 1.0.0
Vitamin B12 and Folate Pattern Engine: serum, functional and drug-related deficiency, with the safety gates that matter
Serum B12, MMA and homocysteine read together, folic acid never ahead of B12, and neurologic involvement kept in front.
A serum vitamin B12 in the borderline range does not settle the question, macrocytosis is absent in many B12-deficient patients, and treating a megaloblastic anemia with folic acid alone can hide a B12 deficiency while the nerves keep deteriorating. The Vitamin B12 and Folate Pattern Engine is built around those three facts.
It reads serum B12 with methylmalonic acid and homocysteine, separates B12 from folate patterns, flags the drugs and groups that raise risk, and escalates neurologic and severe hematologic presentations. It names no product, dose or route, and it does not recommend MTHFR genotyping.
Playground
Load a synthetic case or type your own values. The result recomputes as you type, and every rule links to its page.
Serum B12 level
● Below 200 pg/mL
Deficiency pattern
○ 200 to 300 pg/mL
Borderline: MMA and homocysteine settle it
○ Above 300 pg/mL
Deficiency unlikely, not excluded
Laboratory
- <200
- 200–300
- >300
Patient
Neurologic features
Drugs, diet and risk groups
This case also carries values that have no field here: fatigue. They stay in the calculation until you clear the form.
What it does
- Reads serum B12 (<200, 200–300, >300 pg/mL) with MMA and homocysteine to label deficiency or functional deficiency.
- Warns when folic acid is planned for a macrocytic anemia before B12 has been measured.
- Escalates neurologic features, subacute combined degeneration patterns, pancytopenia and hemolytic pictures.
- Flags metformin, long-term acid suppression and nitrous oxide, and the higher-risk groups with no B12 on file.
- Prompts pernicious anemia evaluation and, separately, the USPSTF preconception folic acid recommendation.
What it never does
- Name a B12 or folate product, dose, route or duration.
- Recommend MTHFR genotyping for a raised homocysteine.
- Treat a normal serum B12 as proof that B12 is not the problem after nitrous oxide or with strong neurologic features.
- Claim that metformin screening is mandatory: the ADA says to consider periodic measurement.
Safety gates
These gates run before the pattern is shown, and urgent findings are displayed first.
- Posterior-column signs with spasticity or ascending sensory symptoms raise an urgent alert (subacute combined degeneration pattern).
- Pancytopenia, hemoglobin below 7, or a hemolytic picture with macrocytosis or low B12 raises an urgent alert.
- Folic acid ordered for macrocytic anemia without a B12 on file raises a priority alert.
- Neurologic features with unmeasured or low B12, or nitrous oxide exposure, raise a priority alert.
Inputs
- Serum B12, methylmalonic acid, homocysteine
- Serum and red-cell folate
- MCV, hemoglobin, eGFR
- Neurologic symptoms and signs
- Metformin, acid suppression, nitrous oxide, diet, surgery and autoimmune context
Scope
In scope
- Adults aged 18 and over
Routed out
- Patients under 18
The full rule catalog
17 active rules. Each has its own page with conditions, outputs and evidence. 17 of 17 active rules are exercised by at least one synthetic case.
Scope and validity
Classification
Safety
Context triggers
Missing data
Synthetic cases
Every case is synthetic. Open one to see the inputs, the full result and the rule trace; then change the values.
B12-FX-01
B12 of 150 pg/mL with macrocytic anemia
A 67-year-old with MCV 108.
B12-FX-02
Borderline B12 with raised MMA
B12 260 and MMA 0.52.
B12-FX-03
Borderline B12 and no confirmatory test
B12 250.
B12-FX-04
Macrocytic anemia, folic acid ordered, no B12
A safety situation.
B12-FX-05
Neuropathy, B12 220 and metformin for five years
Neurologic features with a borderline level.
B12-FX-06
Posterior-column signs and spasticity
A pattern compatible with subacute combined degeneration.
B12-FX-07
Macrocytosis in a patient with alcohol use disorder
MCV 104, B12 not measured.
B12-FX-08
Low B12 in a 71-year-old with autoimmune thyroid disease and glossitis
Intrinsic-factor antibodies not done.
B12-FX-09
Intrinsic-factor antibodies positive
Pernicious anemia is supported.
B12-FX-10
Hypersegmented neutrophils
MCV 102 and B12 190.
B12-FX-11
Metformin for three years, B12 never measured
A screening opportunity.
B12-FX-12
A PPI for 30 months at age 72
Acid suppression and age.
B12-FX-13
Nitrous oxide exposure with neuropathy and a B12 of 310
A normal-looking serum level.
B12-FX-14
Strict vegan diet
No B12 on file.
B12-FX-15
Bariatric surgery
No B12 on file.
B12-FX-16
Homocysteine 22 with B12 650 and folate 12
Adequate vitamins.
B12-FX-17
Folate 2.8 ng/mL with macrocytosis and alcohol use
B12 is normal.
B12-FX-18
Low B12 and low folate
Both are deficient.
B12-FX-19
A woman aged 28 not taking folic acid
A preventive prompt.
B12-FX-20
Pancytopenia with MCV 112
A severe picture.
B12-FX-21
Schistocytes with raised LDH in a macrocytic anemia
Hemolytic features.
B12-FX-22
A 12-year-old is outside the adult pathway
Pediatric patient.
B12-FX-23
B12 of 520, no concerns
Deficiency unlikely.
B12-FX-24
Numb feet and unsteady, B12 never measured
Neurologic features without a level.
B12-FX-25
MMA 0.41 with B12 450 and an eGFR of 38
Kidney function raises MMA.
B12-FX-26
Methotrexate and a low red-cell folate
A folate-antagonist drug.
Evidence
Guidelines and references the rules cite. Each rule page lists the ones that support it.
EV-BSH-2014Devalia 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: Diagnostic approach with serum B12, MMA and homocysteine Neurologic involvement means treatment should not wait for confirmation Folic acid alone must not be given while B12 deficiency is unexcluded
EV-STABLER-2013Stabler SP. Vitamin B12 deficiency. N Engl J Med. 2013;368(2):149-160.
Supports: Clinical presentations, subacute combined degeneration, nitrous oxide and drug causes
EV-GREEN-2017Green R, Allen LH, Bjørke-Monsen AL, et al. Vitamin B12 deficiency. Nat Rev Dis Primers. 2017;3:17040.
Supports: Functional deficiency, markers (MMA, homocysteine) and causes including autoimmune gastritis
EV-ADA-STANDARDSAmerican Diabetes Association Professional Practice Committee. Standards of Care in Diabetes, section on pharmacologic approaches to glycemic treatment (current edition). Diabetes Care.
Supports: Periodic vitamin B12 measurement should be considered in metformin-treated people, especially those with anemia or peripheral neuropathy
EV-ACMG-MTHFR-2013Hickey SE, Curry CJ, Toriello HV. ACMG Practice Guideline: lack of evidence for MTHFR polymorphism testing. Genet Med. 2013;15(2):153-156.
Supports: MTHFR polymorphism testing is not supported for hyperhomocysteinemia or thrombophilia work-up
EV-WHO-FOLATE-2015World Health Organization. Serum and red blood cell folate concentrations for assessing folate status in populations. Geneva: WHO; 2015.
Supports: Serum folate below 10 nmol/L and red-cell folate below 305 nmol/L indicate deficiency
EV-USPSTF-FOLIC-2023US Preventive Services Task Force. Folic Acid Supplementation to Prevent Neural Tube Defects: US Preventive Services Task Force Reaffirmation Recommendation Statement. JAMA. 2023;330(5):454-459.
Supports: Grade A recommendation for daily folic acid supplementation in persons planning or capable of pregnancy
Frequently asked questions
What B12 levels does the engine use?
Below 200 pg/mL (148 pmol/L) is a deficiency pattern, 200 to 300 is borderline and is settled by methylmalonic acid or homocysteine, and above 300 makes deficiency unlikely but not excluded when nitrous oxide exposure or strong neurologic features are present.
Why the warning about folic acid and B12?
Folic acid can correct the anemia of B12 deficiency while the neurologic damage continues unnoticed. When a macrocytic anemia has folic acid planned and no B12 on file, the engine raises a priority alert to measure B12 first or together.
Does it recommend annual B12 screening in everyone on metformin?
No. The ADA standards say periodic B12 measurement should be considered in people on metformin, especially with anemia or peripheral neuropathy. The engine flags long-term metformin and prompts a measurement; it does not call it mandatory.
Why does it not suggest MTHFR testing for a high homocysteine?
The ACMG practice guideline finds no evidence supporting MTHFR polymorphism testing. With adequate B12 and folate the engine points instead to kidney function, hypothyroidism, vitamin B6 and drugs.
How are neurologic presentations handled?
Neurologic involvement can occur without anemia and raises urgency, so the engine prompts a prompt B12 with MMA and notes that BSH guidance does not make treatment wait for confirmation. A posterior-column pattern with spasticity is escalated as urgent.
Specification status: Executable specification v1.0.0, authored by Biod from the narrative CPE-009 specification and current guidelines. Reviewed by Dr. Vinicius Amaral, D.O. Not for clinical production use.
Clinical review: Dr. Vinicius Amaral, D.O., Medical reviewer, 2026-10-03.
Keep going
CPE-004
Iron Deficiency Pattern Engine
Iron status from ferritin and transferrin saturation, read correctly when inflammation, heart failure or kidney disease changes the rules.
CPE-002
Insulin Resistance–Associated Metabolic Pattern Engine
Guideline criteria for glycemia and metabolic syndrome. Insulin resistance itself is never diagnosed from one number.
CPE-001
Thyroid Function Pattern Engine
Functional state from TSH and FT4, kept separate from etiology. Central disease and decompensation never hide.
Resources
Micronutrient patterns and cognitive dysfunction
Game
Pattern challenge
Guess what the engine will report.
Try Biod in your practice
The Clinical Intelligence Layer — transforming fragmented clinical information into structured intelligence for clinician review and action.
