As a clinical trial statistician or programmer, challenge anything in this benchmark: describe a problem in Comments, or propose a fix with the Edit button on any source file.
- Task: Would a real study need this derivation, specified this way? Does it follow CDISC ADaM: variable names, controlled terms, record structure? Flag any rule that is ambiguous or that a sponsor would handle differently.
- Inputs: Do they look like data collected in a real trial, and do they include the situations you would expect to meet in one?
- Expected output: Would independent QC programming reproduce every value from these inputs and rules?
The other tabs beside Comments are background for assessment, not under review.
Summary
README.mdGoal: complete a collected birth date to the first and last day of its month and read how much was collected.
Input: subject-level records carrying a birth date as text
DOBTC (a year, a year and month, or a full date), an
assessment moment DTM, and a reference start date REFDT.
All three reach the output as collected, blank when nothing was
collected.
Variables:
DOB_FIRSTholds the birth date with a missing month set to June and a missing day set to the first of the month; a full date stands as collected, and blank stays blank.DOB_LASTholds the birth date completed the same way, but with a missing day set to the last of the month, so February lands on the 28th or 29th by year; a full date stands as collected, and blank stays blank.DOB_PREC_TXholdsYfor a year alone,Mfor a year and month, andDfor a full date, read from the collected text; blank when the text is blank.DOB_PREC_DTholds the same code read from the completed first-day date; blank when there is no completed date.DTMDTholds the calendar day of the assessment moment; blank when the moment is blank.DOBDYholds the study day of the completed first-day date against the reference start, with the reference itself as day one and no zero; blank when either date is blank.
Note: a year alone may receive both a month and a day here, while a complete date is never moved. Precision follows the collected text through completion, and the study day counts a collected day exactly as a supplied one would count.
Inputs
Under review1 source fileinput/adsl.csv
Edit5 rows| STUDYID | USUBJID | DOBTC | DTMSTR | REFDTSTR |
|---|---|---|---|---|
| CATH | 1975 | 2025-01-12T14:00 | 1975-06-01 | |
| CATH | 1980-02 | 2024-02-29T23:59:59 | 1980-02-02 | |
| CATH | 1990-06-15 | 1990-06-15T00:00:00 | 1990-06-15 | |
| CATH | — | — | 2025-01-01 | |
| CATH | 2000-02 | 2000-02-29T12:00 | 2000-01-15 |
Expected output
Under review5 expected rowsexpected/adsl.csv
Edit5 rows| STUDYID | USUBJID | DOBTC | DTM | REFDT | DOB_FIRST | DOB_LAST | DOB_PREC_TX | DOB_PREC_DT | DTMDT | DOBDY |
|---|---|---|---|---|---|---|---|---|---|---|
| CATH | 1975 | 2025-01-12T14:00:00 | 1975-06-01 | 1975-06-01 | 1975-06-30 | Y | Y | 2025-01-12 | 1 | |
| CATH | 1980-02 | 2024-02-29T23:59:59 | 1980-02-02 | 1980-02-01 | 1980-02-29 | M | M | 2024-02-29 | -1 | |
| CATH | 1990-06-15 | 1990-06-15T00:00:00 | 1990-06-15 | 1990-06-15 | 1990-06-15 | D | D | 1990-06-15 | 1 | |
| CATH | — | — | 2025-01-01 | — | — | — | — | — | — | |
| CATH | 2000-02 | 2000-02-29T12:00:00 | 2000-01-15 | 2000-02-01 | 2000-02-29 | M | M | 2000-02-29 | 18 |
Comments and assessment materials
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADSL | STUDYID | Study Identifier | character | Copy value from SOURCE.STUDYID. | Predecessor | ||
| ADSL | USUBJID | Unique Subject Identifier | character | Copy value from SOURCE.USUBJID. | Predecessor | ||
| ADSL | DOBTC | Date of Birth (Collected Text) | character | Copy value from SOURCE.DOBTC. | Predecessor | ||
| ADSL | DTM | Datetime of Assessment | numeric | ISO 8601 | Copy value from SOURCE.DTMSTR. | Predecessor | |
| ADSL | REFDT | Reference Start Date | numeric | ISO 8601 | Copy value from SOURCE.REFDTSTR. | Predecessor | |
| ADSL | DOB_FIRST | Date of Birth Completed to First Day | numeric | ISO 8601 | Impute incomplete date from DOBTC, defaulting month=6, day=first; a missing source → blank; invalid text → blank. | Derived | |
| ADSL | DOB_LAST | Date of Birth Completed to Last Day | numeric | ISO 8601 | Impute incomplete date from DOBTC, defaulting month=6, day=last; a missing source → blank; invalid text → blank. | Derived | |
| ADSL | DOB_PREC_TX | Date of Birth Precision From Text | character | Collected date precision of DOBTC: D for a complete date, M for year and month, Y for a year alone; a missing source → blank; invalid text → blank. | Derived | ||
| ADSL | DOB_PREC_DT | Date of Birth Precision From Date | character | Collected date precision of DOB_FIRST: D for a complete date, M for year and month, Y for a year alone; a missing source → blank. | Derived | ||
| ADSL | DTMDT | Date of Assessment | numeric | ISO 8601 | Take the date part of DTM. | Derived | |
| ADSL | DOBDY | Study Day of Birth Completion | numeric | CDISC study day of DOB_FIRST against REFDT as day 1; there is no day zero. | Derived |
| Version | Date | Author | Description | Reviewer | Sign-off |
|---|---|---|---|---|---|
| 1.3 | 2026-09-29 | yamaa docs build | Show study codelist names, external dictionaries, and ISO 8601 formats in variable rows; list the document's codelist values and metadata | ||
| 1.2 | 2026-09-29 | yamaa docs build | Classify ADaM copies from a declared input as Predecessor and recodes as Derived, and SDTM recodes of locally derived columns as Derived | ||
| 1.1 | 2026-09-29 | yamaa docs build | Resolve lookups into the donor record they select, and give every derivation shape a plain-language rule instead of its raw YAML | ||
| 1.0 | yamaa docs build | Initial generation from spec.yaml |
yamaa
Comments
Signed in with GitHub; saved in repository Discussions