deidentifying-multilingual-text
यह क्या करती है
यह स्किल कई भाषाओं में लिखे क्लिनिकल नोट्स से मरीज़ के पहचानकर्ता हटाती है, जिसमें राष्ट्रीय ID और फ़ोन नंबर के लिए भाषा-विशेष पैटर्न इस्तेमाल होते हैं। यह उन टीमों के लिए है जो अंग्रेज़ी के अलावा अन्य भाषाओं के मेडिकल रिकॉर्ड पर काम करती हैं।
कब इस्तेमाल करें
- ✓जब क्लिनिकल नोट्स अंग्रेज़ी के अलावा किसी भाषा में लिखे हों।
- ✓जब नोट्स में राष्ट्रीय पहचानकर्ता हों, जैसे स्पैनिश DNI या ब्राज़ीलियाई CPF।
- ✓जब नकली बदले गए मान नोट की स्थानीय भाषा और परिवेश के अनुसार लगने चाहिए।
Skill का लिंक
https://github.com/maziyarpanahi/openmed/blob/master/skills/deidentifying-multilingual-text/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“ये मेडिकल नोट्स स्पैनिश में हैं और इनमें DNI नंबर हैं। मरीज़ के पहचानकर्ता हटाइए, पर टेक्स्ट स्वाभाविक रखिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट नोट की भाषा के लिए मेल खाता भाषा मॉडल और पैटर्न चुनता है, फिर स्थानीय परिवेश वाले नकली मानों से पहचानकर्ता हटाता या बदलता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
De-identifying multilingual text
OpenMed de-identifies clinical text in many languages, each with a dedicated
PII model, language-specific regex patterns (national IDs, phone formats), and a
locale-aware surrogate generator. Pass lang= to deidentify / extract_pii
and the right model, patterns, and fake-data tables are selected automatically.
Everything runs on-device.
When to use this skill
Use it whenever the source text is not English, or when surrogates must look native to the locale (a German note should get German-looking fake names and a valid-format Steuer-ID surrogate, not a US SSN).
Discover supported languages at runtime — don't hardcode
import openmed
from openmed.core.pii_i18n import SUPPORTED_LANGUAGES, get_patterns_for_language
print(sorted(SUPPORTED_LANGUAGES)) # query it; the set is the source of truth
# Language-appropriate default model for a code:
models = openmed.get_pii_models_by_language("es")
# Language-specific regex patterns (national IDs, phones, etc.):
patterns = get_patterns_for_language("de")
The set currently spans English plus European, South Asian, Middle Eastern, and
East Asian languages — but always read SUPPORTED_LANGUAGES rather than
trusting a number, since it changes as models ship. MCP exposes the same list
via openmed_list_pii_languages.
Quick start (Spanish)
import openmed
nota = (
"El paciente Carlos Hernández (DNI 12345678Z), nacido el 11/04/1979, "
"vive en Calle Mayor 5, Madrid. Teléfono 612 345 678."
)
result = openmed.deidentify(
nota,
lang="es", # selects the Spanish PII model + ES patterns
method="replace", # locale-native fake values
locale="es_ES", # Faker locale (defaults from lang via LANG_TO_LOCALE)
)
print(result.deidentified_text)
# El paciente [surrogate name] (DNI [surrogate]), nacido el [date], ...
For German, just switch the code:
befund = "Patientin Anna Müller, geb. 11.04.1979, Steuer-ID 12 345 678 901."
result = openmed.deidentify(befund, lang="de", method="replace")
Workflow
- Confirm the language is supported by checking
SUPPORTED_LANGUAGES. - Pass
lang=todeidentify/extract_pii. This selects the language-specific model (viaget_pii_models_by_language) and the regex pattern set (viaget_patterns_for_language) for national IDs and formats. - Set
locale=for surrogates whenmethod="replace". If omitted, the locale is derived fromlangthroughLANG_TO_LOCALE(e.g.pt→pt_PT). Override for regional variants (pt_BR,en_GB, Gulf/Levant Arabic). - Let accent normalization happen. For models trained on accent-free text
(Spanish),
deidentifyauto-strips diacritics before inference and maps spans back to the original accented text. You normally do not setnormalize_accentsyourself. - Keep surrogates stable across a document with
consistent=True, seed=....
Language-specific national IDs
The pattern sets encode and the validators check real national identifier
formats and checksums, so structured IDs are caught even when the model is
unsure. Examples available in openmed.core.pii_i18n:
| Language | Identifier | Validator |
|---|---|---|
| French | NIR / INSEE | validate_french_nir |
| German | Steuer-ID | validate_german_steuer_id |
| Italian | Codice Fiscale | validate_italian_codice_fiscale |
| Spanish | DNI / NIE | validate_spanish_dni, validate_spanish_nie |
| Dutch | BSN | validate_dutch_bsn |
| Hindi | Aadhaar | validate_aadhaar |
| Portuguese | CPF / CNPJ | validate_portuguese_cpf, validate_portuguese_cnpj |
| Turkish | TCKN | validate_turkish_tckn |
These map to OpenMed CANONICAL_LABELS (ID_NUM, SSN) and are redacted by
the same policy actions as any other identifier.
Hand-off to / from OpenMed
- Core de-id:
deidentifying-clinical-text— methods, thresholds,keep_mapping, policies (all acceptlang/locale). - Surrogates:
generating-synthetic-surrogates— locale-native fakes and custom providers per language. - Policies:
configuring-privacy-policies—policy=works with anylang. - Audit:
auditing-deidentification-runsrecords the model and language in the no-PHI report. - Other surfaces: MCP
openmed_deidentify/openmed_list_pii_languages; RESTPOST /pii/deidentify(both take a language parameter).
Edge cases & gotchas
- **Never
अक्सर पूछे जाने वाले सवाल
कौन-सी भाषाएँ सपोर्ट होती हैं?
स्किल रनटाइम पर समर्थित भाषाओं की सूची जाँचती है, क्योंकि नए मॉडल आने के साथ यह सूची बढ़ती है।
क्या इसके लिए इंटरनेट कनेक्शन चाहिए?
नहीं। मॉडल एक बार डाउनलोड होने के बाद प्रोसेसिंग डिवाइस पर चलती है।
क्या यह राष्ट्रीय ID फ़ॉर्मैट संभालती है?
हाँ। यह DNI, codice fiscale और CPF जैसे राष्ट्रीय ID के लिए भाषा-विशेष पैटर्न इस्तेमाल करती है।
जानकारी
लेखक का मूल विवरण
De-identify non-English clinical text on-device with OpenMed by passing lang= and locale= to deidentify(). Use when the user has Spanish, German, French, Italian, Portuguese, Dutch, Hindi, Telugu, Arabic, Japanese, or Turkish medical notes, needs locale-aware fake surrogates, must handle language-specific national IDs (DNI, NIR, Steuer-ID, codice fiscale, BSN, CPF, TCKN, Aadhaar), or asks which languages OpenMed PII supports. Covers SUPPORTED_LANGUAGES, get_pii_models_by_language, get_patterns_for_language, LANG_TO_LOCALE, and accent normalization. Pairs with OpenMed deidentifying-clinical-tex
repo: maziyarpanahi/openmed
लोकप्रियता
- GitHub स्टार
- 5.8k
- रैंकिंग में स्थान
- #14690
- लाइसेंस
- 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
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।