Validation
prisma-flow validates PRISMA count relationships before rendering.
These checks are intended to help catch arithmetic inconsistencies in data used to populate PRISMA-style flow diagrams. They do not replace the PRISMA 2020 reporting guideline, checklist, or author guidance; cite and follow the original PRISMA publications for scholarly reporting.
Hard validation rules
records_screened = identified_total - removed_total
reports_sought = records_screened - records_excluded
reports_assessed = reports_sought - reports_not_retrieved
When other-method search data is present:
other_sought_reports = website_results + organisation_results + citations_results
other_assessed = other_sought_reports - other_notretrieved_reports
All counts must be non-negative integers.
Included-study reconciliation
This relationship is a warning by default:
studies_included = all_reports_assessed - all_reports_excluded_total
It is not a hard error in v0.1 because one study can have multiple reports. Use strict validation when your workflow expects a one-to-one relationship. If reports_included is provided, it is also compared with the included-report count implied by assessed and excluded reports.
report = flow.validate(strict_included=True)Validation report
validate() returns a ValidationReport:
report = flow.validate()
if report.ok:
print("Ready to render")
else:
print(report.format_text())A failed report looks like:
Validation failed:
- records_screened should equal identified records minus removed records. Expected: 1080 Found: 1090