DEV Community

bao han
bao han

Posted on

Catch a lost time window in an abstract editing pipeline

A manuscript review pipeline can store the outcome definition alongside the edited claim. A small check can catch a missing or changed follow-up window before the author reads the revision.

Consider this fictional structured input. The source defines an event as a hospital admission within 14 days of discharge. The candidate draft changes the window to 28 days.

source = {"event": "hospital admission", "anchor": "discharge", "window_days": 14}
candidate = {"event": "hospital admission", "anchor": "discharge", "window_days": 28}

fields = ("event", "anchor", "window_days")
for field in fields:
    if field not in candidate or candidate[field] is None:
        print(f"REVIEW_REQUIRED {field}: missing")
    elif source[field] != candidate[field]:
        print(f"REVIEW_REQUIRED {field}: {source[field]} -> {candidate[field]}")
Enter fullscreen mode Exit fullscreen mode

The printed output is:

REVIEW_REQUIRED window_days: 14 -> 28
Enter fullscreen mode Exit fullscreen mode

Keep the actual source location with the structured input, such as the outcome definitions paragraph and the relevant table footnote. Return that location, the original wording and the candidate wording with the check. The author can then resolve whether the edit is wrong or the source metadata itself needs updating.

Use an explicit missing value when the window has not been extracted. A passed field check only means the stored values agree. A reviewer still needs to confirm inclusion boundaries such as “within” versus “after” and the event's exact definition.

STROBE checklists cover explicit outcome definitions and follow-up methods. This is a standalone teaching example from the RigorMed team using fictional data.

Top comments (0)