Przejdź do treści
Biblioteka skilli
Medycyna i zdrowie · Nauka i wyjaśnianie

building-with-openmed

/building-with-openmed

Wprowadza w projekty z OpenMed, lokalną biblioteką NLP dla tekstów klinicznych i biomedycznych (rozpoznawanie nazw, deidentyfikacja PHI, eksport FHIR, ewaluacja), i pomaga dobrać możliwość lub model do zadania.

Repozytorium
openmed ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Wprowadza w projekty z OpenMed, lokalną biblioteką NLP dla tekstów klinicznych i biomedycznych (rozpoznawanie nazw, deidentyfikacja PHI, eksport FHIR, ewaluacja), i pomaga dobrać możliwość lub model do zadania.

Oryginalny opis (EN)

Orient and bootstrap any project that uses OpenMed, the on-device clinical and biomedical NLP library, for named-entity recognition, PHI de-identification, FHIR export, and evaluation. Use when the user mentions OpenMed, wants to install it, asks which OpenMed capability or model fits a task, or is starting to build a clinical/medical text pipeline and needs the right entry point.

Jak działa

  1. When to use this skill
  2. Install
  3. The three core calls
  4. Discover what is available at runtime
  5. Non-negotiable rules when building with OpenMed
  6. A typical pipeline
Sekcje z nagłówków SKILL.md, w oryginale · 120 linii, 682 słów
Podgląd SKILL.md
---
name: building-with-openmed
description: "Orient and bootstrap any project that uses OpenMed, the on-device clinical and biomedical NLP library, for named-entity recognition, PHI de-identification, FHIR export, and evaluation. Use when the user mentions OpenMed, wants to install it, asks which OpenMed capability or model fits a task, or is starting to build a clinical/medical text pipeline and needs the right entry point."
license: Apache-2.0
metadata:
  project: OpenMed
  category: openmed-core
  pairs: adjacent
  version: "1.0"
---

# Building with OpenMed

OpenMed is an Apache-2.0, **local-first** Python library for clinical and
biomedical NLP. Models download once from the Hugging Face Hub and then run
**fully on-device** — no network calls, no telemetry, no raw PHI in logs,
caches, or temp files. This skill is the map: it tells you what OpenMed can do
and which focused skill (or API) to reach for next.

## When to use this skill

Use it to scope a task and pick an entry point. For the actual work, hand off to
the focused OpenMed skills (each is grounded in the real API):

| Task | Skill / API |
| --- | --- |
| Find and load a model | `loading-openmed-models`, `choosing-openmed-models` |
| Run clinical/biomedical NER | `extracting-clinical-entities` (`openmed.analyze_text`) |
| Zero-shot NER (no fine-tune) | `running-zeroshot-ner` (`openmed zero`) |
| Remove / mask PHI | `deidentifying-clinical-text` (`openmed.deidentify`) |
| Detect PHI spans only | `extracting-pii-entities` (`openmed.extract_pii`) |
| Restore masked PHI | `reidentifying-text` (`openmed.reidentify`) |
| Pick a privacy policy | `configuring-privacy-policies` (7 bundled profiles) |
| Non-English PHI | `deidentifying-multilingual-text` |
| Signed, no-PHI audit | `auditing-deidentification-runs` (`audit=True`) |
| Negation / temporality | `resolving-clinical-context` (`openmed.clinical`) |
| Evaluate with leakage gates | `evaluating-with-leakage-gates` (`openmed.eval`) |
| FHIR R4 export | `exporting-to-fhir` (`openmed.interop`) |
| Serve REST / MCP | `serving-openmed-rest-api`, `deploying-openmed-mcp` |
| Run on Apple Silicon / edge | `running-openmed-ondevice` (MLX / CoreML / ONNX) |

## Install

```bash
pip install openmed                 # core: NER + de-identification
pip install "openmed[hf]"           # add Hugging Face model downloads
pip install "openmed[mcp]"          # Model Context Protocol server
pip install "openmed[service]"      # FastAPI REST service
pip install "openmed[mlx]"          # Apple Silicon acceleration
pip install "openmed[presidio]"     # Microsoft Presidio bridge
```

Extras map to capabilities: `cli`, `mcp`, `service`, `presidio`, `spacy`,
`langchain`, `gliner` (zero-shot), `multimodal`/`ocr-paddle` (document intake),
`mlx`/`coreml`/`onnx` (on-device backends), `hf` (model hub), `dev` (tests/lint).

## The three core calls

```python
import openmed

# 1) Named-entity recognition (token classification)
result = openmed.analyze_text(
    "Patient prescribed 500 mg metformin for type 2 diabetes.",
    model_name="disease_detection_superclinical",  # registry key, HF id, or local path
    output_format="dict",                           # dict | json | html | csv
)

# 2) De-identify PHI (mask | remove | replace | hash | shift_dates)
deid = openmed.deidentify(
    "John Doe (MRN 12345) seen on 2024-03-02.",
    method="replace",
    policy="hipaa_safe_harbor",   # bundled policy profile
)
print(deid.deidentified_text)     # PHI removed; deid.pii_entities lists the spans

# 3) Detect PHI spans without changing the text
pii = openmed.extract_pii("Call Dr. Smith at 617-555-0123.")  # PredictionResult
spans = pii.entities                                          # the PHI spans
```

`analyze_text` and `deidentify` are the workhorses. Everything else
(multilingual, audit, policies, FHIR, eval) layers on top of these.

## Discover what is available at runtime

Never hardcode model lists or language counts — query them:

```python
import openmed
openmed.list_model_categories()          # e.g. Privacy, Disease, Oncology, Genomics ...
openmed.get_models_by_category("Disease")
openmed.get_pii_models_by_language("es")
from openmed.core.pii_i18n import SUPPORTED_LANGUAGES   # de-id language set
```

CLI equivalents: `openmed models list`, `openmed models info <key>`,
`openmed analyze --text "<text>" --model <key> --format json`. MCP/REST expose
the same surface as tools (`openmed_analyze_text`, `openmed_deidentify`,
`openmed_list_models`, …).

## Non-negotiable rules when building with OpenMed

- **Local-first.** Do not add cloud calls to PHI workflows. Models run on-device
  after a one-time download.
- **No raw PHI in artifacts.** Logs, caches, audit reports, and error messages
  must use offsets, hashes, and labels — never plaintext identifiers. Use
  `audit=True` for tamper-evident, no-PHI audit output.
- **Permissive licensing only.** Do not bundle UMLS, SNOMED CT, CPT, MIMIC,
  i2b2, or n2c2 assets. Call restricted terminologies out-of-process with the
  user's own credentials.
- **De-identification is verified, not assumed.** Gate on leakage with
  `openmed.eval`, not on F1 alone (see `evaluating-with-leakage-gates`).
- **Clinical safety.** OpenMed assists; it does not make autonomous clinical
  decisions. Surface disclaimers for any borderline medical-device behavior.

## A typical pipeline

```
ingest (HL7v2 / FHIR / C-CDA / OCR)
   → de-identify (openmed.deidentify, policy=…)
   → extract entities (openmed.analyze_text)
   → ground to terminology (out-of-process: RxNorm / LOINC / SNOMED)
   → assemble FHIR (openmed.interop)
   → evaluate (openmed.eval leakage gates)
```

Each stage has a companion skill in this directory. Start here, then jump to the
stage you need.

Wersje

W bazie nie ma innych skilli o nazwie building-with-openmed.

Migawka bazy z 28.10.2026 · wersja paczki 37f5eb591342 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100extracting-clinical-entities
    Uruchamia rozpoznawanie jednostek w tekstach medycznych funkcją analyze_text z OpenMed: choroby, leki, anatomia, geny, z filtrem pewności i eksportem do JSON, CSV lub JSONL.
  • 100loading-openmed-models
    Ładuje modele OpenMed do rozpoznawania nazw w tekstach klinicznych i biomedycznych z Hugging Face Hub lub ścieżki lokalnej, zarządza cache, pracą offline, urządzeniem i ponownym użyciem ModelLoader.
  • 100phi-redaction
    Stosuje ostrożne wzorce redakcji danych zdrowotnych (PHI) w zasobach FHIR przed dostępem agenta AI oraz w potokach danych klinicznych z deidentyfikacją.
  • 100fhir-r6-guardrails
    Zapewnia zabezpieczenia agentów AI przy dostępie do danych klinicznych FHIR przez MCP: redakcję PHI, dwufazowy zapis z autoryzacją i obsługę zasobów Permission w R6.
  • 90healthcare-fhir
    Projektuje RESTowe wymiany danych klinicznych w standardzie HL7 FHIR z terminologią SNOMED i LOINC.
  • 100nlp-engineer
    Pomaga budować produkcyjne systemy NLP: potoki przetwarzania tekstu, modele językowe oraz zadania takie jak rozpoznawanie nazw, analiza sentymentu i tłumaczenie maszynowe.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.