mirror of
https://github.com/complexcaresolutions/dak.c2s.git
synced 2026-03-17 18:23:42 +00:00
docs: add Fall-ID anonymization design
Replace patient last name in fall_id with KVNR (or random fallback). Retroactive migration of all existing ~2900 fall_ids. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1612d449c0
commit
50e93b811d
1 changed files with 29 additions and 0 deletions
29
docs/plans/2026-02-26-fall-id-anonymisierung-design.md
Normal file
29
docs/plans/2026-02-26-fall-id-anonymisierung-design.md
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Fall-ID Anonymisierung
|
||||||
|
|
||||||
|
## Ziel
|
||||||
|
|
||||||
|
Die Fall-ID enthaelt aktuell den Nachnamen des Patienten (z.B. `2020-32-onko-Bartl-Zimmermann`). Das unterlaueft die Datenmaskierung fuer DAK-Mitarbeiter. Die Fall-ID muss anonymisiert werden.
|
||||||
|
|
||||||
|
## Neues Format
|
||||||
|
|
||||||
|
`YYYY-KW-Fallgruppe-KVNR` z.B. `2020-32-onko-A123456789`
|
||||||
|
|
||||||
|
Falls KVNR fehlt: `YYYY-KW-Fallgruppe-X7K9M2` (6-stellig alphanumerisch, Grossbuchstaben + Ziffern)
|
||||||
|
|
||||||
|
## Aenderungen
|
||||||
|
|
||||||
|
### 1. generate_fall_id() im Import-Service
|
||||||
|
|
||||||
|
Nutzt KVNR statt Nachname. Fallback: 6-stellige Zufallsfolge.
|
||||||
|
|
||||||
|
### 2. Retroaktive Migration aller bestehenden Fall-IDs
|
||||||
|
|
||||||
|
SQL-basierte Migration: Fuer jeden Fall wird die Fall-ID neu generiert nach Schema `YYYY-KW-Fallgruppe-KVNR` (bzw. Zufallsfolge wenn KVNR fehlt).
|
||||||
|
|
||||||
|
### 3. KVNR-Nachtrag aktualisiert Fall-ID
|
||||||
|
|
||||||
|
Im `PUT /cases/{case_id}/kvnr` Endpoint: Wenn die aktuelle Fall-ID eine Zufallsfolge enthaelt (kein KVNR-Muster), wird sie automatisch mit der neuen KVNR aktualisiert.
|
||||||
|
|
||||||
|
### 4. Duplicate Detection
|
||||||
|
|
||||||
|
`check_duplicate()` wird angepasst, da die Fall-ID jetzt anders aufgebaut ist.
|
||||||
Loading…
Reference in a new issue