Case Study

Modernizing HCUP’s legacy production workflow with agentic AI

Faster modernization, lower costs: Using agentic AI to transform legacy SAS processes into maintainable Python code

Client

Agentic AI helped modernize a mission-critical HCUP production workflow while preserving the quality and reliability of trusted public data products

67%
Reduction in development effort (roughly $40,000 in annual savings)
Client Need

Modernizing a mission-critical production workflow

The Healthcare Cost and Utilization Project (HCUP), a flagship initiative of the Agency for Healthcare Research and Quality, was relying on legacy Statistical Analysis System (SAS) applications and SAS Dynamic Data Exchange (DDE)–based workflows to produce public-facing, Section 508-compliant tables. Although reliable, these processes required specialized SAS expertise and had become increasingly difficult to maintain. Mathematica sought a practical way to modernize this recurring workflow while preserving the sound business logic behind it.

Our Approach

Using agentic AI to modernize trusted business logic

Rather than translating the legacy SAS programs line by line, Mathematica used OpenAI Codex as an agentic artificial intelligence (AI) development assistant to recreate the production workflow from the underlying business rules and expected outputs. This approach generated modern, maintainable Python code without extending the client’s dependence on legacy technology.

Throughout development, Mathematica experts validated AI-generated outputs against the existing production process; refined prompts; and confirmed that the new workflow consistently produced the expected public-facing, Section 508-compliant tables. By combining agentic AI with expert oversight, the team accelerated modernization while maintaining confidence in the quality and reliability of the results.

Key Outcomes

Faster modernization, lower costs, and a stronger foundation for the future

Mathematica’s AI-assisted modernization improved development productivity while creating a more sustainable technology foundation for future HCUP production work. Specifically, our project:

  • Reduced development effort by about two-thirds. A task estimated to require roughly 300 staff hours using traditional development methods was completed in about 100 hours using Codex-assisted development.
  • Estimated an annual savings of about $40,000. Reducing development effort for this recurring production task lowered ongoing maintenance costs while accelerating modernization.
  • Accelerated migration away from legacy technology. Replacing SAS DDE–based processes with maintainable Python code reduced the client’s reliance on increasingly scarce SAS development expertise and created a more flexible foundation for future enhancements.
  • Demonstrated a practical model for responsible AI-assisted modernization. The project showed that agentic AI can greatly accelerate legacy modernization when paired with expert oversight, thoughtful prompting, and deep domain expertise.

Our takeaway

Many public-sector organizations are struggling to preserve their trusted production processes while reducing their dependence on aging technology. This project shows that modernizing legacy systems does not mean sacrificing quality or institutional knowledge. By combining agentic AI with rigorous expert oversight, Mathematica accelerated modernization, reduced development costs, and created a more maintainable production workflow. The result offers a practical model for responsibly modernizing mission-critical public-sector data systems while enabling technical experts to focus on higher-value analytical and engineering work.

Partners In Progress

Sheng Wang

Sheng Wang

Principal Data Scientist

View Bio Page

Efficiency Meets Impact.
That's Progress Together.

To solve their most pressing challenges, organizations turn to Mathematica for deeply integrated expertise. We bring together subject matter and policy experts, data scientists, methodologists, and technologists who work across topics and sectors to help our partners design, improve, and scale evidence-based solutions.

Work With Us