parsing-trial-eligibility
하는 일
이 스킬은 임상시험의 적격 기준 섹션을 사람이 확인할 수 있는 규칙으로 나누는 방법을 에이전트에게 가르칩니다. 그다음 환자의 사실을 각 규칙과 비교하고 결과를 설명합니다.
사용하는 경우
- ✓ClinicalTrials.gov에 나온 임상시험에 환자가 해당할 수 있는지 알고 싶을 때.
- ✓긴 적격 기준 텍스트를 명확한 규칙 목록으로 나누고 싶을 때.
- ✓임상시험 결정을 내리기 전에 빠진 환자 정보가 무엇인지 알아야 할 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/parsing-trial-eligibility/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 임상시험의 적격 기준을 살펴보고, 제 환자가 충족하는 기준과 충족하지 않는 기준을 알려 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 성별과 나이 같은 간단한 확인을 먼저 적용하고, 자유 텍스트 규칙을 목록으로 바꾼 뒤, 각 규칙마다 적격, 부적격, 알 수 없음 중 하나를 이유와 함께 표시합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Parsing trial eligibility & matching patients
A ClinicalTrials.gov study exposes its eligibility as a single free-text block
(protocolSection.eligibilityModule.eligibilityCriteria) plus a few typed fields
(sex, minimumAge, maximumAge, healthyVolunteers). This skill turns that
prose into structured inclusion / exclusion criteria and matches each rule
against patient facts that OpenMed extracted — producing an explainable
eligible | ineligible | unknown verdict per criterion.
This is decision support, not enrollment. The output is a candidate list and a rationale for a clinician to review, never an automated eligibility decision.
When to use
- You pulled a study with
searching-clinicaltrialsand need its eligibility as machine-readable rules. - You have a (synthetic) patient profile and want to screen it against one or many trials, with a per-criterion reason.
- You want to highlight which patient facts are missing to decide a criterion.
Quick start
The typed gates are deterministic — apply them first. The free-text criteria need parsing into bullet-level inclusion/exclusion items.
# Study from ClinicalTrials.gov v2 (see searching-clinicaltrials)
elig = study["protocolSection"]["eligibilityModule"]
raw = elig["eligibilityCriteria"] # free text, often markdown bullets
sex = elig.get("sex", "ALL") # ALL | FEMALE | MALE
min_age = elig.get("minimumAge") # e.g. "18 Years"
max_age = elig.get("maximumAge") # e.g. "75 Years"
healthy_ok = elig.get("healthyVolunteers") # bool
def split_criteria(text: str) -> dict[str, list[str]]:
"""Split the prose into inclusion / exclusion bullet lists."""
sections, current = {"inclusion": [], "exclusion": []}, None
for line in text.splitlines():
low = line.strip().lower()
if "inclusion criteria" in low:
current = "inclusion"; continue
if "exclusion criteria" in low:
current = "exclusion"; continue
bullet = line.strip(" -*•\t")
if bullet and current:
sections[current].append(bullet)
return sections
criteria = split_criteria(raw)
Each bullet is a candidate rule. Structure it into a comparable predicate: condition present/absent, lab threshold, age/sex, prior-therapy, performance status (e.g. ECOG ≤ 2), pregnancy status, etc.
from dataclasses import dataclass
@dataclass
class Criterion:
kind: str # "condition" | "lab" | "age" | "sex" | "medication" | "other"
polarity: str # "include" | "exclude"
text: str # original bullet
target: str | None # e.g. "ECOG", "diabetes", "metformin"
op: str | None = None # "<=", ">=", "==", "present", "absent"
value: float | str | None = None
Matching against OpenMed-extracted patient facts
Build the patient profile from openmed.analyze_text outputs plus structured
demographics, then evaluate each criterion to a three-valued result.
patient = {
"age": 61, "sex": "FEMALE",
"conditions": {"type 2 diabetes", "hypertension"}, # OpenMed Disease spans
"medications": {"metformin", "lisinopril"}, # OpenMed Pharmaceutical
"labs": {"hba1c": 8.1, "ecog": 1}, # from a labs extractor
}
def evaluate(c: Criterion, p: dict) -> str:
if c.kind == "sex" and c.target:
return "pass" if p["sex"] == c.target or c.target == "ALL" else "fail"
if c.kind == "condition" and c.target:
has = c.target.lower() in {x.lower() for x in p["conditions"]}
ok = has if c.polarity == "include" else not has
return "pass" if ok else "fail"
if c.kind == "lab" and c.target and c.target.lower() in p["labs"]:
v = p["labs"][c.target.lower()]
cmp = {"<=": v <= c.value, ">=": v >= c.value, "==": v == c.value}
return "pass" if cmp.get(c.op, False) else "fail"
return "unknown" # fact not present → needs human review, never assume pass
Aggregate: a patient is a candidate only if every inclusion criterion is
pass (or unknown, flagged) and every exclusion criterion is not fail.
Surface the unknown items prominently — missing data is the most common reason a
real screen needs a human.
Workflow
- Apply the typed gates (
sex,minimumAge,maximumAge) — cheap, exact. - Split the free text into inclusion / exclusion bullets.
- Structure each bullet into a
Criterion(kind,
자주 묻는 질문
최종 등록 결정을 내리나요?
아니요. 출력은 임상의가 검토할 후보와 이유의 목록이라고 설명합니다.
임상시험 데이터는 어디에서 오나요?
ClinicalTrials.gov 연구 기록의 적격 기준 텍스트를 사용합니다.
환자 정보가 불완전하면요?
해당 규칙은 알 수 없음으로 표시되고, 찾아야 할 빠진 사실이 함께 명시됩니다.
상세 정보
작성자의 원본 설명
Parses free-text clinical-trial eligibility criteria into structured inclusion and exclusion logic, then matches them against patient facts that OpenMed extracted. Use when the user wants to turn a ClinicalTrials.gov eligibility block into machine-readable rules, screen a synthetic patient for trial fit, or explain why a patient does or does not meet criteria. Trigger keywords: eligibility criteria, inclusion, exclusion, trial matching, patient screening, criteria parsing, eligibilityModule, age/sex gates. Pairs after OpenMed and after searching-clinicaltrials: consume the eligibilityModule te
repo: maziyarpanahi/openmed
인기도
- GitHub 스타
- 5.8k
- 순위
- #14718
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
annotating-variants
5.8k에이전트가 유전 변이의 효과를 예측하고, HGVS 이름을 게놈 위치로 바꾸고, 무료 공개 주석 도구를 사용해 인구 빈도를 붙이도록 돕습니다.
ask-openmed
5.8k에이전트가 임상 텍스트 요청에 맞는 OpenMed 워크플로를 고르도록 돕되, 환자 데이터가 있을 수 있으면 먼저 개인 정보 확인을 거치게 합니다.
assembling-fhir-bundles
5.8k여러 FHIR 건강 기록을 EHR로 보낼 수 있도록 하나의 트랜잭션 Bundle로 묶고, 내부 참조를 올바르게 연결하도록 에이전트를 돕습니다.
auditing-deid-leakage
5.8k비식별화된 임상 텍스트에 남은 SSN, 카드 번호, 이메일, 날짜 같은 식별자를 검사하고, 남은 것이 있으면 공개를 막도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.