# RCT PDF Data Extraction & Baseline QC

> End-to-end RCT PDF-to-Excel extraction, Table 1 baseline validation, and non-destructive NMA cross-check QC workflow.

RCT PDF Data Extraction & Baseline QC is a paid AI agent skill on Agensi by BASIFANS Zaki, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [BASIFANS Zaki](https://www.agensi.io/creators/basifans-zaki)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Version: 1.0
- Last updated: 2026-11-26
- Security: scan passed (2026-11-26); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/rct-pdf-data-extraction-baseline-qc
- Tags: research-analysis, data-databases, workflow-automation

## About this skill

A complete three-stage workflow for extracting arm-level baseline, efficacy, and safety data from randomized controlled trial (RCT) PDFs into Excel workbooks, validating Table 1 baselines against rendered images, and running non-destructive network meta-analysis (NMA) cross-check QC.

### Three-Stage Closed Loop
1. **PDF-to-Excel Extraction**: Uses `PyMuPDF (fitz)` for reliable text extraction and `openpyxl` cell-by-cell writing (never `pandas` overwrites) with automatic timestamped backups and traceability logs (`Source_log`, `Safety_detail`, `Eligibility_log`).
2. **Table 1 Baseline Validation**: High-resolution table rendering (`Matrix(4, 4)`) to catch the highest-frequency extraction traps: multi-column dose shifts, maintenance/run-in vs. randomization baselines, BMI misreads, and supplementary `eTable 1` locations.
3. **Non-Destructive Cross-Check QC**: Audits extracted values against original PDFs without silently overwriting master tables, enforcing strict unit separation (e.g., `kg` vs. `%`), `NR` vs. `0` vs. blank semantics, and single shared-placebo row integrity for multi-arm trials.

## Requires

- Python 3.10+
- PyMuPDF (fitz)
- openpyxl
- Optional: Vision-capable model for dense tables

## Known limitations

Scanned PDFs without text layers require an OCR tool or vision model; complex graphical-only endpoints (Kaplan-Meier curves without numeric tables) require dedicated digitization software.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the RCT PDF Data Extraction & Baseline QC skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Why does this workflow require openpyxl instead of pandas?

Using pandas.to_excel() strips existing Excel formatting, formulas, and auxiliary sheets, and can silently coerce numeric strings or missing values. Cell-by-cell openpyxl writing preserves your template intact.

### Will the QC step silently overwrite my master spreadsheet?

No. Stage 3 cross-check QC logs discrepancies in a separate review report or column with exact page/table references so human reviewers can approve every correction.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
