parsing-trial-eligibility
Skill này làm gì
Skill này dạy agent cách đọc phần tiêu chí đủ điều kiện của một thử nghiệm lâm sàng và tách nó thành các quy tắc mà con người có thể kiểm tra. Sau đó nó so sánh thông tin của bệnh nhân với từng quy tắc và giải thích kết quả.
Khi nào nên dùng
- ✓Khi người dùng muốn biết một bệnh nhân có thể phù hợp với thử nghiệm lâm sàng được liệt kê trên ClinicalTrials.gov hay không.
- ✓Khi người dùng muốn phần tiêu chí dài của một nghiên cứu được tách thành danh sách quy tắc rõ ràng.
- ✓Khi người dùng cần thấy những thông tin nào của bệnh nhân còn thiếu trước khi quyết định thử nghiệm.
Liên kết skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/parsing-trial-eligibility/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể xem qua các quy tắc đủ điều kiện của thử nghiệm này và cho tôi biết bệnh nhân của tôi đáp ứng quy tắc nào không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent áp dụng các kiểm tra đơn giản như giới tính và tuổi trước, rồi đọc các quy tắc văn bản tự do thành danh sách. Với mỗi quy tắc, nó đánh dấu kết quả là đủ điều kiện, không đủ điều kiện hoặc chưa rõ, kèm lý do.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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,
Câu hỏi thường gặp
Đây có phải quyết định ghi danh cuối cùng không?
Không. Skill mô tả đầu ra là danh sách ứng viên và lý do để bác sĩ lâm sàng xem xét.
Dữ liệu thử nghiệm lấy từ đâu?
Skill dùng văn bản tiêu chí đủ điều kiện từ hồ sơ nghiên cứu trên ClinicalTrials.gov.
Nếu thông tin bệnh nhân không đầy đủ thì sao?
Quy tắc được đánh dấu là chưa rõ, và thông tin còn thiếu được nêu tên để có thể tìm ra.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 5.8k
- Vị trí xếp hạng
- #14718
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
annotating-variants
5.8kGiúp agent dự đoán tác động của biến thể di truyền, đổi tên HGVS sang vị trí bộ gen và gắn tần suất quần thể bằng công cụ chú giải miễn phí.
ask-openmed
5.8kGiúp agent chọn đúng quy trình OpenMed cho yêu cầu về văn bản lâm sàng, luôn kiểm tra quyền riêng tư trước khi có thể có dữ liệu bệnh nhân.
assembling-fhir-bundles
5.8kGói nhiều bản ghi y tế FHIR thành một Bundle giao dịch để gửi tới EHR, với các tham chiếu nội bộ được liên kết đúng.
auditing-deid-leakage
5.8kQuét văn bản lâm sàng đã khử nhận dạng để tìm định danh còn sót như SSN, số thẻ, email và ngày tháng, và chặn phát hành nếu còn sót.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.