auditing-deidentification-runs
Fungsinya
Skill ini menghasilkan catatan kepatuhan untuk setiap proses penghapusan identitas, berisi daftar apa yang dihapus dan alasannya, tanpa menyimpan data pasien itu sendiri. Skill ini untuk tim yang membutuhkan bukti audit untuk regulator atau tinjauan internal.
Kapan dipakai
- βSaat Anda membutuhkan bukti kepatuhan yang menunjukkan apa yang diubah oleh proses penghapusan identitas.
- βSaat Anda harus menyimpan catatan yang tahan terhadap perubahan untuk audit HIPAA atau GDPR.
- βSaat peninjau perlu memeriksa keputusan penghapusan identitas tanpa melihat data pribadi asli.
Link skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/auditing-deidentification-runs/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βJalankan penghapusan identitas pada catatan ini dengan catatan audit yang bisa saya simpan untuk tinjauan HIPAA kami, dan tandatangani agar perubahannya bisa terdeteksi.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent menjalankan penghapusan identitas dalam mode audit, menandatangani laporan yang dihasilkan dengan kunci yang Anda kendalikan, lalu menyimpannya agar integritasnya bisa diperiksa nanti.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Auditing de-identification runs
deidentify(..., audit=True) returns an AuditReport instead of the rewritten
text: a deterministic, PHI-free record of every redaction decision β
offsets, label, detector confidence and threshold, the action taken, content
hashes, model provenance, and projected residual risk. Sign it to make it
tamper-evident, retain it as compliance evidence, and verify it later without
ever touching the original text. Runs on-device.
When to use this skill
Use it whenever a de-identification needs to be defensible: regulatory retention, internal review, reproducibility checks, or proving to an auditor that identifiers were detected and handled β all without storing or exposing the PHI itself.
Quick start
import openmed
note = "Patient John Doe (MRN 1234567) seen 2024-03-02. SSN 123-45-6789."
# Returns an AuditReport, NOT a DeidentificationResult, when audit=True.
report = openmed.deidentify(note, policy="hipaa_safe_harbor", audit=True)
# Make it tamper-evident with a release HMAC key (keep the key in a vault).
report.sign(b"my-release-hmac-key", key_id="release-2026")
# Persist the no-PHI report (no plaintext identifiers inside).
import json
with open("deid_audit.json", "w") as fh:
json.dump(report.to_dict(), fh, indent=2)
# Later: verify integrity. Optionally bind to the exact texts via their hashes.
ok = report.verify(b"my-release-hmac-key", original_text=note)
assert ok
What an AuditReport contains
AuditReport (from openmed.core.audit) carries no plaintext PHI. Key fields:
| Field | Meaning |
|---|---|
policy |
policy profile name in effect |
resolved_profile |
the concrete settings applied (method, model, thresholds, language, sweep flags) |
detectors |
list[DetectorInfo] β provenance of each detector |
safety_sweep |
structured-ID sweep metadata (patterns version, source) |
spans |
list[AuditSpan] β one entry per detected identifier |
thresholds |
per-label confidence thresholds used |
residual_risk |
projected leakage / re-identification risk summary |
openmed_version |
library version that produced the report |
manifest_hash |
hash of the model manifest used |
document_length |
character length of the input |
input_hash |
sha256: hash of the original text |
deidentified_text_hash |
sha256: hash of the de-identified output |
repro_hash |
deterministic hash over the canonical payload |
signature |
AuditSignature once .sign() is called (else None) |
AuditSpan (per identifier, no plaintext): start, end, label,
canonical_label, sources, confidence, threshold, action, surrogate,
text_hash (hash of the span text), plus evidence and a redacted context.
DetectorInfo: source, model_id, model_format, commit, metadata.
AuditSignature: key_id, algorithm (HMAC-SHA256), value (hex digest).
Why audits store offsets + hashes + provenance, never plaintext
The whole point of de-identification is to not retain identifiers. An audit log full of raw names and MRNs would itself be a PHI breach. So OpenMed records:
- offsets (
start/end) β where an identifier was, not what it was; - hashes (
input_hash,deidentified_text_hash, per-spantext_hash) β prove what was processed without revealing it; - provenance (
detectors,manifest_hash,openmed_version) β which model/version made each call, for reproducibility; - residual risk (
residual_risk) β projected leakage so a reviewer can judge whether the output is safe to release.
This lets an auditor confirm coverage and integrity while the report stays shareable.
Workflow
- Run with
audit=Trueand apolicy=to get anAuditReport. - Inspect
residual_riskbefore releasing the output β non-zero projected leakage means review (cross-check withauditing-safe-harbor-checklist). - Sign with
report.sign(key, key_id=...)using a secret release HMAC key stored in a vault (never in the repo). - Persist
report.to_dict()(JSON). For a reviewer view without full context, usereport.export_review_bundle(). - Verify on retrieval with
report.verify(key). Passoriginal_text=/deidentified_text=to also confirm the texts match the recorded hashes. - Retain per your retention schedule alongside the de-identified output (but keep any reversible mapping separate and encrypted).
Hand-off to /
Pertanyaan umum
Apakah catatan itu berisi nama pasien?
Tidak. Laporan dirancang tanpa pengenal dalam bentuk teks biasa, sehingga aman untuk disimpan.
Bagaimana cara memeriksa catatan nanti?
Laporan yang ditandatangani bisa diverifikasi integritasnya nanti, dengan tautan opsional ke teks asli yang tepat.
Di mana skill ini berjalan?
Skill berjalan di perangkat tempat ia dipakai, sehingga audit tidak bergantung pada layanan cloud.
Detail
Deskripsi asli dari pembuat
Produce a signed, reproducible, no-PHI audit trail for an OpenMed de-identification run via deidentify(audit=True). Use when the user needs compliance evidence, a tamper-evident record of what was redacted and why, to verify nothing was changed, to retain proof for HIPAA/GDPR audits, or to review de-id decisions without exposing plaintext PHI. Covers the AuditReport / AuditSignature / AuditSpan / DetectorInfo fields, why audits store offsets+hashes+provenance+residual-risk and never plaintext, signing with .sign(key), and verifying with .verify(key). Pairs with OpenMed deidentifying-clinical-t
repo: maziyarpanahi/openmed
Popularitas
- Bintang GitHub
- 5.8k
- Peringkat
- #14669
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
annotating-variants
5.8kMembantu agent Anda memperkirakan apa yang dilakukan varian genetik, mengubah nama HGVS menjadi posisi genom, dan menambahkan frekuensi populasi, dengan memakai anotator publik yang gratis.
ask-openmed
5.8kMembantu agent Anda memilih alur kerja OpenMed yang tepat untuk permintaan teks klinis, dimulai dengan pemeriksaan privasi setiap kali data pasien mungkin ada.
assembling-fhir-bundles
5.8kMengemas beberapa rekam kesehatan FHIR menjadi satu Bundle transaksi yang siap dikirim ke EHR, dengan referensi internal yang terhubung dengan benar.
auditing-deid-leakage
5.8kMemindai teks klinis yang sudah dihapus identitasnya untuk mencari pengenal yang tertinggal, seperti nomor SSN, nomor kartu, email, dan tanggal, dan memblokir rilis jika masih ada.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.