Przejdź do treści
Biblioteka skilli
Medycyna i zdrowie · Budowanie i kod

phi-redaction

/phi-redaction

Stosuje ostrożne wzorce redakcji danych zdrowotnych (PHI) w zasobach FHIR przed dostępem agenta AI oraz w potokach danych klinicznych z deidentyfikacją.

Licencja
MIT
Ostatnia zmiana repozytorium
23.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
1
Przestarzałość

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

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Stosuje ostrożne wzorce redakcji danych zdrowotnych (PHI) w zasobach FHIR przed dostępem agenta AI oraz w potokach danych klinicznych z deidentyfikacją.

Oryginalny opis (EN)

Conservative PHI redaction patterns for FHIR resources. Use when: (1) Redacting patient health information from FHIR resources before AI agent access, (2) Implementing de-identification for clinical data pipelines, (3) Understanding what fields are stripped, masked, or truncated in FHIR resources, (4) Building read paths that automatically protect patient privacy.

Jak działa

  1. When to Use This Skill
  2. Redaction Rules
  3. Implementation Pattern (Python)
  4. De-identification Preview Coverage
  5. Integration with MCP Tools
Sekcje z nagłówków SKILL.md, w oryginale · 96 linii, 441 słów
Podgląd SKILL.md
---
name: phi-redaction
description: >
  Conservative PHI redaction patterns for FHIR resources. Use when:
  (1) Redacting patient health information from FHIR resources before AI agent access,
  (2) Implementing de-identification for clinical data pipelines,
  (3) Understanding what fields are stripped, masked, or truncated in FHIR resources,
  (4) Building read paths that automatically protect patient privacy.
---

# PHI Redaction for FHIR Resources

Standard redaction profile for Protected Health Information (PHI) applied on all
read paths in the FHIR MCP guardrail stack. This is a technical minimization
preview, not a legal Safe Harbor determination.

## When to Use This Skill

- You need to understand how PHI is stripped from FHIR resources
- You are building a pipeline that must redact clinical data before AI access
- You need to implement or audit de-identification logic for FHIR

## Redaction Rules

All redaction is applied at read time, not at storage time.

### Names (`HumanName`)
- **Family name**: Kept as-is
- **Given names**: Truncated to first initial + period (e.g., "John" -> "J.")
- **Text**: Removed

### Identifiers
- **Value**: Removed (e.g., `{"system": "…/us-ssn", "value": "123-45-6789"}` -> `{"system": "…/us-ssn"}`)
- **System and type**: Kept for reference

### Addresses
- **Line and text**: Removed
- **City, state, country**: Kept (for demographic analysis)

### Telecom (Phone, Email)
- **Value**: Replaced with `[Redacted]`
- **System and use**: Kept

### Birth Date
- **Truncated to year only** (e.g., "1985-03-15" -> "1985")

### Photos
- **Removed entirely** from the resource

### Text Narratives
- **Replaced** with: `<div xmlns="http://www.w3.org/1999/xhtml">[Redacted]</div>`
- **Status** set to `empty`

### Notes and Comments
- **Replaced** with `[Redacted]`

### Contained Resources
- All contained resources are redacted recursively

## Implementation Pattern (Python)

```python
import json

def apply_redaction(resource):
    """Deep-copy the resource and redact PHI fields."""
    redacted = json.loads(json.dumps(resource))
    _redact_fields(redacted)
    for contained in redacted.get('contained', []):
        if isinstance(contained, dict):
            _redact_fields(contained)
    return redacted
```

Key implementation notes:
- Always deep-copy before redacting (never modify the stored resource)
- Redact contained resources recursively
- Apply on ALL read paths: direct reads, search results, context envelopes,
  upstream proxy responses

## De-identification Preview Coverage

This redaction profile minimizes these common identifier classes:
- Names (partial)
- Geographic data smaller than state (addresses stripped)
- Dates (birth date truncated to year)
- Telephone/fax numbers (redacted)
- Email addresses (redacted)
- Medical record numbers, Social Security numbers, account numbers — any `identifier.value` (removed)

**Not covered by this profile** (would need additional implementation):
- An identifier typed into a free-text field the profile does not strip (no pattern scan runs over arbitrary strings)
- IP addresses, device identifiers (not redacted from extension fields)
- Biometric identifiers
- Full-face photographs (removed if in `photo` field, not scanned in attachments)

## Integration with MCP Tools

The redaction is applied automatically by the guardrail stack. MCP tools like
`fhir.read`, `fhir.search`, `fhir.lastn`, and `context.get` all return
redacted data. No additional action is needed by the agent.

The `$deidentify` operation provides an explicit conservative preview on demand.
Expert review is still required before export or disclosure.

Wersje

W bazie nie ma innych skilli o nazwie phi-redaction.

Migawka bazy z 28.10.2026 · wersja paczki e89f0e9d5505 (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

  • 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.
  • 100patient-demographics-summary
    Pobiera i formatuje pełne podsumowanie danych demograficznych pacjenta z zasobów FHIR Patient, RelatedPerson i Coverage, np. gdy ktoś prosi o dane pacjenta.
  • 100building-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.
  • 100hipaa-guardian
    Skanuje kod, logi, endpointy, zasoby FHIR i komunikaty HL7 pod kątem wycieku PHI i PII, sprawdza uwierzytelnianie i generuje raport audytu HIPAA.
  • 95healthchain
    Pomaga pisać Pythona łączącego się z API FHIR: tworzy i waliduje zasoby FHIR, obsługuje CDS Hooks i MCP, z Epic i Medplum.

Uwagi i zgłoszenia

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