resolving-clinical-context
하는 일
이 스킬은 노트에서 의학 용어 주변의 단어를 읽는 방법을 에이전트에게 가르칩니다. 각 소견이 부정, 과거, 가정, 불확실 중 무엇인지 표시해, 활성으로 잘못 세지 않도록 합니다.
사용하는 경우
- ✓증상 일부가 부정된 임상 노트에서 그것이 존재하는 것으로 기록되면 안 될 때.
- ✓목록을 만들기 전에 과거 질환을 활성 질환과 구분해야 할 때.
- ✓확실하지 않은 소견이나 배제 진단은 진단으로 세지 않고 표시하고 싶을 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/resolving-clinical-context/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 진료 노트를 확인해서 환자가 부인한 증상이 있는 것으로 세어지지 않도록 해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 '부인함', '병력 있음' 같은 표현 주변의 단어를 읽습니다. 용어가 이미 찾아진 뒤에, 부정, 시점, 확실성에 대한 간단한 라벨을 붙입니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Resolving clinical context
NER finds that a condition was mentioned; it does not tell you whether the
patient has it. "Patient denies chest pain," "history of MI," and "rule out
PE" all surface entities that must not be recorded as active, present
findings. OpenMed's openmed.clinical ConText layer assigns three deterministic
axes to each span — negation, temporality, uncertainty — turning raw
mentions into clinically faithful assertions before they reach a problem list or
FHIR Condition.
When to use
- Immediately after
extracting-clinical-entities, before grounding, problem-list building, or analytics. - The user asks for assertion status, negation handling, "is this affirmed?", family-history vs. patient, historical vs. active, or hedged/uncertain findings.
- You are about to map entities to FHIR
verificationStatus/clinicalStatusand need the upstream signal.
Quick start
import openmed
from openmed.clinical import (
resolve_span_context, assert_context_axes,
NEGATED, HISTORICAL, HYPOTHETICAL, UNCERTAIN,
)
note = "Patient denies chest pain. History of MI. Concern for PE; rule out DVT."
# 1) Extract entities (registry key, HF id, or local path).
ents = openmed.analyze_text(note, model_name="disease_detection_superclinical",
output_format="dict")
# 2) Assign ConText axes per entity. Pass the span text plus a window of cues.
for e in ents:
span = e["word"] # entity surface text
window = note # full sentence/note as modifier context
ctx = resolve_span_context(span, window)
print(span, "->", ctx.negation, ctx.temporality, ctx.certainty)
# "chest pain" -> negated recent certain (do NOT record as present)
# "MI" -> affirmed historical certain (past, not active)
# "PE" -> affirmed recent uncertain (hedged; flag, don't drop)
resolve_span_context returns a ClinicalContextResult(negation, temporality, certainty). For a downstream-grounding-shaped record use assert_context_axes,
which returns a ClinicalAssertion with a .to_dict() that omits unset axes.
Workflow
- Get entities and their context window. From
analyze_text, take each entity's surface text and the surrounding sentence (or the whole short note) as the modifier window. The ConText helpers accept a string, a span mapping with atext-like key, or any object exposing.text, plus optionalmodifier_hits. - Resolve negation with
resolve_negation(span, window)→AFFIRMEDorNEGATED. It uses a NegEx/ConText cue lexicon ("denies," "no evidence of," "without," "negative for"), masks pseudo-negation ("not ruled out," "cannot be excluded") so those don't refute the concept, and counts true cues with even/odd parity so double-negation is deterministic. - Resolve temporality with
resolve_temporality(span, window)→RECENT(default),HISTORICAL("history of," "h/o," "s/p," "resolved," "PMH"), orHYPOTHETICAL("if," "should," "in case of"). A conditional span is treated as hypothetical even if a historical cue is also present. - Resolve uncertainty with
resolve_uncertainty(span, window)→CERTAINorUNCERTAIN("concern for," "suspicious for," "rule out," "probable," "vs," "r/o"). Uncertain spans are flagged, not dropped. - Apply the axes downstream. Drop or refute
NEGATEDspans; routeHISTORICALto inactive/resolved status; do not recordHYPOTHETICALspans as present; markUNCERTAINspans provisional. Use the constants, not string literals, so a vocabulary change doesn't silently break comparisons.
Hand-off to / from OpenMed
- From
extracting-clinical-entities: this skill consumesanalyze_textDisease/Finding entities. Without context resolution, every mention — including negated and historical ones — would be (wrongly) treated as present. - OpenMed calls:
from openmed.clinical import resolve_negation, resolve_temporality, resolve_uncertainty, resolve_span_context, assert_context_axes, ClinicalAssertionand theNEGATED/AFFIRMED,HISTORICAL/RECENT/HYPOTHETICAL,CERTAIN/UNCERTAINconstants. - To
reconciling-problem-lists: feed each entity plus itsClinicalContextResultso active vs. resolved vs. historical is decided correctly and negated mentions are excluded. - To FHIR grounding:
negation=negated→ `
자주 묻는 질문
부정은 무슨 뜻인가요?
노트에 환자가 그 소견을 가지고 있지 않다고 적혀 있다는 뜻입니다. 예를 들어 흉통을 부인한 경우입니다.
가족력도 표시하나요?
네. 스킬이 다루는 표시 중 하나로 가족력을 다룹니다.
이 단계 전에 무엇이 오나요?
개체 추출이 먼저 실행되므로, 스킬은 확인할 용어를 이미 알고 있습니다.
상세 정보
작성자의 원본 설명
Assign negation, temporality, and uncertainty (the ConText axes) to clinical entities extracted by OpenMed, so \"denies chest pain\" is not counted as chest pain and \"history of MI\" is not counted as an active MI. Use after NER when the user needs assertion status, negation detection, family-history / hypothetical / historical flags, or ConText/NegEx-style classification before grounding entities to FHIR or a problem list. Covers openmed.clinical.resolve_negation / resolve_temporality / resolve_uncertainty / resolve_span_context / assert_context_axes, ClinicalAssertion, and the AFFIRMED/NEGA
repo: maziyarpanahi/openmed
인기도
- GitHub 스타
- 5.8k
- 순위
- #14726
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
annotating-variants
5.8k에이전트가 유전 변이의 효과를 예측하고, HGVS 이름을 게놈 위치로 바꾸고, 무료 공개 주석 도구를 사용해 인구 빈도를 붙이도록 돕습니다.
ask-openmed
5.8k에이전트가 임상 텍스트 요청에 맞는 OpenMed 워크플로를 고르도록 돕되, 환자 데이터가 있을 수 있으면 먼저 개인 정보 확인을 거치게 합니다.
assembling-fhir-bundles
5.8k여러 FHIR 건강 기록을 EHR로 보낼 수 있도록 하나의 트랜잭션 Bundle로 묶고, 내부 참조를 올바르게 연결하도록 에이전트를 돕습니다.
auditing-deid-leakage
5.8k비식별화된 임상 텍스트에 남은 SSN, 카드 번호, 이메일, 날짜 같은 식별자를 검사하고, 남은 것이 있으면 공개를 막도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.