1---2name: trial-eligibility-agent3description: <!--4---5<!--6# COPYRIGHT NOTICE7# This file is part of the "Universal Biomedical Skills" project.8# Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>9# All Rights Reserved.10#11# This code is proprietary and confidential.12# Unauthorized copying of this file, via any medium is strictly prohibited.13#14# Provenance: Authenticated by MD BABU MIA1516-->1718---19name: trial-eligibility-agent20description: Parse trial protocols and patient data to produce criterion-level MET/NOT/UNKNOWN determinations with evidence and gaps for clinical trial screening tasks.21allowed-tools:22 - read_file23 - run_shell_command24---2526## At-a-Glance27- **description (10-20 chars):** Trial triage hub28- **keywords:** eligibility, ClinicalTrials, FHIR, evidence, gaps29- **measurable_outcome:** Produce a MET/NOT/UNKNOWN matrix with supporting citations for ≥90% of inclusion/exclusion criteria within 5 minutes per trial request.3031## Inputs32- `trial_id` (NCT or sponsor ID) plus protocol text if not public.33- `patient_summary` narrative and optional `patient_structured` FHIR bundle.34- Declare data sources used (notes, labs, imaging, meds) to show provenance.3536## Outputs371. Structured table (JSON recommended) listing each criterion id/text with status, evidence snippet, and confidence.382. Overall recommendation (`potentially_eligible`, `not_eligible`, `needs_more_information`).393. Data gap checklist covering missing labs/imaging/biomarkers.4041## Workflow421. **Acquire protocol:** Pull eligibility text from ClinicalTrials.gov or sponsor PDF.432. **Normalize criteria:** Break into atomic checks with AND/OR logic and thresholds.443. **Extract patient facts:** Map narrative + FHIR data into canonical features (age, labs, ECOG, biomarkers).454. **Evaluate:** Assign MET/NOT/UNKNOWN with cited evidence for each criterion, flag missing context explicitly.465. **Summarize:** Present recommendation and highlight gating unknowns plus next-best actions.4748## Guardrails49- Never claim enrollment decisions; mark outputs as advisory.50- Cite direct patient evidence for every MET/NOT call; default to UNKNOWN rather than guessing.51- Respect PHI handling expectations—avoid storing raw notes outside secure paths.5253## Tooling & References54- Use `README.md` for API snippets (FHIR parsing, JSON schema) and dependency versions.55- Pair with `Clinical/Trial_Matching/TrialGPT` when retrieval/ranking is also needed.565758<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->