extract-clinical-entities-to-fhir
यह क्या करती है
यह स्किल सिंथेटिक या डी-आइडेंटिफ़ाइड टेक्स्ट से क्लिनिकल एंटिटी निकालती है और उन्हें Condition या Observation जैसे FHIR R4 रिसोर्स में मैप करती है। यह उन डेवलपर्स के लिए है जिन्हें स्थानीय क्लिनिकल टेक्स्ट से संरचित FHIR आउटपुट चाहिए, जिसमें कोड केवल मंज़ूर स्रोतों से जुड़ें।
कब इस्तेमाल करें
- ✓जब एजेंट को क्लिनिकल टेक्स्ट को FHIR Condition या Observation रिसोर्स में बदलना हो।
- ✓जब आप चाहते हैं कि निष्कर्षण क्लिनिकल कोडिंग के फ़ैसलों से अलग रहे।
- ✓जब स्रोत टेक्स्ट सिंथेटिक हो या निष्कर्षण से पहले पहले ही डी-आइडेंटिफ़ाई हो चुका हो।
Skill का लिंक
https://github.com/maziyarpanahi/openmed/blob/master/skills/extract-clinical-entities-to-fhir/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस सिंथेटिक नोट से डायग्नोसिस निकालिए और हर एक को Bundle के अंदर FHIR Condition में बदलिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट एंटिटी निष्कर्षण चलाता है, एक विश्वास सीमा से ऊपर के स्वीकृत लेबल ही रखता है, हर एक को रिसोर्स टाइप से मैप करता है, और Bundle जोड़ता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Extract clinical entities to FHIR
Separate extraction from clinical coding. OpenMed finds spans and supplies the mechanical FHIR builders; the application decides which resource type and status are clinically appropriate.
Procedure
- Keep the source synthetic, or de-identify it inside the trusted boundary before extraction.
- Run
openmed.analyze_textwith the task-appropriate clinical model. - Filter predictions by label and confidence; preserve offsets in a PHI-safe audit record.
- Map each accepted span to the correct FHIR resource type.
- Add terminology codes only from a user-approved mapping or terminology service. Never invent a code.
- Assemble resources with
to_bundleand validate against the target profile.
Runnable synthetic example
Install the model runtime first with python -m pip install "openmed[hf]".
import json
from openmed import analyze_text
from openmed.clinical.exporters.fhir import to_bundle
note = "Assessment: type 2 diabetes mellitus is stable on metformin."
result = analyze_text(
note,
model_name="disease_detection_superclinical",
confidence_threshold=0.5,
)
resources = [{"resourceType": "Patient", "id": "synthetic-patient"}]
for index, entity in enumerate(result.entities, start=1):
if entity.label.upper() not in {"CONDITION", "DIAGNOSIS", "DISEASE"}:
continue
resources.append(
{
"resourceType": "Condition",
"id": f"condition-{index}",
"clinicalStatus": {
"coding": [
{
"system": (
"http://terminology.hl7.org/CodeSystem/"
"condition-clinical"
),
"code": "active",
}
]
},
"verificationStatus": {
"coding": [
{
"system": (
"http://terminology.hl7.org/CodeSystem/"
"condition-ver-status"
),
"code": "confirmed",
}
]
},
# A text-only CodeableConcept is preferable to an invented code.
"code": {"text": entity.text},
"subject": {"reference": "Patient/synthetic-patient"},
}
)
if len(resources) == 1:
raise RuntimeError("No condition spans met the label and confidence rules")
bundle = to_bundle(resources, doc_id="synthetic-note-001")
print(json.dumps(bundle, indent=2))
Safety checks
- Do not put raw identifiers, source text, or reversible mappings in logs,
OperationOutcome.diagnostics, or trace metadata. - Keep a patient identity service separate from extracted clinical facts.
- Preserve negation, temporality, and experiencer context before asserting a resource as active or confirmed.
- Use a text-only
CodeableConceptwhen no approved code is available. - Validate the Bundle against the receiver's FHIR and profile requirements.
- Do not bundle restricted terminologies; use the user's licensed service.
Repository example
Read and run the redaction-to-FHIR walkthrough for an offline-friendly pipeline with deterministic extraction.
अक्सर पूछे जाने वाले सवाल
क्या यह ICD-10 जैसे कोड अपने-आप जोड़ेगी?
नहीं। कोड केवल उस मैपिंग से आते हैं जिसे आप मंज़ूर करते हैं, या किसी टर्मिनोलॉजी सेवा से।
कौन-सा टेक्स्ट अनुमत है?
दिशानिर्देश सिंथेटिक टेक्स्ट माँगते हैं, या ऐसा टेक्स्ट जिसे निष्कर्षण से पहले भरोसेमंद सीमा के भीतर डी-आइडेंटिफ़ाई किया गया हो।
क्या यह आउटपुट की जाँच करती है?
दिशानिर्देश कहते हैं कि रिसोर्स को लक्ष्य प्रोफ़ाइल के विरुद्ध वैलिडेट करें।
जानकारी
लेखक का मूल विवरण
Extract clinical entities from synthetic or already de-identified text with OpenMed and map them into deterministic FHIR R4 resources and a Bundle. Use when an agent must turn local clinical NER output into Conditions, MedicationStatements, Observations, or other FHIR resources without inventing terminology codes.
repo: maziyarpanahi/openmed
लोकप्रियता
- GitHub स्टार
- 5.8k
- रैंकिंग में स्थान
- #14698
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस 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
discrawl
394kयह आपके एजेंट को Discord संदेशों के सेव किए गए स्थानीय आर्काइव में खोजने, उसका सारांश बनाने और उसकी ताज़गी जांचने में मदद करती है।
clickhouse-io
280kआपके एजेंट को ClickHouse databases में queries और schemas optimize करने में मदद करता है। high-performance analytical workloads के लिए best practices लागू करता है। जब analytical queries बहुत धीमी हों, तब इसका उपयोग करें।
scientific-db-pubmed-database
280kआपके एजेंट को बायोमेडिकल क्षेत्र के वैज्ञानिक लेख खोजने में मदद करता है। जिस रिसर्च में खास मेडिकल जानकारी चाहिए, उसके लिए यह काम का है।