Agent Skillsmaziyarpanahi/openmed › computing-ecqms

computing-ecqms

GitHub

利用 OpenMed 从临床笔记中提取事实,补充结构化数据以改进 eCQM 的分子和排除项捕获。结合 CQL/QDM 逻辑,解决结构化编码遗漏问题,提升质量指标计算准确性。

skills/computing-ecqms/SKILL.md maziyarpanahi/openmed

Trigger Scenarios

用户希望计算电子临床质量措施 (eCQM) 评估 CMS/ECQI 质量指标 改善从临床笔记中捕获分子数据 构建 CQL/QDM 措施逻辑 填补结构化代码未覆盖的文档空白

Install

npx skills add maziyarpanahi/openmed --skill computing-ecqms -g -y
More Options

Use without installing

npx skills use maziyarpanahi/openmed@computing-ecqms

指定 Agent (Claude Code)

npx skills add maziyarpanahi/openmed --skill computing-ecqms -a claude-code -g -y

安装 repo 全部 skill

npx skills add maziyarpanahi/openmed --all -g -y

预览 repo 内 skill

npx skills add maziyarpanahi/openmed --list

SKILL.md

Frontmatter
{
    "name": "computing-ecqms",
    "license": "Apache-2.0",
    "metadata": {
        "pairs": "after",
        "project": "OpenMed",
        "version": "1.0",
        "category": "analytics-reporting"
    },
    "description": "Compute electronic clinical quality measures (eCQMs) over structured data using CQL\/QDM logic, lifting note-derived numerator and exclusion facts from OpenMed to improve measure capture. Use when the user wants to compute an eCQM, evaluate a CMS\/ECQI quality measure, improve numerator capture from clinical notes, build CQL\/QDM measure logic, or close documentation gaps that structured codes miss. Covers eCQM structure (IPP\/denominator\/numerator\/exclusions), CQL v1.5 and QDM v5.6, MADiE authoring, and mapping OpenMed entities to QDM data elements. Consumes OpenMed analyze_text facts (coded via the linking skills) to supplement structured EHR data; does not replace certified measure engines."
}

Computing eCQMs

Electronic Clinical Quality Measures (eCQMs) are computed over structured data using CQL (Clinical Quality Language) logic against the QDM (Quality Data Model). Much of what a measure needs — a counseling note, a reason a service wasn't done, a symptom — lives only in free text. This skill uses OpenMed to lift those facts out of notes (on-device) and feed them into measure computation so numerators and valid exclusions aren't undercounted.

When to use this skill

When structured codes under-capture a measure population and the evidence is in notes: documented exclusions ("patient declined screening"), numerator-relevant findings, or symptoms gating a measure. Use it alongside a certified measure engine — OpenMed supplements capture; it does not compute or certify the measure.

eCQM anatomy (what you're populating)

Population Meaning Where OpenMed helps
IPP (Initial Population) everyone the measure could apply to usually structured (encounters, age)
Denominator IPP meeting base criteria mostly structured
Denominator Exclusion / Exception valid reasons to remove from denom notes: "declined", "medical reason", "not indicated"
Numerator met the quality action notes: counseling delivered, advice given, status documented

Quick start

import openmed

note = (
    "Tobacco use screened today; patient is a current every-day smoker. "
    "Cessation counseling provided and cessation medication offered."
)

result = openmed.analyze_text(note, output_format="dict")
# entities -> {text, label, confidence, start, end}

# Lift two measure-relevant facts (illustrative, for a tobacco-screening eCQM):
facts = {
    "tobacco_status_documented": any(e["label"] in {"smoking_status", "tobacco_use"}
                                     for e in result["entities"]),
    "cessation_intervention_documented": "counseling" in note.lower(),
}
# These become QDM data elements your CQL references (see workflow).

Pick the model whose labels match the measure concept (choosing-openmed-models) and code spans to value-set vocabularies via the linking skills before they enter QDM.

Workflow

  1. Read the measure. Get the human-readable spec + CQL + value sets from ECQI / MADiE. Identify which populations depend on documentation that structured data misses.
  2. De-identify. Run openmed.deidentify on notes before any logging or storage; keep the measure keyed by internal patient ids.
  3. Extract facts. openmed.analyze_text for the concepts the measure needs (status, intervention, reason-not-done). Use resolving-clinical-context to drop negated/hypothetical/family-history mentions — a negated exclusion is not an exclusion.
  4. Code to value sets. Map entities to the codes the measure's value sets expect (SNOMED/LOINC/RxNorm via the linking skills). QDM data elements are defined by code membership, not raw strings.
  5. Materialize QDM data elements. Turn coded, dated facts into QDM elements (e.g. Assessment, Performed, Intervention, Performed, Diagnosis) with the right author/relevant dates (building-patient-timelines).
  6. Compute with CQL. Feed the structured + note-derived QDM into a certified CQL engine (e.g. the open-source cqframework engine). OpenMed does not execute CQL.
  7. Reconcile & audit. Track which population members were added by note-derived facts and at what confidence, so QA can review.

Hand-off to / from OpenMed

  • From OpenMed: analyze_text entities + clinical temporality + the linking skills (to land facts in the measure's value sets) + deidentify upstream.
  • To measure tooling: materialized QDM data elements feed a CQL engine and MADiE test decks. Note-derived QDM can also originate from etl-to-omop-cdm rows if you compute measures on an OMOP store instead.

Edge cases & gotchas

  • OpenMed supplements, it does not certify. Measure scoring must run in a validated CQL engine. Treat note-derived facts as additional evidence subject to review, not as authoritative measure results.
  • Negation flips meaning. "Screening declined" is an exclusion; "screening not declined" / "no contraindication" is the opposite. Always run the temporality/negation pass before counting.
  • Dates drive measurement periods. A fact only counts if its relevant date falls in the measurement period. Resolve dates first; undated facts can't be placed.
  • Value-set membership, not keywords. A QDM data element is defined by codes in the measure's value set. Map entities to those codes — don't match on the surface word.
  • No restricted terminology bundling. SNOMED/LOINC/RxNorm content stays out-of-process under your own license; OpenMed provides spans/labels only.
  • No raw PHI in logs or audit. Record measure provenance by offset, label, confidence, and internal id.

Standards & references

Version History

  • f213557 Current 2026-07-23 00:44

Same Skill Collection

skills/building-with-openmed/SKILL.md
skills/loading-openmed-models/SKILL.md
skills/annotating-variants/SKILL.md
skills/assembling-fhir-bundles/SKILL.md
skills/auditing-deid-leakage/SKILL.md
skills/auditing-deidentification-runs/SKILL.md
skills/auditing-part11-trails/SKILL.md
skills/auditing-safe-harbor-checklist/SKILL.md
skills/auditing-subgroup-fairness/SKILL.md
skills/authoring-model-cards/SKILL.md
skills/batch-processing-clinical-text/SKILL.md
skills/benchmarking-clinical-ner/SKILL.md
skills/bridging-presidio-and-spacy/SKILL.md
skills/building-gold-corpus/SKILL.md
skills/building-patient-timelines/SKILL.md
skills/checking-hipaa-compliance/SKILL.md
skills/choosing-openmed-models/SKILL.md
skills/coding-hcc-risk-adjustment/SKILL.md
skills/coding-icd10/SKILL.md
skills/configuring-privacy-policies/SKILL.md
skills/defining-cohort-phenotypes/SKILL.md
skills/deidentifying-clinical-text/SKILL.md
skills/deidentifying-multilingual-text/SKILL.md
skills/deploying-openmed-mcp/SKILL.md
skills/detecting-pv-signals/SKILL.md
skills/enforcing-nophi-logging/SKILL.md
skills/etl-to-omop-cdm/SKILL.md
skills/evaluating-with-leakage-gates/SKILL.md
skills/exporting-bulk-fhir/SKILL.md
skills/exporting-to-fhir/SKILL.md
skills/extracting-clinical-entities/SKILL.md
skills/extracting-dicom-metadata/SKILL.md
skills/extracting-lab-tables/SKILL.md
skills/extracting-pii-entities/SKILL.md
skills/extracting-sdoh/SKILL.md
skills/fetching-fhir-resources/SKILL.md
skills/gating-deid-leakage/SKILL.md
skills/generating-synthea-data/SKILL.md
skills/generating-synthetic-surrogates/SKILL.md
skills/ingesting-clinical-documents/SKILL.md
skills/linking-umls-concepts/SKILL.md
skills/mapping-loinc/SKILL.md
skills/mapping-to-snomed/SKILL.md
skills/mining-pubmed-literature/SKILL.md
skills/normalizing-rxnorm/SKILL.md
skills/parsing-ccda-documents/SKILL.md
skills/parsing-hl7v2-messages/SKILL.md
skills/parsing-lab-values/SKILL.md
skills/parsing-trial-eligibility/SKILL.md

Metadata

Files
0
Version
f213557
Hash
72ef8f2b
Indexed
2026-07-23 00:44

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-29 13:11
浙ICP备14020137号-1 $お客様$