RevMan PRISMA Flow Diagram
Overview
Generates a PRISMA 2020-compliant flow diagram showing the study selection process. Outputs a PNG file.
Command
revman prisma [--output <file>]
Procedure:
-
If the active review has screening data in
.revman/screening/prisma.json, auto-populate:{ "identification": { "records_identified": 250, "duplicates_removed": 45 }, "screening": { "records_screened": 205, "records_excluded": 150, "reports_sought": 55, "reports_not_retrieved": 5, "reports_assessed": 50, "reports_excluded": 38 }, "inclusion": { "studies_included": 12, "reports_included": 12 } } -
If no saved data exists, ask for each number:
- "Records identified from databases:"
- "Records removed before screening (duplicates):"
- "Records screened:"
- "Records excluded:"
- "Reports sought for retrieval:"
- "Reports not retrieved:"
- "Reports assessed for eligibility:"
- "Reports excluded (with reasons):"
- "Studies included in review:"
-
Validate consistency:
records_screened = records_identified - duplicates_removedreports_sought = records_screened - records_excludedreports_assessed = reports_sought - reports_not_retrieved- If mismatched, flag: "Flow numbers inconsistent: {detail}. Accept and continue anyway? (y/n)"
-
Save the PRISMA data to
{REVIEW_DIR}/.revman/screening/prisma.json. -
Run:
echo '<json>' | python3 scripts/revman-prisma.py -o {output_base} -
Output:
PRISMA_2020_flow.pngin the review root. -
Confirm:
PRISMA 2020 flow diagram saved to reviews/{name}/PRISMA_2020_flow.png {N} records identified → {N} screened → {N} assessed → {N} included
Script Location
scripts/revman-prisma.py — Python 3 with Pillow. Accepts JSON on stdin, writes PNG.
Error Handling
| Situation | Response | |-----------|----------| | No prisma.json | "No saved PRISMA data. Enter numbers manually." | | Negative counts | "Flow counts cannot be negative." | | Script not found | "PRISMA script not found." |
微信扫一扫