🤖 AI Summary
Legacy clinical reporting systems hinder AI integration and impede drug development and pharmacovigilance due to opaque outputs and the absence of machine-readable intermediate representations. This work proposes a non-intrusive, metadata-driven framework that bridges legacy components—without modifying their source code—through mapping layers, a typed intermediate representation (IR), and coordinator wrappers, thereby transforming their outputs into structured data suitable for large language models (LLMs) and enabling progressive replacement. Validated on 558 SAS components (373k lines of code), the approach achieves immediate AI readiness in coexistence mode, reduces proprietary code by 92% after optional integration, and demonstrates unit-level consistency exceeding 80% across 11 of 14 report types (mean: 82.7%, peak: 99.2%). Five reports achieved 100% compliance on the CDISCPilot01 benchmark, and the framework successfully enabled LLM-driven automated pharmacovigilance, table summarization, and trial configuration generation.
📝 Abstract
Drug development and pharmacovigilance are frequently bottlenecked by legacy clinical reporting pipelines. These monolithic systems encode regulatory-grade logic but resist AI integration by producing opaque output with no machine-readable intermediate layer. Existing modernization approaches force a choice between full rewrites and incremental refactoring that preserves structural barriers. We present a non-destructive methodological framework achieving AI-driven pharmacoinformatics readiness without altering legacy source code. A metadata layer--comprising a bridge map, a typed Intermediate Representation (IR), and an orchestrator--wraps existing components and re-exposes their outputs as structured data consumable by LLMs. It enables optional incremental consolidation, replacing selected legacy components with metadata-configured core routines while the remainder operates unchanged. Validated on a 558-component SAS reporting library (373,000 lines of code), the framework demonstrated immediate AI-readiness under coexistence mode, yielding machine-readable output. Where consolidation was elected, the modernized core achieved a 92% reduction in proprietary code. Parity validation on 14 report types from a Phase III study achieved cell-level parity of 80% or above on 11 reports (mean 82.7%, best 99.2%). A benchmark using CDISC CDISCPilot01 data achieved 100% parity across 5 reports. LLM experiments confirmed the IR enables automated pharmacovigilance, table summarization, and trial configuration generation. The framework offers a regulation-aware path to AI-integrated clinical reporting, accelerating drug development without interrupting regulatory submissions.