A CSV with only study,N can hide an important design detail. This dependency-free Python example retains two separate counts and flags missing method passages for a reviewer.
The example uses synthetic teaching records. Ten clinics and 240 participants are different fields; the code does not derive an effective sample size, calculate an ICC, pool results or assess whether a statistical method was appropriate.
from copy import deepcopy def unit_review(row): if not isinstance(row, dict): raise ValueError("record required") for key in ("study", "allocation_unit", "analysis_unit", "source_locator"): if not isinstance(row.get(key), str) or not row[key].strip(): raise ValueError("nonblank units and source locator required") for key in ("randomized_units", "participants"): value = row.get(key) if isinstance(value, bool) or not isinstance(value, int) or value <= 0: raise ValueError("positive integer counts required") if row["allocation_unit"] == "clinic": if row["randomized_units"] > row["participants"]: raise ValueError("check the counts in this clinic/participant schema") method = row.get("clustering_method", "") if not isinstance(method, str): raise ValueError("method must be text") return "method_passage_to_check" if method.strip() else "method_not_located" return "design_needs_source_review" # Synthetic teaching records: this is not a real clinical dataset. rows = [ dict(study="teaching-A", allocation_unit="clinic", analysis_unit="participant", randomized_units=10, participants=240, source_locator="teaching PDF, Methods 2", clustering_method="multilevel model, teaching PDF, Analysis paragraph 3"), dict(study="teaching-B", allocation_unit="clinic", analysis_unit="participant", randomized_units=8, participants=180, source_locator="teaching PDF, Table 1"), dict(study="teaching-C", allocation_unit="participant", analysis_unit="participant", randomized_units=120, participants=120, source_locator="teaching PDF, Flow diagram"), ] before = deepcopy(rows) print([unit_review(row) for row in rows]) # ['method_passage_to_check', 'method_not_located', 'design_needs_source_review'] assert rows == before The first record contains a method passage to open. That is not a “validated analysis” status. The second lacks a located passage, which is not proof that the paper ignored clustering. The third deliberately goes to design review: matching unit names alone does not establish independent observations.
Three example records and seven invalid-input cases were executed locally. The input is unchanged. Counts must be positive integers rather than booleans; blank provenance and a non-text method fail. The comparison between clinic and participant counts applies only to the simple schema shown here, not to every possible cluster design or recruitment flow.
What this check cannot tell you
Cochrane Handbook 23.1 distinguishes allocation units from observations and describes analysis that accounts for clustering. Our schema records where to look. It cannot determine whether the reported model, uncertainty or missing-data handling is sound. A nonblank locator can also be wrong: a person still needs to open it.
For a real review, preserve arm-specific counts, the reported effect measure and uncertainty, recruitment timing and the exact analysis passage when available. Keep unknown fields unresolved. Statistical adjustments require an appropriate plan and the necessary information; this importer does not make them.
Start with a source-linked table
We build RigorMed, an AI research workspace. Bring 2–3 clinical papers you can lawfully use, ask for an evidence-table draft with page, table or section locators, and verify the source passages. Research execution uses credits. This local code demonstration is not a customer result or a claim that the product automatically validates cluster-trial methods.
Primary method reference: Cochrane Handbook, Chapter 23, sections 23.1.1–23.1.3. The code, synthetic examples and review-state labels are our teaching choices.