Back to Blog

research

ADTTE Derivation with the admiral-adtte Skill

Learn how the admiral-adtte agent skill helps generate CDISC-compliant ADaM time-to-event datasets from SDTM domains.

OpenAgentSkillPublished:

Where this fits

A clinical programmer has SDTM AE, DS, and CE domains plus a completed ADSL, but still needs an ADTTE dataset for an oncology safety analysis. Defining which records are events versus censorings, deriving AVAL in days, and producing QC-ready CDISC-compliant code is exactly the task this skill automates. It turns a well-defined ADTTE specification into an executable {admiral} workflow rather than leaving date logic to guesswork.

Why agents benefit

  • Reads the ADTTE specification and maps event/censoring rules to admiral::derive_param_tte() parameters, reducing blind spot errors in endpoint definitions.
  • Picks the appropriate SDTM source domain—AE, DS, or CE—based on the requested endpoint, e.g., time to first event or time to death.
  • Generates code with # REVIEW: annotations and stopifnot() checks, so the agent outputs a package-ready script that a human reviewer can validate.
  • Applies ADaM BDS-TTE naming conventions such as CNSDT, CNSDTD, EVNTDESC, ADT, and AVAL, which keeps submissions consistent.
  • Reuses shared parent conventions for dates, pipes, and flags, making the generated code easier to audit across multiple admiral-based skills.

Practical scenarios

Time to first adverse event

When an analysis needs time to first treatment-emergent AE, the agent uses AE as the source domain, filters to the relevant preferred terms, and sets the event date as the earliest AE start date. Subjects without a matching AE are censored at their last known alive date derived from ADSL.

Overall survival from DS

Using the DS domain, the skill derives time to death as the event and treats early discontinuations, ongoing participants, or lost-to-follow-up as censored at the last known alive date. This scenario requires explicit censor definitions so the output aligns with the statistical analysis plan.

Time to progression from CE

For studies without a formal tumor response SDTM domain, CE can support time to disease progression. The agent maps progression records in CE to the event, uses the earliest progression date, and censors at the last adequate tumor assessment stored in ADSL or a supplemental domain.

Add it to your agent workflow

Install the skill with:

npx skills add RConsortium/pharma-skills --skill admiral-adtte

Then prompt your agent with a focused request like:

Use admiral-adtte to create ADTTE for time to first serious adverse event.
Source domains: AE, DS. ADSL is complete.
Spec: event = first SAE record; censor at last known alive date.
Output QC-ready R code using {admiral}.

The agent will load the skill, inspect the supplied spec, and emit an ADTTE derivation script that follows admiral conventions. More detail and version notes are available at https://www.openagentskill.com/skills/rconsortium-admiral-adtte.

Compare before adopting

  • Quality signals: inspect generated variables against ADaM BDS-TTE requirements; good output includes ADT, AVAL, CNSDT, and EVNTDESC, and uses derive_param_tte() rather than hand-rolled SQL.
  • Maintenance freshness: check the skill version against {admiral} release notes; time-to-event helper signatures occasionally change.
  • Alternatives: compare with {admiral} template use_ad_template("ad_adtte") plus manual parameter mapping, or a hand-written R script. The skill is valuable mainly when your team wants repeatable agent-driven generation.
  • Workflow fit: confirm your ADTTE spec uses conventions the skill recognizes. Custom censor codes or unusual endpoint definitions may require extra prompt guidance or post-processing.

Why it is worth tracking

This skill is part of the RConsortium pharma-skills repository, backed by pharmaverse contributors such as Navitas Data Sciences and showing community momentum with more than 100 stars. ADTTE is a core ADaM dataset in clinical reporting, so a maintained skill that encodes CDISC rules can save programming time and reduce specification-transfer errors. Track it, and evaluate it whenever your team builds R-based SDTM-to-ADaM pipelines or equips agents to generate submission-ready datasets.

Featured Skill

admiral-adtte

Skill by RConsortium