reconciling-problem-lists
它能做什么
这项技能教智能体如何把记录中关于同一病情的多次提及,合并为一条问题清单条目。它会去除患者并不具有的病情,并按状态为其余病情加上标签。
适用场景
- ✓当用户想从包含重复诊断名称的长篇临床记录中,获得一份清晰的问题清单的时候。
- ✓当用户需要知道哪些病情仍在活动中、哪些已解决、哪些只存在于既往史中的时候。
- ✓当用户正在构建 FHIR 病情清单,需要每种病情只保留一条记录的时候。
技能链接
https://github.com/maziyarpanahi/openmed/blob/master/skills/reconciling-problem-lists/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请根据我的门诊记录整理出一份清晰的问题清单,并标出哪些病情仍在活动中。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会把含义相同的名称归为一组,并去掉被否认或仅属假设的提及。然后,它会利用前面步骤中找到的上下文,为每种病情标注状态。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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-entitiesandresolving-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
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
- Collect Disease/Condition entities from
analyze_textacross the whole note (or per section if you ransegmenting-clinical-sections). - Attach clinical context per mention with
resolve_span_context(or the axes fromresolving-clinical-context): negation, temporality, uncertainty. - Exclude what isn't a problem. Drop
NEGATEDmentions (patient denies / no evidence of) andHYPOTHETICALmentions (conditional, not asserted). These must never land on the active list. - 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.
- Assign status by aggregating context. A concept that is
RECENT/active anywhere (typically A&P) is active; one seen only asHISTORICAL("history of," "resolved," PMH-only) is resolved/historical. Active wins over historical when the same concept appears both ways. - 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: consumesanalyze_textDisease 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_textandfrom openmed.clinical import resolve_span_context, NEGATED, HISTORICAL, HYPOTHETICAL. - To FHIR / USCDI: each reconciled problem becomes a Condition with
clinicalStatusactive/resolved (from tempor
常见问题
什么样的病情会被视为同一种病?
这项技能会把 DM2 和 2 型糖尿病之类的同义词归为一条记录。
它会去掉患者否认的病情吗?
会。被否定的提及会从活动清单中移除。
它需要先完成其他步骤吗?
需要。这项技能在实体提取和上下文判断之后运行。
详情
作者的原始描述
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-
repo: maziyarpanahi/openmed
热度
- GitHub 星标
- 5.8k
- 排名
- #14723
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
annotating-variants
5.8k帮你的智能体预测基因变异的作用,把 HGVS 名称转换为基因组位置,并使用免费的公共注释工具添加人群频率。
ask-openmed
5.8k帮你的智能体为临床文本请求选择合适的 OpenMed 工作流程,并在可能涉及患者数据时,先进行隐私检查。
assembling-fhir-bundles
5.8k把多份 FHIR 健康记录打包成一个事务 Bundle,可直接发送给 EHR 系统,并正确链接其中的内部引用。
auditing-deid-leakage
5.8k扫描已去标识化的临床文本,查找残留的标识符,例如社会安全号、银行卡号、电子邮件地址和日期,若仍有残留则阻止发布。