building-with-openmed
하는 일
이 스킬은 OpenMed를 소개하는 출발점입니다. OpenMed는 사용자의 컴퓨터에서 임상 텍스트를 분석하고 비식별화하는 라이브러리입니다. 임상 또는 의료 텍스트 프로젝트를 시작하면서 올바른 시작점이 필요한 팀을 위한 스킬입니다.
사용하는 경우
- ✓OpenMed를 설치하거나 이것으로 임상 텍스트 파이프라인을 시작하고 싶을 때.
- ✓작업에 맞는 OpenMed 기능이나 모델이 무엇인지 확실하지 않을 때.
- ✓추출, 비식별화, 평가에 맞는 OpenMed 집중 스킬을 찾아야 할 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/building-with-openmed/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“임상 노트 프로젝트를 시작하려고 합니다. 진단명을 추출하고 환자 이름을 지우려면 어떤 OpenMed 기능을 써야 하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 목표를 파악하고, 이에 맞는 OpenMed 기능이나 집중 스킬을 찾은 뒤, 올바른 첫 단계를 알려 줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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
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
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:
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=Truefor 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'
자주 묻는 질문
OpenMed가 제 데이터를 인터넷으로 보내나요?
아니요. 모델은 모델 허브에서 한 번 내려받고, 이후 처리는 네트워크 호출 없이 기기에서 이루어집니다.
클라우드 서비스를 호출하나요?
아니요. 처리는 로컬에서 실행되며, 내려받는 것은 모델 허브의 모델뿐입니다.
OpenMed는 무료인가요?
Apache-2.0 라이선스의 라이브러리이므로 오픈 소스입니다.
상세 정보
작성자의 원본 설명
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.
repo: maziyarpanahi/openmed
인기도
- GitHub 스타
- 5.8k
- 순위
- #14680
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
annotating-variants
5.8k에이전트가 유전 변이의 효과를 예측하고, HGVS 이름을 게놈 위치로 바꾸고, 무료 공개 주석 도구를 사용해 인구 빈도를 붙이도록 돕습니다.
ask-openmed
5.8k에이전트가 임상 텍스트 요청에 맞는 OpenMed 워크플로를 고르도록 돕되, 환자 데이터가 있을 수 있으면 먼저 개인 정보 확인을 거치게 합니다.
assembling-fhir-bundles
5.8k여러 FHIR 건강 기록을 EHR로 보낼 수 있도록 하나의 트랜잭션 Bundle로 묶고, 내부 참조를 올바르게 연결하도록 에이전트를 돕습니다.
auditing-deid-leakage
5.8k비식별화된 임상 텍스트에 남은 SSN, 카드 번호, 이메일, 날짜 같은 식별자를 검사하고, 남은 것이 있으면 공개를 막도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.