Skip to content
FlowScript templates

Clinical — RCT / CONSORT 2010

CONSORT 2010 flow with arithmetic validation built in. Typed FlowScript for clinical trials. Keywords: CONSORT, randomised, randomized, trial, RCT, flow diagram, PRISMA, cohort.

Template previewFlowScript
PrimaryRANDOMISED, DOUBLE-BLIND, PARALLEL-GROUP TRIALScreenedn = 1502Source: EHR query 2023-05Eligiblen = 1240Excluded (n = 262)• Ineligible: 198• Declined: 64Randomisedn = 1200Excluded (n = 40)• Withdrew: 40Control — Placebon = 600Treatment — Drug X 50 mg dailyn = 600PRIMARY OUTCOMES30-day all-cause mortality72/600 (12%) vs 48/600 (8%) · p = 0.021

Make it your own.

// CONSORT 2010 flow with arithmetic validation built in.
// Try editing any `n` — the validator will catch any inconsistency
// instantly.

study primary {
  design: "Randomised, double-blind, parallel-group trial"
  location: "14 sites, US + EU"
  period: "2021-09 — 2023-04"
  registry: "NCT04123456"
}

cohort screened {
  n: 1502 source "EHR query 2023-05"
}

cohort eligible {
  n: 1240
  from: screened
  excluded: {
    ineligible: 198
    declined: 64
  }
}

cohort randomised {
  n: 1200
  from: eligible
  excluded: {
    withdrew: 40
  }
}

arm control {
  n: 600
  from: randomised
  intervention: "Placebo"
}

arm treatment {
  n: 600
  from: randomised
  intervention: "Drug X 50 mg daily"
}

outcome mortality_30d {
  metric: "30-day all-cause mortality"
  control:   { events: 72, n: 600, rate: 12.0% }
  treatment: { events: 48, n: 600, rate: 8.0%  }
  // The rate and the p are both recomputed from the counts beside them:
  // 72/600 = 12.0%, and chi-squared on this table gives 0.021.
  test: "chi-squared"
  p: 0.021
}

view methods: consort(primary)