Reconciling Problem Lists logo

Reconciling Problem Lists

CommunityPopular
maziyarpanahi
reconciling-problem-lists

Deduplicate and reconcile OpenMed-extracted conditions into one clean active problem list with clinical status (active / resolved / historical). Use after NER and context resolution when the user wants a problem list, condition reconciliation, dedup of synonymous diagnosis mentions, or active-vs-resolved status from a note. Covers clustering synonymous mentions into one concept, excluding negated mentions, applying clinical context (historical / hypothetical / recent) to set status, and emitting a USCDI-Problem-shaped list. SNOMED CT concept grounding is user-supplied and out-of-process. Hand-off: consume openmed.analyze_text Disease entities plus resolving-clinical-context axes. Pairs after extracting-clinical-entities.

Overview

Publishermaziyarpanahi
Repositoryopenmed
Skill namereconciling-problem-lists
Stars
5.3K
Forks
677
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by maziyarpanahi on GitHub. Read the source before you install it.

Installation

Install the Reconciling Problem Lists AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/maziyarpanahi/openmed.git /tmp/openmed
mkdir -p .claude/skills
cp -r /tmp/openmed/skills/reconciling-problem-lists .claude/skills/reconciling-problem-lists
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Reconciling Problem Lists in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Reconciling Problem Lists on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Reconciling Problem Lists is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Reconciling problem lists

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.

When to use

  • After extracting-clinical-entities and resolving-clinical-context, when the user wants a clean problem list, condition reconciliation, or dedup of repeated diagnosis mentions.
  • You need active-vs-resolved-vs-historical status per problem, not just raw mentions.
  • You are assembling a FHIR Condition list or a USCDI Problem element and need one entry per concept.

Quick start

python
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.

Workflow

  1. Collect Disease/Condition entities from analyze_text across the whole note (or per section if you ran segmenting-clinical-sections).
  2. Attach clinical context per mention with resolve_span_context (or the axes from resolving-clinical-context): negation, temporality, uncertainty.
  3. Exclude what isn't a problem. Drop NEGATED mentions (patient denies / no evidence of) and HYPOTHETICAL mentions (conditional, not asserted). These must never land on the active list.
  4. Cluster synonymous mentions into one concept. Fold surface variants (abbreviations, word order, lexical synonyms) to a single canonical key. Cheap normalization gets you started; SNOMED CT concept grounding is the robust path — run it out-of-process with the user's own license and key on the concept code, not the surface string.
  5. Assign status by aggregating context. A concept that is 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.
  6. Emit the reconciled list — one record per concept with status, mention count, and provenance offsets — shaped for USCDI Problem / FHIR Condition.

Hand-off to / from OpenMed

  • From extracting-clinical-entities: consumes analyze_text Disease entities. Run on a sectioned note (segmenting-clinical-sections) for best active-vs-historical signal.
  • From resolving-clinical-context: this skill depends on the negation / temporality / uncertainty axes — reconciliation without them would put "denies chest pain" on the active list.
  • OpenMed calls: from openmed import analyze_text and from openmed.clinical import resolve_span_context, NEGATED, HISTORICAL, HYPOTHETICAL.
  • To FHIR / USCDI: each reconciled problem becomes a Condition with 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.

Edge cases & gotchas

  • Surface dedup is lossy. "MI" and "myocardial infarction" only fold if your normalizer knows the synonym. Lexical folding handles the easy cases; lean on SNOMED CT grounding for real reconciliation, and never bundle SNOMED — call it out-of-process with the user's credentials.
  • Active beats historical for the same concept. "History of asthma" in PMH plus "asthma exacerbation" in A&P is one active problem, not two entries. Aggregate before assigning status.
  • Don't resurrect resolved problems. A concept seen only as HISTORICAL / "resolved" stays resolved; don't promote it to active just because it appears.
  • Negated and hypothetical are exclusions, not statuses. They never become problem-list entries. Keep them out entirely.
  • Carry provenance. Keep offsets / source sections per problem so a reviewer can trace each entry back to the note text.
  • Local-first, advisory-only. Runs on-device; the reconciled list is decision support for clinician review, not an autonomous diagnosis.

Standards & references

Frequently asked questions

What does the Reconciling Problem Lists AI skill do?

Deduplicate and reconcile OpenMed-extracted conditions into one clean active problem list with clinical status (active / resolved / historical). Use after NER and context resolution when the user wants a problem list, condition reconciliation, dedup of synonymous diagnosis mentions, or active-vs-resolved status from a note. Covers clustering synonymous mentions into one concept, excluding negated mentions, applying clinical context (historical / hypothetical / recent) to set status, and emitting a USCDI-Problem-shaped list. SNOMED CT concept grounding is user-supplied and out-of-process. Ha...

Why use Reconciling Problem Lists on TypingMind?

Because you install it once and use it with any model. Reconciling Problem Lists is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Reconciling Problem Lists in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/maziyarpanahi/openmed/tree/master/skills/reconciling-problem-lists. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Reconciling Problem Lists?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Reconciling Problem Lists?

As many as you like. As long as a model supports skills, you can use Reconciling Problem Lists with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Reconciling Problem Lists AI skill free?

Yes. It is published on GitHub by maziyarpanahi under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇