deidentify-a-dataset
Skill này làm gì
Skill này xóa thông tin cá nhân khỏi các cột văn bản tự do của một tệp dữ liệu cục bộ, như CSV, và ghi ra một bản sao đã che riêng. Dành cho nhà phân tích phải chia sẻ hoặc phân tích dữ liệu lâm sàng một cách an toàn.
Khi nào nên dùng
- ✓Khi bạn cần chuẩn bị một bộ dữ liệu CSV, JSONL hoặc Parquet lâm sàng để phân tích hoặc chia sẻ.
- ✓Khi chỉ một số cột văn bản tự do trong bộ dữ liệu chứa thông tin bệnh nhân.
- ✓Khi bạn cần tóm tắt mức độ đã che, mà không phải xem các giá trị.
Liên kết skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/deidentify-a-dataset/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy che cột ghi chú trong tệp CSV bệnh nhân này và lưu một tệp mới, không thay đổi bản gốc.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent xác nhận loại tệp và các cột văn bản được chỉ định, ghi dữ liệu đã che ra một tệp mới, và chỉ báo cáo số lượng và tỷ lệ tổng hợp.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.
Câu hỏi thường gặp
Nó có ghi đè tệp gốc không?
Không. Nó ghi ra một đường dẫn mới và không bao giờ thay đổi tệp đầu vào.
Nó có tự đoán cột cần quét không?
Không. Bạn chỉ định các cột văn bản tự do, và skill không suy ra từ giá trị.
Những loại tệp nào hoạt động?
Hỗ trợ tệp CSV, JSONL hoặc NDJSON và Parquet.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 5.8k
- Vị trí xếp hạng
- #14688
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
annotating-variants
5.8kGiúp agent dự đoán tác động của biến thể di truyền, đổi tên HGVS sang vị trí bộ gen và gắn tần suất quần thể bằng công cụ chú giải miễn phí.
ask-openmed
5.8kGiúp agent chọn đúng quy trình OpenMed cho yêu cầu về văn bản lâm sàng, luôn kiểm tra quyền riêng tư trước khi có thể có dữ liệu bệnh nhân.
assembling-fhir-bundles
5.8kGói nhiều bản ghi y tế FHIR thành một Bundle giao dịch để gửi tới EHR, với các tham chiếu nội bộ được liên kết đúng.
auditing-deid-leakage
5.8kQuét văn bản lâm sàng đã khử nhận dạng để tìm định danh còn sót như SSN, số thẻ, email và ngày tháng, và chặn phát hành nếu còn sót.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.