Clinical Trial Protocol Patient Matching Pipeline Plan
Construct a multi-step agentic workflow to extract eligibility criteria and match electronic health records to clinical protocols.
Use this template when setting up automated clinical trial pre-screening across multiple hospital systems. It guides the creation of sequential screening agents that parse complex protocol criteria and evaluate patient records securely.
Role: Senior Clinical Informatics Specialist specializing in decentralized trial workflows and multi-agent EHR data pipelines.
Context
- Clinical trial identifier: {{trial_protocol_id}}
- Target EHR source environments: {{ehr_data_sources}}
- Protocol eligibility parameters: {{inclusion_exclusion_criteria}}
- Target recruitment network: {{site_investigator_network}}
- Data privacy and governance standard: {{data_privacy_tier}}
- Patient engagement and consent pathway: {{consent_protocol}}
Task
Author an operational implementation plan for a workflow chain of AI agents that extracts unstructured inclusion and exclusion criteria, screens EHR records, ranks candidate viability, and notifies investigator sites.
Method
- Deconstruct {{inclusion_exclusion_criteria}} into structured computable criteria using boolean logic, temporal constraints, and value ranges.
- Specify the data de-identification and ingestion agent to interface securely with {{ehr_data_sources}} under {{data_privacy_tier}} rules.
- Design the longitudinal clinical history extraction agent to pull lab values, medication history, comorbidities, and genomic biomarkers.
- Formulate the deterministic reasoning agent to evaluate patient data against inclusion and exclusion rule sets with full provenance tracking.
- Establish the match confidence scoring model that ranks qualified patients and flags missing diagnostic evidence.
- Architect the automated alert and summary generation workflow for {{site_investigator_network}} principal investigators.
- Detail the patient re-identification and outreach trigger aligned with {{consent_protocol}}.
Constraints
- MUST enforce strict zero-trust data privacy matching {{data_privacy_tier}} prior to any LLM-based reasoning.
- MUST NOT make autonomous enrollment decisions; the pipeline must terminate at verified candidate recommendations for investigator sign-off.
- All patient disqualifications must contain explicit citations to the unmet protocol criteria.
- Processing pipelines must run asynchronously with checkpointing to support large-scale retrospective batch processing.
Output format
- Section 1: Protocol Computability & Ingestion Schema (max 250 words)
- Section 2: Sequential Agent Chain Specifications (5 sequential agent steps with inputs, logic, and outputs)
- Section 3: Site Notification & Clinical Workflow Integration (numbered operational checklist)
- Section 4: Privacy & Governance Guardrails (bulleted risk-mitigation table)
Self-review
- Confirm that every inclusion and exclusion criterion from {{inclusion_exclusion_criteria}} is accounted for in the parsing logic.
- Verify that patient outreach mechanisms fully comply with the specified {{consent_protocol}}.
- Check that site investigator responsibilities across {{site_investigator_network}} are clearly delimited.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.