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

ingesting-clinical-documents

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

यह स्किल स्कैन किए फ़ैक्स, नोट्स की फ़ोटो, स्प्रेडशीट एक्सपोर्ट और C-CDA फ़ाइलों को आपके अपने कंप्यूटर पर साफ़ टेक्स्ट में बदलती है। यह उन टीमों के लिए है जिनके क्लिनिकल रिकॉर्ड सादे टेक्स्ट के बजाय इमेज या एक्सपोर्ट की गई फ़ाइलों में आते हैं।

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

  • ✓जब क्लिनिकल नोट्स स्कैन किए गए फ़ैक्स या फ़ोटो की गई पेज के रूप में आएँ और टेक्स्ट पहचान चाहिए।
  • ✓जब मरीज़ का एक्सपोर्ट CSV या TSV फ़ाइल हो, जिसे कॉलम के अनुसार संभालना हो।
  • ✓जब विश्लेषण से पहले C-CDA XML दस्तावेज़ों को टेक्स्ट में बदलना हो।

Skill का लिंक

https://github.com/maziyarpanahi/openmed/blob/master/skills/ingesting-clinical-documents/SKILL.md

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

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

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

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

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

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

“मेरे पास एक डिस्चार्ज नोट का स्कैन किया फ़ैक्स और मरीज़ की विज़िट का CSV एक्सपोर्ट है। इन दोनों को साफ़ टेक्स्ट में बदलिए, जिसे मैं डी-आइडेंटिफ़ाई कर सकूँ।”

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

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

एजेंट इमेज पर डिवाइस पर टेक्स्ट पहचान चलाता है, तालिकाओं को कॉलम-दर-कॉलम संभालता है, और C-CDA XML को समतल करता है, फिर स्रोत स्थानों के साथ साफ़ टेक्स्ट लौटाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Ingesting Clinical Documents

Clinical text often arrives as scanned faxes, photographed notes, CSV exports, or C-CDA XML — not plain text. openmed.multimodal converts these into a normalized ExtractedDocument (clean text + character-offset → source-location spans) so you can run de-identification and NER. It runs on-device: OCR backends are local, no document leaves the machine.

When to use

  • You have images / scanned faxes of clinical notes and need text out (OCR).
  • You have CSV/TSV patient exports that need column-aware handling.
  • You have C-CDA XML to flatten into text.
  • You are building the intake stage that feeds openmed.deidentify and openmed.analyze_text.

This is the first stage. After intake, hand off to deidentifying-clinical-text then extracting-clinical-entities.

What is supported today

redact_document dispatches by file extension. Live handlers:

Input Extensions Path
Images / scans .png .jpg .jpeg .tif .tiff .bmp .gif .webp OCR (ocr() / image handler)
Tables .csv .tsv column-aware tabular redaction
C-CDA .xml (detected as CDA) stdlib CDA adapter

PDF and DOCX have no live handler yet — redact_document("x.pdf") raises UnsupportedDocumentError. Convert PDFs to page images first (or to text with your own tool) and feed the images through OCR. See references/multimodal-ingest.md for the full contract, engines, and the tabular pipeline.

Install

pip install "openmed[multimodal]"      # document intake contract + image deps
pip install "openmed[ocr-paddle]"      # add the PaddleOCR engine
# Tesseract engine also needs the system binary, e.g.:  brew install tesseract

Quick start: OCR an image, then de-identify

The clean two-step intake path. ocr() lives in the submodule (it is intentionally not re-exported from openmed.multimodal):

from openmed.multimodal.ocr import ocr
import openmed

# 1) OCR a scanned/faxed note -> OcrResult -> ExtractedDocument -> plain text
result = ocr("fax_page.png", engine=None)   # None = auto-select an installed engine
doc    = result.to_document()                # ExtractedDocument
text   = doc.text                            # clean text for downstream OpenMed

# 2) De-identify, then run NER (privacy-first order)
deid = openmed.deidentify(text, method="mask", policy="hipaa_safe_harbor")
ner  = openmed.analyze_text(deid.deidentified_text, output_format="dict")

for ent in ner.entities:
    print(ent.label, ent.text, ent.confidence)

engine may be None (auto-select), "tesseract", "paddleocr", or an OcrEngine instance. OcrResult exposes .text and per-word boxes via .words (each OcrWord has text, bbox, confidence, page).

One-step intake + redaction with redact_document

For images, CSV/TSV, and CDA, redact_document performs intake and de-identification in a single, format-aware call, returning an already-redacted ExtractedDocument:

from openmed.multimodal import redact_document

# Image scan: OCR + redact in one call
doc = redact_document("fax_page.png")
print(doc.text)        # redacted text
print(doc.spans[:3])   # SourceSpan offsets -> page / bbox in the original scan

# CSV export: per-column classification (direct id / quasi-id / safe) + redaction
table_doc = redact_document("patients.csv")
print(table_doc.text)

Use redact_document when you want OpenMed to own intake and redaction (especially for tables, where redaction is column-scoped, not free-text NER). Use the ocr() → to_document() → deidentify path when you want to control the de-identification method, policy, or mapping yourself.

Tabular CSV/TSV redaction

CSV columns get classified before any cell is touched, so a free-text NER pass is not run blindly over structured data:

from openmed.multimodal import read_table, redact_table

view = read_table("patients.csv")            # TableView with column decisions
for col in view.columns:
    print(col.name, "->", col.assigned_class, col.action, col.canonical_label)

redacted = redact_table("patients.csv", keep_year=True)
print(redacted.text)            # redacted CSV
for entry in redacted.manifest: # PHI-SAFE audit: counts/actions per column, no raw values
    print(entry)

redact_table(...) returns a RedactedTable with .text, .headers, .rows, .columns, and a PHI-safe .manifest (no raw

अक्सर पूछे जाने वाले सवाल

क्या PDF सपोर्ट होते हैं?

सीधे अभी नहीं। PDF और DOCX फ़ाइलों का कोई सीधा हैंडलर नहीं है, इसलिए पहले पेजों को इमेज में बदलना होगा।

क्या दस्तावेज़ मेरे कंप्यूटर से बाहर जाता है?

नहीं। टेक्स्ट पहचान डिवाइस पर चलती है।

इसके बाद क्या होता है?

साफ़ टेक्स्ट डी-आइडेंटिफ़िकेशन में जाता है, और फिर एंटिटी निष्कर्षण में।

जानकारी

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

Turn scanned faxes, images, and CSV/CDA exports into clean text ready for OpenMed de-identification and NER, fully on-device. Use when the user has clinical documents (image scans, photographed/faxed notes, tabular CSV/TSV exports, C-CDA XML) and needs OCR or structured intake before openmed.deidentify and openmed.analyze_text, asks about openmed.multimodal, OCR engines (Tesseract / PaddleOCR), tabular redaction, or layout and reading order. Covers the verified ocr() and redact_document() entry points and the ExtractedDocument contract. Pairs before deidentifying-clinical-text and extracting-c

repo: maziyarpanahi/openmed

लोकप्रियता

GitHub स्टार
5.8k
रैंकिंग में स्थान
#14708
लाइसेंस
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