DEV Community

bao han
bao han

Posted on

Flag missing analysis counts in an evidence CSV

A review handoff gets easier when every result has its own analysis count and a source locator. In a clinical trial report, participant flow and results tables can give counts for different groups of people.

Use one row per study, arm, outcome and time point. This synthetic file has one complete row, one missing count and one missing locator.

study,arm,outcome,week,analysis_n,locator
C,control,walking_distance,6,28,Table 2 row 4
C,control,walking_distance,12,,Table 3 row 4
D,control,symptom_score,6,35,
Enter fullscreen mode Exit fullscreen mode

Save it as evidence.csv, then run this standard-library Python check beside it.

import csv

with open("evidence.csv", encoding="utf-8", newline="") as file:
    for row in csv.DictReader(file):
        key = "/".join(row[field] for field in ("study", "arm", "outcome", "week"))
        if not row["analysis_n"].strip():
            print(f"{key}: review analysis_n")
        if not row["locator"].strip():
            print(f"{key}: review locator")
Enter fullscreen mode Exit fullscreen mode

The sample reports C/control/walking_distance/12: review analysis_n and D/control/symptom_score/6: review locator. An empty count is a review task. Return to the result table, its notes, and the methods before filling it. Preserve the exact locator and any ambiguity you find. The script checks completeness. A reviewer still compares the fields with the paper.

I work on RigorMed, an AI research workspace. Its evidence-table example illustrates the handoff with source locators. View the example.

The data are synthetic. This article was drafted with AI assistance, the code was run locally, and the methodology was reviewed against CONSORT 2025, items 22a and 26.

Top comments (0)