sdtm-mapping

Automate SDTM mapping of raw clinical trial data into CDISC-compliant .xpt datasets and Define.xml.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/siddharthchauhan/ETL --skill sdtm-mapping
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sdtm-mapping
Source: https://github.com/siddharthchauhan/ETL/tree/main/sdtm_pipeline/deepagents/skills/sdtm-mapping
Command: npx skills add https://github.com/siddharthchauhan/ETL --skill sdtm-mapping

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openpyxl, pandas, pyreadstat, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the SDTM data mapping process, converting raw clinical trial data into CDISC SDTM-compliant datasets for regulatory submissions.

Core Features & Use Cases

  • Mapping Specification Templates: Generates domain mapping specs to standardize variable mappings across DM, AE, LB, and more.
  • CT & Terminology Guidance: Provides consistent controlled terminology references and mapping examples.
  • End-to-End SDTM Output: Produces SDTM datasets in SAS Transport format and a skeleton Define.xml outline for submission.
  • Use Case: A data manager can map a DM dataset to SDTM with a single run, then extend to AE/LB with SUPP-- qualifiers as needed.

Quick Start

Use the mapping template generator to create a DM domain specification:

  • python scripts/generate_mapping_template.py --domain DM --output dm_mapping_template.xlsx

Frequently Asked Questions about sdtm-mapping

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate SDTM mapping for raw clinical trial data?

Automate SDTM mapping by applying a domain mapping specification workflow to raw clinical trial data, deriving --SEQ, DY, EPOCH, and USUBJID variables to produce CDISC SDTM-compliant datasets.

What is the best way to generate SDTM datasets and define.xml for regulatory submissions?

Generate SDTM datasets and define.xml by mapping raw data to domains like DM, AE, and LB, ensuring controlled terminology compliance, and outputting SAS Transport files alongside a skeleton Define.xml.

How does controlled terminology alignment work during SDTM domain mapping?

Controlled terminology alignment applies consistent CT references and mapping examples to raw data, ensuring derived variables like EPOCH and --SEQ comply with regulatory submission standards.

Can I use Python with pandas and pyreadstat to create SDTM .xpt transport files?

Yes, Python with pandas and pyreadstat processes raw clinical trial data and outputs SDTM-compliant SAS Transport (.xpt) datasets for regulatory submission packages.

Does this SDTM mapping approach support supplementary SUPP-- qualifier domains?

Yes, the SDTM mapping workflow supports extending standard domains like DM, AE, and LB with SUPP-- qualifiers to capture non-standard variables for regulatory submissions.

How do I create a mapping specification template for an SDTM DM domain?

Create a DM domain mapping specification template by running the mapping template generator script, which outputs a standardized Excel file to define variable mappings.