← All publications

Conference Paper

GenAI Assisted Code Conversion: From SAS to R Standard ADaM Templates

Jeff Cheng, Srinivas Malipeddi, Gurubaran Veeravel, Jaime Yan, Suhas R. Sanjee

PharmaSUG 2025 · 2025 · AI-239

DOI · 10.5281/zenodo.22182918

Abstract

As clinical trial Analysis & Reporting shifts toward open-source languages, our organization needed to convert its SAS-based ADaM standards library to R. This paper presents a GenAI-assisted conversion methodology using a structured workflow of source pre-processing, logical code segmentation, and iterative prompt engineering that accumulates conversion instructions from previously converted templates, followed by human validation comparing converted R outputs against the validated SAS-generated ADaM datasets. Using ChatGPT-4o and Claude 3.5 Sonnet, the effort converted about 78% of the SAS ADaM templates, with about 66% of the converted code used without modification, though macro-heavy templates still required significant human intervention.

Keywords

SAS to R · code conversion · GenAI · ADaM · migration · prompt engineering

Cite

Jeff Cheng, Srinivas Malipeddi, Gurubaran Veeravel, Jaime Yan, Suhas R. Sanjee. "GenAI Assisted Code Conversion: From SAS to R Standard ADaM Templates." PharmaSUG 2025, 2025. doi:10.5281/zenodo.22182918.