Deduplicates and reconciles OpenMed-extracted clinical conditions into a clean active problem list with clinical status (active/resolved/historical). Use after NER and context resolution when you need a USCDI-Problem-shaped list.
Ships in openmed-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A single note mentions the same condition many ways — "DM2," "type 2 diabetes," "diabetes mellitus" — across PMH, HPI, and A&P, some negated, some historical. A usable problem list collapses those mentions into one concept per problem, drops what the patient does not have, and assigns a clinical status (active / resolved / historical). This skill turns OpenMed's per-mention entity stream plus ConText axes into that reconciled, de-duplicated list, shaped for USCDI "Problem" exchange.
extracting-clinical-entities and resolving-clinical-context, when the
user wants a clean problem list, condition reconciliation, or dedup of repeated
diagnosis mentions.import openmed
from openmed.clinical import resolve_span_context, NEGATED, HISTORICAL, HYPOTHETICAL
note = ("PMH: type 2 diabetes, prior MI 2019 (resolved). "
"A&P: poorly controlled DM2; denies chest pain.")
ents = openmed.analyze_text(note, model_name="disease_detection_superclinical",
output_format="dict")
def normalize(surface: str) -> str:
# Cheap synonym folding; replace with SNOMED grounding (out-of-process).
s = surface.lower().strip()
return {"dm2": "type 2 diabetes", "diabetes mellitus": "type 2 diabetes"}.get(s, s)
problems = {} # concept -> reconciled record
for e in ents:
surface = e["word"]
ctx = resolve_span_context(surface, note)
if ctx.negation == NEGATED:
continue # patient does NOT have it -> exclude
concept = normalize(surface)
status = ("resolved" if ctx.temporality == HISTORICAL else
"active")
if ctx.temporality == HYPOTHETICAL:
continue # not asserted as present
rec = problems.setdefault(concept, {"concept": concept, "status": status,
"mentions": 0})
rec["mentions"] += 1
# Active anywhere wins over a historical mention of the same concept.
if status == "active":
rec["status"] = "active"
problem_list = list(problems.values())
# -> [{"concept": "type 2 diabetes", "status": "active", "mentions": 2}, ...]
# "chest pain" excluded (negated); "MI" -> historical/resolved.
analyze_text across the whole
note (or per section if you ran segmenting-clinical-sections).resolve_span_context (or the
axes from resolving-clinical-context): negation, temporality, uncertainty.NEGATED mentions (patient denies /
no evidence of) and HYPOTHETICAL mentions (conditional, not asserted). These
must never land on the active list.RECENT/active
anywhere (typically A&P) is active; one seen only as HISTORICAL
("history of," "resolved," PMH-only) is resolved/historical. Active wins
over historical when the same concept appears both ways.extracting-clinical-entities: consumes analyze_text Disease
entities. Run on a sectioned note (segmenting-clinical-sections) for best
active-vs-historical signal.resolving-clinical-context: this skill depends on the negation /
temporality / uncertainty axes — reconciliation without them would put "denies
chest pain" on the active list.from openmed import analyze_text and
from openmed.clinical import resolve_span_context, NEGATED, HISTORICAL, HYPOTHETICAL.clinicalStatus active/resolved (from temporality) and verificationStatus
refuted/provisional (from negation/uncertainty). SNOMED CT codes are
user-supplied and grounded out-of-process — OpenMed produces the dedup'd
concept and status, not the terminology binding.HISTORICAL /
"resolved" stays resolved; don't promote it to active just because it appears.clinicalStatus (active/resolved) and
verificationStatus: https://hl7.org/fhir/R4/condition.htmlWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/openmed-skills:reconciling-problem-listsfrom openmed-skills
npx claudepluginhub maziyarpanahi/openmed --plugin openmed-skills74 skills in this plugin
/annotating-variantsAnnotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators (Ensembl VEP REST, VEP/SnpEff/ANNOVAR offline) and links variants to gnomAD population frequencies and the clinical context OpenMed extracts. Use when the user wants to predict variant consequences, map HGVS to genomic coordinates, annotate a VCF, attach allele frequencies, or pair variants with phenotype/oncology context. Trigger keywords: VCF, HGVS, variant annotation, VEP, SnpEff, ANNOVAR, consequence, missense, gnomAD, allele frequency, GRCh38, rsID, transcript. Pairs adjacent to OpenMed: combine annotated variants with Genomics/Oncology entities and phenotype from openmed.analyze_text. Tools used are free; restricted clinical databases are user-supplied./ask-openmedChoose the first OpenMed workflow skill for an intake, privacy, extraction, exchange, or verification request using deterministic local routing. Use when a goal is broad, spans several clinical-data stages, or leaves the data-sensitivity status unclear; the privacy gate is selected before downstream work when raw clinical or personal content may be present./assembling-fhir-bundlesPackage multiple FHIR R4 resources produced from OpenMed output into a single valid transaction Bundle ready to POST to an EHR, using OpenMed's verified bundle assembler openmed.clinical.exporters.fhir.to_bundle. Covers deterministic urn:uuid fullUrls, automatic in-Bundle reference rewriting, request blocks (method/url) for transaction vs batch, and conditional create. Use after exporting-to-fhir when the user has several Condition/Observation/MedicationStatement resources and wants one transaction Bundle, mentions Bundle, transaction, references, or posting to a FHIR server. Builds on exporting-to-fhir; pairs after.Other plugins' skills for the same job