ClinLine/USDM_SDTM_mapper ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python tool that takes the SDTM mapping workbook and a USDM trial design JSON file, runs the saved mapping expressions against the JSON, and produces an output Excel file with the trial summary domains filled in for TA, TE, TV, TI, and TS.

I want it to read the mapping definitions from the spreadsheet, process the results with the right grouping and sequence numbering, and write everything back in the same workbook style so it is easy to review. Please keep the current sheets and formatting intact as much as possible, and make the output land in a results file. If some mappings are empty or need special handling like code values, null flavours, or study id in TS, handle that cleanly.

If you need to check current docs for the JSON matching library or Excel handling, feel free to look them up online. Also make the code easy to extend later since I may want to add more mappings and extra parsing support.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab