Schematex

PRISMA 2020 flow diagram

About PRISMA flow diagrams

The PRISMA 2020 flow diagram (Page MJ et al., BMJ 2021;372:n71) is the mandatory figure in every systematic review, meta-analysis, and scoping review published in BMJ, Lancet, JAMA, Cochrane, JBI, and 200+ other journals. It is a single, rigid, four-row figure β€” Identification β†’ Screening β†’ Eligibility β†’ Included β€” with record counts in every box and parallel "excluded" side-boxes.

It is conceptually a flowchart, but the layout, mandatory n = fields, and the dual-pipeline variant are prescribed. Schematex ships prisma as a separate, opinionated engine so the author writes counts and exclusion reasons and the diagram is correct by construction β€” you cannot accidentally omit a count or mis-order a stage. Spec: 28-PRISMA-STANDARD.md.

Distinct from flowchart: a generic flowchart has no notion of mandatory stages, record counts, exclusion side-boxes, or the dual-pipeline merge. Use prisma whenever the figure is a PRISMA review flow.

prismaΒ·Β§ β€”
β†˜ preview
100%
Effect of exercise on chronic low-back pain β€” SR PRISMA 2020 flow diagram (2020-single, systematic-review) β€” 7 boxes, 6 arrows Effect of exercise on chronic low-back pain β€” SR Identification Screening Included Identification of studies via databases and registers Records identified from: PubMed (n = 600) Embase (n = 450) Cochrane (n = 184) Web of Science (n = 184) Total (n = 1,418) Records removed before screening Duplicate records removed (n = 318) Records screened n = 1,100 Records excluded n = 870 irrelevant title (n = 750) non-English (n = 120) Reports assessed for eligibility n = 230 Reports excluded, with reasons: n = 195 wrong population (n = 80) wrong intervention (n = 60) wrong outcome (n = 55) Studies included in review Studies included (n = 35) Reports of included studies (n = 38)
UTF-8 Β· LF Β· 26 lines Β· 508 charsβœ“ parsedΒ·5.9 msΒ·8.5 KB SVG

1. Your first diagram

The minimum is the four stage blocks. Counts are mandatory; the parser refuses to lay out a diagram with a missing total.

prisma

identification:
  databases:
    n: 1000

screening:
  records-screened: 900
  excluded:
    n: 600

eligibility:
  full-text-assessed: 300
  excluded:
    n: 250

included:
  studies: 50

Indentation is significant β€” two spaces per level, like genogram and SLD. The first non-blank line must be prisma. Comments use # or //.


2. Meta lines

Top-level key: value lines, written before the stage blocks:

prisma
mode: 2020-single
kind: systematic-review
title: My review
validate-counts: warn
KeyValuesDefaultMeaning
mode2020-single Β· 2020-dual Β· 20092020-singleSingle column, or dual ("other methods") column.
kindsystematic-review Β· scoping-review Β· ipd Β· nmasystematic-reviewSwaps stage vocabulary (see Β§6).
titlestringβ€”Rendered above the diagram.
validate-countswarn Β· strict Β· offwarnArithmetic checking (see Β§7).
directionTB / TDTBPRISMA is vertical by standard; horizontal is rejected.

3. Identification

The identification: block holds a databases: sub-block (always) and an optional other: sub-block (dual mode).

identification:
  databases:
    n: 1418
    sources: PubMed=600, Embase=450, Cochrane=184
    duplicates-removed: 318
    ineligible-automation: 0
    other-removed: 0
  • n: β€” total records identified (mandatory).
  • sources: β€” name=count pairs, comma-separated. Rendered as an indented breakdown. Names with spaces or punctuation can be quoted: "Web of Science"=184.
  • duplicates-removed:, ineligible-automation:, other-removed: β€” optional removal counts. When any are present they render as a separate "Records removed before screening" box in the right column, connected by a horizontal arrow.

Large numbers may use commas: n: 1,418 is the same as n: 1418.


4. Screening & Eligibility

Both stages carry a main count plus an excluded: block. The excluded block has its own n: and an optional reasons: breakdown.

screening:
  records-screened: 1100
  excluded:
    n: 870
    reasons: irrelevant title=750, non-English=120
  reports-sought: 226        # optional
  reports-not-retrieved: 12  # optional

eligibility:
  full-text-assessed: 230
  excluded:
    n: 195
    reasons: wrong population=80, wrong intervention=60, wrong outcome=55

reasons: are name=count pairs. If you list more than 8, the renderer sorts them descending and aggregates the tail as Other (n = …) so the side-box stays readable.


5. Included

included:
  studies: 35
  reports: 38          # one study may yield several reports
  participants: 28741  # PRISMA-IPD only

studies: is mandatory. reports: and participants: are optional extra count lines.


6. Dual pipeline & review kinds

Dual pipeline β€” the PRISMA 2020 update added a second "Identification via other methods" column (citation searching, hand searches, expert recommendations). Add an other: block; the two columns merge into Screening via a Y-junction.

prisma
mode: 2020-dual

identification:
  databases:
    n: 1234
    duplicates-removed: 254
  other:
    n: 56
    sources: citation-search=30, hand-search=20, expert-recommendation=6

screening:
  records-screened: 1036
  excluded:
    n: 810

eligibility:
  full-text-assessed: 226
  excluded:
    n: 195

included:
  studies: 31

Scoping review β€” kind: scoping-review swaps "studies" β†’ "sources of evidence" and re-labels the stages per Tricco et al. 2018, without changing geometry.

Updated review β€” an optional previous-studies: block draws a dashed box on top that feeds into the identification section:

previous-studies:
  n: 19
  sources: previous review=19

7. Count arithmetic validation

With validate-counts: warn (default) the engine checks that the counts reconcile across stages β€” e.g. databases.n + other.n βˆ’ duplicates-removed = records-screened, and that source/reason breakdowns sum to their totals. Mismatches render a small warning under the diagram (also surfaced in the SVG <desc> for screen readers).

validate-counts: strict turns a mismatch into a parse error with an "off by N" message. off skips checking entirely.


8. Grammar (EBNF)

prisma-document  = "prisma", { meta-line }, stage-block, { stage-block } ;
meta-line        = ("mode:" | "kind:" | "title:" | "review-id:" | "validate-counts:" | "direction:") value ;

stage-block      = previous-block | identification-block | screening-block | eligibility-block | included-block ;

previous-block       = "previous-studies:" , indent, "n:" int, [ "reports:" int ], { "sources:" pairs } ;
identification-block = "identification:" , indent,
                         "databases:" , indent, "n:" int, { "sources:" pairs },
                           [ "duplicates-removed:" int ], [ "ineligible-automation:" int ], [ "other-removed:" int ],
                         [ "other:" , indent, "n:" int, { "sources:" pairs } ] ;
screening-block      = "screening:" , indent, "records-screened:" int,
                         "excluded:" , indent, "n:" int, { "reasons:" pairs },
                         [ "reports-sought:" int ], [ "reports-not-retrieved:" int ] ;
eligibility-block    = "eligibility:" , indent, "full-text-assessed:" int,
                         "excluded:" , indent, "n:" int, { "reasons:" pairs } ;
included-block       = "included:" , indent, "studies:" int, [ "reports:" int ], [ "participants:" int ] ;

pairs            = pair, { "," pair } ;
pair             = (string | quoted) "=" int ;
int              = digit, { digit | "," } ;     (* commas stripped: 1,234 == 1234 *)

Indentation is two spaces per level. Unknown keys inside a stage block are a parse error, keeping each stage well-defined.


9. Standard compliance

Follows the PRISMA 2020 statement (Page MJ, McKenzie JE, Bossuyt PM, et al. The PRISMA 2020 statement: an updated guideline for reporting systematic reviews. BMJ 2021;372:n71) and the reference renderer conventions of the PRISMA2020 R package (Haddaway et al. 2022). Scoping-review vocabulary follows PRISMA-ScR (Tricco et al. 2018); the participants count follows PRISMA-IPD (Stewart et al. 2015). Template: prisma-statement.org/prisma-2020-flow-diagram.


Ready-to-use scenarios from the examples gallery:

prismaΒ·Β§ PRISMA 2020 (Page et al., BMJ 2021;372:n71)
Effect of exercise on chronic low-back pain β€” SR PRISMA 2020 flow diagram (2020-single, systematic-review) β€” 7 boxes, 6 arrows Effect of exercise on chronic low-back pain β€” SR Identification Screening Included Identification of studies via databases and registers Records identified from: PubMed (n = 600) Embase (n = 450) Cochrane (n = 184) Web of Science (n = 184) Total (n = 1,418) Records removed before screening Duplicate records removed (n = 318) Records screened n = 1,100 Records excluded n = 870 irrelevant title (n = 750) non-English (n = 120) Reports assessed for eligibility n = 230 Reports excluded, with reasons: n = 195 wrong population (n = 80) wrong intervention (n = 60) wrong outcome (n = 55) Studies included in review Studies included (n = 35) Reports of included studies (n = 38)
PRISMA 2020 systematic review (single pipeline)
Canonical PRISMA 2020 flow diagram for a systematic review using the dedicated prisma engine β€” records identified across four databases, deduplicated, screened, assessed for eligibility, and included, with exclusion side-boxes and mandatory n = counts.
healthcare & social
prismaΒ·Β§ PRISMA 2020 (Page et al., BMJ 2021;372:n71)
Effect of yoga on chronic back pain β€” SR PRISMA 2020 flow diagram (2020-dual, systematic-review) β€” 8 boxes, 7 arrows Effect of yoga on chronic back pain β€” SR Identification Screening Included Identification of studies via databases and registers Identification of studies via other methods Records identified from: PubMed (n = 600) Embase (n = 450) Cochrane (n = 184) Total (n = 1,234) Records removed before screening Duplicate records removed (n = 254) Identification of studies via other methods citation-search (n = 30) hand-search (n = 20) expert-recommendation (n = 6) Total (n = 56) Records screened n = 1,036 Reports sought for retrieval n = 226 Reports not retrieved (n = 12) Records excluded n = 810 duplicate (n = 120) irrelevant title (n = 560) non-English (n = 130) Reports assessed for eligibility n = 214 Reports excluded, with reasons: n = 191 wrong population (n = 80) wrong intervention (n = 60) wrong outcome (n = 51) Studies included in review Studies included (n = 23) Reports of included studies (n = 25)
PRISMA 2020 dual pipeline (databases + other methods)
PRISMA 2020 flow diagram in dual-pipeline mode β€” identification via databases and registers plus a second column for other methods (citation searching, hand searches, expert recommendations), merged into screening via a Y-junction.
healthcare & social

Found this useful?

Schematex is free, fully open source, and zero-dependency. A star helps other developers discover it.