deidentify-a-dataset
하는 일
이 스킬은 CSV 같은 로컬 데이터 파일의 자유 텍스트 열에서 개인 정보를 제거하고, 가려진 별도의 사본을 만듭니다. 임상 데이터를 안전하게 공유하거나 분석해야 하는 분석가를 위한 스킬입니다.
사용하는 경우
- ✓분석하거나 공유하기 위해 임상 CSV, JSONL, Parquet 데이터 세트를 준비해야 할 때.
- ✓데이터 세트의 일부 자유 텍스트 열에만 환자 정보가 들어 있을 때.
- ✓값을 보지 않고도 얼마나 가려졌는지에 대한 요약이 필요할 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/deidentify-a-dataset/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 환자 CSV의 노트 열을 비식별화하고, 원본은 바꾸지 않은 채 새 파일로 저장해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 파일 형식과 지정된 자유 텍스트 열을 확인하고, 비식별화된 데이터를 새 파일에 쓴 뒤, 값은 제외하고 집계 수치와 비율만 보고합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
De-identify a dataset
Keep the source local, name the free-text columns explicitly, and write to a different destination. Never infer columns or print source and redacted cell values.
Procedure
- Confirm that the input is CSV, JSONL/NDJSON, or Parquet.
- Confirm which columns contain free text. Do not scan or log values to guess.
- Choose a policy and language. Prefer
strict_no_leakwhen recall is the governing safety requirement. - Write to a new path; never overwrite the input.
- Inspect only
result.summary, which contains aggregate counts and rates. - Validate recall and residual leakage on representative synthetic or approved evaluation fixtures before releasing the output.
Runnable synthetic example
Install the model runtime first with python -m pip install "openmed[hf]".
import csv
from pathlib import Path
from openmed import redact_dataset
source = Path("synthetic-notes.csv")
destination = Path("synthetic-notes.redacted.csv")
with source.open("w", newline="", encoding="utf-8") as handle:
writer = csv.DictWriter(handle, fieldnames=["record_id", "note"])
writer.writeheader()
writer.writerows(
[
{
"record_id": "SYNTH-001",
"note": (
"Taylor Example called 212-555-0198 about a "
"metformin refill."
),
},
{
"record_id": "SYNTH-002",
"note": (
"Send the synthetic follow-up to "
"demo.patient@example.test."
),
},
]
)
result = redact_dataset(
source,
text_columns=["note"],
output_path=destination,
policy="strict_no_leak",
lang="en",
)
print(result.output_path)
print(result.summary.to_dict()) # Aggregate counts only; no cell contents.
Use the equivalent CLI for an existing dataset:
openmed redact-dataset notes.csv \
--text-columns note,comment \
--policy strict_no_leak \
--output notes.redacted.csv
Safety checks
- Keep model inference and files on infrastructure the user controls.
- Do not print input rows, detected entity surfaces, reversible mappings, or exception payloads that may contain source text.
- Keep source and output paths separate and access-controlled.
- Treat the aggregate summary as evidence, not as proof of compliance.
- Never commit real clinical data or restricted evaluation corpora.
Repository example
Read and run the offline dataset walkthrough when you need a bundled synthetic fixture and first-run download controls.
자주 묻는 질문
원본 파일을 덮어쓰나요?
아니요. 새 경로에 쓰며 입력 파일은 절대 바꾸지 않습니다.
검사할 열을 추측하나요?
아니요. 사용자가 자유 텍스트 열을 지정하며, 스킬은 값을 보고 열을 추론하지 않습니다.
어떤 파일 형식을 지원하나요?
CSV, JSONL 또는 NDJSON, Parquet 파일을 지원합니다.
상세 정보
작성자의 원본 설명
De-identify selected free-text columns in a local CSV, JSONL, or Parquet dataset with OpenMed and produce a separate redacted dataset plus a PHI-free aggregate summary. Use when an agent must prepare a clinical dataset for analysis or sharing without overwriting the source or exposing cell values in logs.
repo: maziyarpanahi/openmed
인기도
- GitHub 스타
- 5.8k
- 순위
- #14688
- 라이선스
- 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, 카드 번호, 이메일, 날짜 같은 식별자를 검사하고, 남은 것이 있으면 공개를 막도록 돕습니다.