MedDCR: Learning to Design Agentic Workflows for Medical Coding

Jiyang Zheng, Islam Nassar, Thanh Tien Vu, Xu Zhong, Yang Lin, Tongliang Liu, Long Duong, Yuan-Fang Li

Introduction: The Medical Coding Challenge

Medical coding—the translation of clinical notes into standardized ICD (International Classification of Diseases) codes—is a critical yet labor-intensive bottleneck in healthcare. Unlike simple classification, it requires nuanced reasoning: extracting clinical entities, navigating hierarchical codebooks, and ensuring consistency across diagnoses.

Existing automated systems typically fall into two categories:

  1. Flat Classifiers: Pre-trained language models (PLMs) that treat coding as an extreme multi-label classification task, often missing the reasoning required for rare codes.
  2. Manual Agentic Workflows: Expert-designed pipelines that use LLMs. While interpretable, these are rigid and difficult to optimize manually.

MedDCR addresses this "design problem" by automating the discovery of optimal agentic workflows through an iterative learning process.

The MedDCR Framework: Automated Workflow Design

MedDCR (Medical Design-Coding-Reflection) is a closed-loop framework that treats workflow design as a search problem. It consists of three primary meta-agents and a memory archive.

The MedDCR framework consists of two main phases: Memory Archive Initialisation and Iterative Workflow Optimisation.

The framework operates through a "Designer-Coder-Reflector" loop:

  • The Designer: Proposes high-level workflow plans (e.g., term extraction, index lookup) by drawing from the Memory Archive to refine previous successes or explore new strategies.
  • The Coder: Translates abstract plans into executable Python code, utilizing a self-fixing loop to resolve syntax or execution errors.
  • The Reflector: Evaluates workflows on a validation set, providing quantitative scores (F1) and detailed textual feedback to guide the Designer's next iteration.
  • Memory Archive: Stores "Elite" and "Recent" designs, balancing the exploitation of proven strategies with the exploration of new ones.

Experimental Evaluation and Results

The framework was evaluated on two ICD-10 coding benchmarks: MDACE (real-world clinical notes from MIMIC-III) and ACI-BENCH (a synthetic benchmark for accuracy and explainability).

Performance comparison of MedDCR against PLMs, manual coder workflows, and other agentic methods on MDACE and ACI-BENCH datasets.

Key Findings

  • State-of-the-Art Performance: MedDCR-GPT-5 achieved significant improvements, with a 6.2% F1 gain on MDACE and a 7.4% gain on ACI-BENCH over the best baselines.
  • The Power of Feedback: Ablation studies highlighted that textual critiques from the Reflector are essential; without them, the Designer often fails to diagnose and fix workflow failures, leading to performance plateaus.
  • Interpretability and Efficiency: MedDCR produces structured Python programs, offering transparency compared to "black-box" models. Furthermore, the search overhead is modest, with the design phase requiring fewer than 20k tokens per loop.

Discussion and Future Work

While MedDCR demonstrates the potential of automated agent design, several avenues for improvement remain. The current system relies on general-purpose LLMs; integrating medically fine-tuned models could further enhance accuracy. Additionally, while the iterative search is effective, scaling to real-time environments will require more efficient search strategies. Future iterations may also incorporate multimodal data, such as scanned charts, to provide a more holistic clinical view.

By shifting from "coding a solution" to "coding an agent that finds the solution," MedDCR provides a scalable bridge between human expertise and automated medical coding.

Summary updated

BibTeX
@inproceedings{zheng2026meddcr,
  author = {Jiyang Zheng and Islam Nassar and Thanh Tien Vu and Xu Zhong and Yang Lin and Tongliang Liu and Long Duong and Yuan-Fang Li},
  title = {{MedDCR: Learning to Design Agentic Workflows for Medical Coding}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.627},
}
Figure