Pular para o conteúdo
Skillpedia
Análise e planilhas5,8 mil · #14718

parsing-trial-eligibility

O que ela faz

Esta skill ensina um agente a ler a seção de elegibilidade de um ensaio clínico e dividi-la em regras que uma pessoa pode verificar. Em seguida, compara os dados do paciente com cada regra e explica o resultado.

Quando usar

  • ✓Quando um usuário quer saber se um paciente pode se encaixar em um ensaio clínico listado no ClinicalTrials.gov.
  • ✓Quando um usuário quer que o longo texto de elegibilidade de um estudo seja dividido em uma lista clara de regras.
  • ✓Quando um usuário precisa ver quais dados do paciente estão faltando antes que uma decisão sobre o ensaio possa ser tomada.

Link da skill

https://github.com/maziyarpanahi/openmed/blob/master/skills/parsing-trial-eligibility/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/maziyarpanahi/openmed/blob/master/skills/parsing-trial-eligibility/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Você pode analisar as regras de elegibilidade deste ensaio e me dizer quais delas o meu paciente atende?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente aplica primeiro verificações simples, como sexo e idade, e depois transforma as regras em texto livre em uma lista. Para cada regra, marca o resultado como elegível, inelegível ou desconhecido, com um motivo.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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-clinicaltrials and 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

  1. Apply the typed gates (sex, minimumAge, maximumAge) — cheap, exact.
  2. Split the free text into inclusion / exclusion bullets.
  3. Structure each bullet into a Criterion (kind,
Perguntas frequentes

Isto toma a decisão final de inclusão?

Não. A skill descreve sua saída como uma lista de candidatos e motivos para um clínico revisar.

De onde vêm os dados do ensaio?

A skill usa o texto de elegibilidade de um registro de estudo do ClinicalTrials.gov.

E se as informações do paciente estiverem incompletas?

A regra é marcada como desconhecida, e o dado faltante é indicado para que possa ser encontrado.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
5,8 mil
Posição no ranking
#14718
Licença
Apache-2.0
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas