ARS reporting event JSON from a table shell and SAP
Paste SAP excerpts and a define.xml extract, get draft CDISC ARS JSON; it passed the real schema only after one fix.
About 30 minRWorked example, recomputed
What you get
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Analysis ID | Analysis | Analysis set | Data subset | Method | Dataset.variable | Purpose | Reason |
| 2 | AN_BASE | ADAS-Cog (11) baseline summary | AS_EFF | DS_ACTOT_WK24 | Summary statistics for a continuous variable | ADQSADAS.BASE | PRIMARY OUTCOME MEASURE | SPECIFIED IN SAP |
| 3 | AN_WK24 | ADAS-Cog (11) Week 24 summary (LOCF) | AS_EFF | DS_ACTOT_WK24 | Summary statistics for a continuous variable | ADQSADAS.AVAL | PRIMARY OUTCOME MEASURE | SPECIFIED IN SAP |
| 4 | AN_CHG | ADAS-Cog (11) change from baseline to Week 24 summary (LOCF) | AS_EFF | DS_ACTOT_WK24 | Summary statistics for a continuous variable | ADQSADAS.CHG | PRIMARY OUTCOME MEASURE | SPECIFIED IN SAP |
| 5 | AN_DR | ADAS-Cog (11) Week 24 ANCOVA dose-response test | AS_EFF | DS_ACTOT_WK24 | ANCOVA dose-response test | ADQSADAS.CHG | PRIMARY OUTCOME MEASURE | SPECIFIED IN SAP |
| 6 | AN_PW_XLOW_PBO | Pairwise: Xanomeline Low Dose - Placebo | AS_EFF | DS_ACTOT_WK24 | ANCOVA pairwise comparison of LS means | ADQSADAS.CHG | PRIMARY OUTCOME MEASURE | SPECIFIED IN SAP |
| 7 | AN_PW_XHIGH_PBO | Pairwise: Xanomeline High Dose - Placebo | AS_EFF | DS_ACTOT_WK24 | ANCOVA pairwise comparison of LS means | ADQSADAS.CHG | PRIMARY OUTCOME MEASURE | SPECIFIED IN SAP |
| 8 | AN_PW_XHIGH_XLOW | Pairwise: Xanomeline High Dose - Xanomeline Low Dose | AS_EFF | DS_ACTOT_WK24 | ANCOVA pairwise comparison of LS means | ADQSADAS.CHG | PRIMARY OUTCOME MEASURE | SPECIFIED IN SAP |
Swipe sideways to see every column.
The 7 analyses in the draft JSON, from the fixed file. Valid ARS after one change (version 1, not "1"); valid does not mean right.
Draft for review. Public data only.
The prompt
From the SAP excerpts, define.xml extract and schema extract below, write the CDISC ARS v1.0
reporting event for one display: Template 5 at Week 24 (ADAS-Cog (11) change from baseline).
Return one JSON object that follows the schema extract: analysis set, treatment grouping, data subsets,
methods with operations, analyses, output. Bind datasets and variables only from the define.xml extract.
Add no analysis the excerpts do not support. End with a list of what you could not determine.
[paste SAP excerpts, define.xml extract and ARS schema extract here]Works in any chat assistant; not tested in Microsoft 365 Copilot. Needs Python with jsonschema to validate.
Sample input used here
SAP Template 5 and define.xml extract, CDISCPILOT01
[SAP 10.1.1, p.13] The primary analysis of the ADAS-Cog (11) at Week 24 will use the efficacy population with LOCF imputation for any missing values at Week 24. For each of these analyses, an ANCOVA model will be used with the baseline score, site, and treatment included as independent variables. Treatment will be included as a continuous variable, and results for a test of dose response will be produced. Interaction terms will not be investigated. If the test for dose response is statistically significant, pairwise comparisons among the 3 groups will be performed and evaluated at a significance level of 0.05. [SAP 13.2, Template 5, p.23] Population: Efficacy ADAS Cog (11) - Change from Baseline to Week xx - LOCF Columns: Placebo (N=xxx) | Xanomeline Low Dose (N=xxx) | Xanomeline High Dose (N=xxx) Baseline: N; Mean (SD) xx.x (xx.xx); Median (Range) xx.x (xx;xxx) Week xx: N; Mean (SD); Median (Range) Change from Baseline: N; Mean (SD); Median (Range) P-value(Dose Response) [1][2] x.xxx P-value(Xan - Placebo) [1][3] x.xxx (low), x.xxx (high) Diff. of LS Means (SE) xx.x(x.xx); 95% CI (xx.xx;xx.xx) P-value(Xan High - Xan Low) [1][3] x.xxx Diff. of LS Means (SE) xx.x(x.xx); 95% CI (xx.xx;xx.xx)
CDISC pilot SAP and define.xml, credited to CDISC. The schema extract (property names only) is from the CDISC ARS repository.
How this was checked
Result
Generated by Claude on 2026-10-21; schema validation and bindings check re-run 2026-10-24.
Worked example, recomputed. A script recomputed the values from the data and they matched or were flagged. Statements a script cannot test were checked by a second Claude agent.
Prompt shortened for this page. The output shown came from the earlier run of the longer prompt (2026-10-21).
Re-check on 2026-10-24. Validator re-run on the saved run B output with the schema at commit bbebea4: 1 error as written, 0 after the fix. check_bindings.R re-run with R 4.6.1 gives the same output as the saved run. Code only: the AI was not re-run. The shortened prompt leaves out the 'say where you are unsure' sentence, as in run B.
The longer prompt that was checked
From the excerpts above, write the CDISC Analysis Results Standard (ARS) v1.0 reporting event JSON for this one display: Template 5 run for Week 24 (the ADAS-Cog (11) change from baseline table). Return one JSON object (the ReportingEvent) that follows the schema extract, then a list of everything you could not determine from the excerpts. Include the analysis set, the treatment grouping with its three groups, any data subsets, the analysis methods with their operations, the analyses (baseline, Week 24 and change summaries; dose response; pairwise comparisons), the output and its display, and the list of contents. Bind datasets and variables only from the define.xml extract. Do not add analyses the excerpts do not support; if you add something from habit, say so in its description.
A one-line prompt for comparison
Prompt: make me CDISC ARS JSON for my ADAS-Cog change from baseline at week 24 table
Below is an illustrative CDISC ARS (Analysis Results Standard, v1.0 model) JSON skeleton for an ADAS-Cog change-from-baseline-at-Week-24 table. I wrote it from memory, so validate it against the official ARS JSON schema before use. All IDs, dataset and variable names (ADQS, PARAMCD=ACTOT, AVISIT, CHG, TRT01P, BASE, etc.), treatment arms and covariates are assumptions. Please adapt them to your SAP and ADaM specs. The model is an MMRM-style ANCOVA, and results are left blank for you to populate.
```json
{
"id": "RE_ADASCOG_CFB_W24",
"name": "ADAS-Cog(11) Change from Baseline at Week 24",
"label": "Table 14.2.1 ADAS-Cog Change from Baseline at Week 24 (ITT)",
"version": "1",
"mainListOfContents": {
"contentsList": {
"listItems": [
{
"name": "Table 14.2.1",
"level": 1,
...All 5 checks
- The site covariate is SITEID (17 values). The SAP pools sites; SITEGR1 has 11. Check every covariate against the SAP.
- About 10 of the 15 items the AI could not determine were answerable from the SAP, Template 5, define.xml or the data.
Sources
- CDISC SDTM/ADaM pilot project (CDISC terms of use; used unmodified)
- CDISC Analysis Results Standard v1.0 schema (MIT (code), CC BY 4.0 (content); schema not redistributed here)
Scripts
- Schema validator (also checks ids resolve)
- Bindings check against the pilot data
- Licence (MIT)
- What the AI said it could not determine
- Expected console output: check_bindings_output.txt
- Expected console output: validator_output.txt
- Full input used here
- Record of the earlier run (JSON; the page above reflects the newer check)
- Scripts to rerun this check
Related workflows
All workflows. How we check. Public data only. Drafts for review, not validated output.
Get one workflow a week
Unsubscribe anytime. Privacy.