मुख्य सामग्री पर जाएँ
Skillpedia
एनालिसिस और स्प्रेडशीट5.8k · #14726

resolving-clinical-context

यह क्या करती है

यह स्किल एजेंट को सिखाती है कि नोट में चिकित्सा शब्दों के आसपास के शब्द कैसे पढ़ें। यह चिह्नित करती है कि हर निष्कर्ष नकारा गया, ऐतिहासिक, काल्पनिक या अनिश्चित है या नहीं, ताकि उसे गलती से सक्रिय न गिना जाए।

कब इस्तेमाल करें

  • ✓जब उपयोगकर्ता के क्लिनिकल नोट में कुछ लक्षण नकारे गए हों और उन्हें मौजूद के रूप में दर्ज नहीं होना चाहिए।
  • ✓जब सूची बनाने से पहले उपयोगकर्ता को पुरानी बीमारियाँ सक्रिय बीमारियों से अलग चाहिए।
  • ✓जब उपयोगकर्ता चाहता है कि अनिश्चित या रूल-आउट निष्कर्ष निदान गिनने के बजाय चिह्नित हों।

Skill का लिंक

https://github.com/maziyarpanahi/openmed/blob/master/skills/resolving-clinical-context/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/maziyarpanahi/openmed/blob/master/skills/resolving-clinical-context/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या आप मेरे क्लिनिक नोट की जाँच कर सकते हैं ताकि मरीज़ जिन लक्षणों को नकारता है, वे मौजूद न गिने जाएँ?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट हर चिकित्सा शब्द के आसपास के शब्द पढ़ता है, जैसे denies या history of। शब्द मिल जाने के बाद वह नकारने, समय और निश्चितता के लिए सरल लेबल देता है।

तकनीकी सामग्री (मूल 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 /clinicalStatus and 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

  1. 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 a text-like key, or any object exposing .text, plus optional modifier_hits.
  2. Resolve negation with resolve_negation(span, window) → AFFIRMED or NEGATED. 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.
  3. Resolve temporality with resolve_temporality(span, window) → RECENT (default), HISTORICAL ("history of," "h/o," "s/p," "resolved," "PMH"), or HYPOTHETICAL ("if," "should," "in case of"). A conditional span is treated as hypothetical even if a historical cue is also present.
  4. Resolve uncertainty with resolve_uncertainty(span, window) → CERTAIN or UNCERTAIN ("concern for," "suspicious for," "rule out," "probable," "vs," "r/o"). Uncertain spans are flagged, not dropped.
  5. Apply the axes downstream. Drop or refute NEGATED spans; route HISTORICAL to inactive/resolved status; do not record HYPOTHETICAL spans as present; mark UNCERTAIN spans 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 consumes analyze_text Disease/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, ClinicalAssertion and the NEGATED/AFFIRMED, HISTORICAL/RECENT/HYPOTHETICAL, CERTAIN/UNCERTAIN constants.
  • To reconciling-problem-lists: feed each entity plus its ClinicalContextResult so active vs. resolved vs. historical is decided correctly and negated mentions are excluded.
  • To FHIR grounding: negation=negated → `
अक्सर पूछे जाने वाले सवाल

यहाँ नकारने का क्या मतलब है?

इसका मतलब है कि नोट कहता है मरीज़ को वह निष्कर्ष नहीं है, जैसे denies chest pain।

क्या यह पारिवारिक इतिहास चिह्नित करती है?

हाँ। स्किल जिन फ़्लैग को संभालती है, उनमें पारिवारिक इतिहास भी है।

इस चरण से पहले क्या आता है?

पहले एंटिटी निष्कर्षण चलता है, ताकि स्किल जान सके कि किन शब्दों की जाँच करनी है।

जानकारी

लेखक का मूल विवरण

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
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

annotating-variants

5.8k

आपके एजेंट को मुफ़्त सार्वजनिक एनोटेटर से जेनेटिक वेरिएंट का असर बताने, HGVS नामों को जीनोम पोज़िशन में बदलने और जनसंख्या आवृत्ति जोड़ने में मदद करती है।

डेटाएनालिसिस और स्प्रेडशीट

ask-openmed

5.8k

आपके एजेंट को क्लिनिकल टेक्स्ट अनुरोध के लिए सही OpenMed वर्कफ़्लो चुनने में मदद करती है, जहाँ मरीज़ का डेटा हो सकता है वहाँ पहले गोपनीयता जाँच से शुरू करके।

अन्यविविध

assembling-fhir-bundles

5.8k

कई FHIR स्वास्थ्य रिकॉर्ड को एक ट्रांज़ैक्शन Bundle में पैक करती है, जो EHR को भेजने के लिए तैयार हो और आंतरिक संदर्भ सही जुड़े हों।

डेटाडेटाबेस

auditing-deid-leakage

5.8k

डी-आइडेंटिफ़ाइड क्लिनिकल टेक्स्ट में बचे पहचानकर्ता जैसे SSN, कार्ड नंबर, ईमेल और तारीखें खोजती है, और कुछ बचा हो तो रिलीज़ रोक देती है।

कोडिंगसिक्योरिटी

मिलती-जुलती skills