Type 2 diabetes (chronic outpatient)
Has dedicated dm2-medication.service.ts implementing the cardiorenal-first algorithm per ADA 2026 Table 9.1 — referenced as the regimen axis service. Acute hyperglycemic crises (DKA / HHS / hypoglycemia) route out via dedicated engines per ADA 2026 §16 — listed under workups for branching only. 2026-05-13 deepening pass — added 4-stage transitions block (escalation/admit/discharge/de_escalation); added sibling_differentiation row vs endo.t1dm.v1 covering autoantibody triage / LADA / MODY / adolescent obesity overlap; added 3 severity_triggers (euglycemic_dka_risk_on_sglt2i, tirzepatide_or_glp1_pancreatitis_risk, mash_advanced_fibrosis_no_glp1); PMIDs for ADA 2026 / SURPASS-CVOT / MAESTRO-NASH / STEP-SURMOUNT were subsequently live-verified and reconciled in the 2026-05-16 depth-pass-2 (see next note). DEPTH-PASS-2 2026-05-16 (shard-07-cardio-chronic, golden-template mirror of cardio.htn.core.v1) added: (1) co-located _design-brief.md + _research-bundle.md per §5.5 items 1+2 (19 verified PMIDs, named trials + effect sizes + 95% CI, retrieval-dated 2026-05-16, Consensus->WebSearch fallback logged); design_brief pointer repointed to src/lib/dossiers/endo.dm2.core.v1._design-brief.md (was a broken concatenated package path). (2) endo.dm2.core.v1 ros+differentials+finding-lrs seed files (11 differentials w/ cohort-anchored priors spanning the diabetes-type partition + chronic-complication differential, 14 ROS, 33 LR rows = 25 LR+ / 19 LR-, 3 conditional-dependency rules, T_test~2% / T_treat~10%). (3) restructured regimen axis 1 dm2_glycemic_stepwise into a 6-step ADA-2026 ladder; added 2nd axis dm2_comorbidity_phenotype (drug x comorbidity gating as data: uncomplicated/ASCVD/HF/CKD-albuminuric/obesity/MASH/frail-elderly/pregnancy). (4) RxCUI bugs fixed vs DrugEffectProfile registry: canagliflozin 1486436->1373458, finerenone 2627046->2562811, sitagliptin 60548->593411, insulin_glargine 261551->274783 (+name normalised insulin glargine); verified-correct: metformin 6809, empagliflozin 1545653, dapagliflozin 1488564, semaglutide 1991302, liraglutide 475968, dulaglutide 1551291, tirzepatide 2601723. (5) 2026-guideline content refresh: comorbidity-first SGLT2i/GLP-1 selection A1c-independent, finerenone in DKD (KDIGO 2022), GLP-1/tirzepatide for obesity/MASH, individualized A1c targets (ACCORD harm vs UKPDS legacy); evidence.pmids replaced 9+4-placeholder set with 19 verified (ADA-2026 §2/§9, EMPA-REG/CREDENCE/DAPA-CKD/EMPA-KIDNEY, LEADER/SUSTAIN-6/REWIND/SELECT, SURPASS-2/SURMOUNT-1, FIDELIO/FIGARO, UKPDS33/80, ACCORD, DAPA-HF); fixed FIDELIO-DKD PMID 33069562->33264825; removed off-disease POINT/REDUCE; KDIGO 2024->2022 corrected to the verified guideline edition.
Entry points (4)
- lab_abnormalityHbA1c ≥6.5% / elevated FPG / 2-h OGTT ≥200 (ADA 2026 §2 diagnostic criteria)a1c_elevated
- symptomPolyuria + polydipsia + weight loss per ADA 2026 §2polyuria_polydipsia
- problem_listEstablished T2DM (titration / annual review per ADA 2026 §4)type_2_diabetes
- problem_listPrediabetes for surveillance + DPP referral per ADA 2026 §3prediabetes
Required inputs (13)
- agerequireddemographic • used at CONTEXTAge modulates A1c target (frailty, life expectancy) and CV risk per ADA 2026 Table 6.2
- weightrequiredvital • used at CONTEXTBMI gates GLP-1/dual agonist + bariatric referral; weight target per ADA 2026 §8
- sbprequiredvital • used at CONTEXTBP target <130/80 in T2D per 2025 ACC/AHA HTN guideline
- a1crequiredlab • used at INITIAL_WORKUPDiagnostic (≥6.5%), target-tracking, regimen escalation trigger per ADA 2026 §2
- creatininerequiredlab • used at INITIAL_WORKUPeGFR gates SGLT2i (≥20), metformin (≥30), dose adjustments per KDIGO 2024 + ADA 2026 §11
- uacrrequiredlab • used at INITIAL_WORKUPUACR ≥30 → finerenone + RAAS optimization (KDIGO 2024)
- lipid_panellab • used at INITIAL_WORKUPStatin candidacy + CV risk; 2026 ACC/AHA dyslipidemia targets
- ascvdrequiredhistory • used at CONTEXTEstablished ASCVD → GLP-1 RA or SGLT2i with proven CV benefit per ADA 2026 §10 + EASD/ADA 2022 consensus
- heart_failurerequiredhistory • used at CONTEXTHF (HFrEF or HFpEF) → SGLT2i mandatory regardless of A1c per EMPEROR-Reduced (Packer NEJM 2020) + DAPA-HF (McMurray NEJM 2019)
- ckdrequiredhistory • used at CONTEXTCKD → SGLT2i + finerenone + ACEi/ARB optimization per KDIGO 2024 + CREDENCE (Perkovic NEJM 2019) + FIDELIO-DKD (Bakris NEJM 2020)
- mash_nafldhistory • used at CONTEXTBiopsy-proven MASH → GLP-1 RA preferred (ADA 2026)
- current_medsmedication • used at CONTEXTDetect existing GDMT; flag steroids, atypical antipsychotics, beta-blockers (hypoglycemia masking) per ADA 2026 §4
- b12lab • used at MONITORINGMetformin → B12 deficiency; check after 4 yr or with neuropathy per ADA 2026 §9
12-phase flow (12)
- 1FRAMEChronic outpatient T2DM scope per ADA 2026 §2 — exclude DKA/HHS (route to acute engines) and confirm not T1DM (autoantibodies if suspected)inputs: a1cadvance: chronic T2DM scope confirmed per ADA 2026 diagnostic criteria
- 2ENTRYCapture trigger per ADA 2026 §2 (new diagnosis, abnormal screen, follow-up visit, problem-list T2DM)inputs: ageadvance: demographic + entry trigger captured per ADA 2026 screening criteria
- 3CONTEXTCardiorenal cluster screen per ADA 2026 §10 + EASD/ADA 2022 consensus — ASCVD, HF, CKD, obesity, MASH; current meds; pregnancy plansinputs: weight, sbp, ascvd, heart_failure, ckd, mash_nafld, current_medsadvance: cardiorenal phenotype assigned per ADA 2026 Figure 9.3
- 4RED_FLAGSHyperglycemia >300, ketones, AMS → DKA/HHS route per ADA 2026 §16; severe hypoglycemia; foot ulcer/cellulitis; rapid weight loss + B12 deficiencyinputs: a1cadvance: no acute red flags per ADA 2026; if present route to acute engine
- 5INITIAL_WORKUPA1c, FPG, eGFR, UACR, lipid, BMP, LFT (MASH FIB-4), TSH, B12, ECG if cardiac risk, foot exam, retinal screen per ADA 2026 §4 + KDIGO 2024inputs: a1c, creatinine, uacr, lipid_panelactions: panel.glucose_a1c, panel.renal, panel.lipid, panel.lftadvance: baseline labs and complications screen complete per ADA 2026 §4
- 6BRANCHING_WORKUPCV risk stratification (ASCVD calc per 2025 ACC/AHA), MASH workup if elevated LFT, retinopathy referral, neuropathy screen per ADA 2026 §12actions: workup.dka_hhsadvance: complication-specific workups queued per ADA 2026 §11–12
- 7DIFFERENTIALPhenotype per ADA 2026 Figure 9.3: newly-diagnosed uncomplicated, ASCVD, HF, CKD, obesity-cardiometabolic, MASH, pre-pregnancy planning, frail/end-of-lifeadvance: phenotype assigned per ADA 2026 cardiorenal-first framework
- 8RISK_STRATIFICATIONASCVD 10-year risk, PREVENT, frailty assessment for A1c target individualization per ADA 2026 §6 + UKPDS (Lancet 1998) legacy effectactions: calc.ckd_epi_2021advance: A1c target individualized per ADA 2026 Table 6.2; CV risk documented
- 9TREATMENTLifestyle (5-7% wt loss target per ADA 2026 §8) + cardiorenal-driven first-line per ADA 2026 Table 9.1: SGLT2i for HF/CKD, GLP-1 RA for ASCVD/obesity/MASH; metformin add-on; finerenone if albuminuric per KDIGO 2024; statin + RAAS + BP control; CGM if benefitsinputs: weight, sbp, creatinine, uacr, ascvd, heart_failure, ckdadvance: phenotype-driven regimen selected per ADA 2026 §9; safety rules cleared; education delivered
- 10DISPOSITIONRoutine outpatient cadence per ADA 2026 §4; nephrology if eGFR <30 per KDIGO 2024; bariatric if BMI ≥35 + DM; endocrine for new-onset insulin or pumpadvance: visit cadence + referrals set per ADA 2026 §4
- 11MONITORINGA1c q3m until target then q6m per ADA 2026 §6; UACR + eGFR q3-6m if CKD per KDIGO 2024; BP each visit; weight quarterly; B12 q1-2y on metformin; retinal annually; foot annually per ADA 2026 §4inputs: a1c, creatinine, uacr, b12actions: panel.glucose_a1c, panel.renaladvance: monitoring schedule documented per ADA 2026 §4 + KDIGO 2024
- 12FOLLOWUPDSME, vaccinations (flu/pneumococcal/COVID/RSV/Tdap/HepB/zoster), psychosocial + fear-of-hypoglycemia + anxiety screen (ADA 2026), pre-pregnancy counselingadvance: follow-up scheduled per ADA 2026 §5; education + screening complete