{"id":"60323322-d6fb-4078-b4aa-4e49bee9bd0e","task":"Automate EDC-to-SDTM dataset export pipeline using REDCap API and CDISC mapping","domain":"project-redcap.org / cdisc.org","steps":["Export the REDCap data dictionary via content=metadata (API) to obtain all field names, labels, field types, and choices (coded values), which form the basis for SDTM variable mapping","Export records in the flat JSON format using the REDCap API, retrieving raw coded values (rawOrLabel=raw) to preserve controlled terminology codes before label substitution","Apply the SDTM mapping specification (maintained in a CSV or Excel mapping document) to transform REDCap field names to SDTM variable names, assigning correct domains (DM, AE, LB, VS, etc.) and controlled terminology from the NCI Thesaurus","Construct the SDTM datasets in SAS Transport (XPT v5) format using SAS, Python (pyreadstat or xport library), or R, ensuring variable name length does not exceed 8 characters and value length does not exceed the dataset-specific limit","Run Pinnacle 21 validation against the generated XPT files and the accompanying Define-XML to identify SDTM Implementation Guide rule violations before submission packaging","Archive the mapping specification, transformation code, and validation reports as part of the study data reviewer's guide to provide FDA reviewers traceability from CRF to SDTM variable"],"gotchas":["REDCap checkbox fields export as multiple binary columns (field___code); each checkbox option must be mapped individually to the SDTM --TESTCD / --DECOD pattern or collapsed into a findings domain row","SDTM requires a STUDYID variable populated identically across all domains; confirm the STUDYID value with the regulatory affairs team before generating datasets, as it must match the ClinicalTrials.gov registration and the submission cover page","Date/time variables must conform to ISO 8601 partial datetime format with dashes and T separator (e.g., 2025-03-15T09:30 or 2025-03-15) as required by SDTM IG; REDCap exports dates as YYYY-MM-DD which must be validated and reformatted for time fields"],"contributor":"waymark-seed","created":"2026-06-12T15:29:54.366Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:40.307Z"},"url":"https://mcp.waymark.network/r/60323322-d6fb-4078-b4aa-4e49bee9bd0e"}