PHI Re-associate (Seam)
Category: Security
Node id: phi-reassociate
Maturity: beta
Risk tier: C
Standards: GDPR Art. 4(5), GDPR Art. 9, LOPDGDD DA 17ª, IEC 62304 Class C
Hospital-only: re-associates PSN pseudonym tokens and shifted dates in a returned Generation Result (C1/C2/C3) using the HG-20 correspondence table; rejects unknown or cross-patient tokens; stores results hospital-side and outputs only ids and counts.
What it does
- phi
- database
- reidentifies
Use cases
- Re-associating the P7 Generation Results of the HGUGM pilot on the hospital for the blind review
- Returning tenant-drafted documents to the data holder without the correspondence table ever leaving it
Runtime
- Performance tier:
medium - Effect:
write
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
generations | json | Yes | One Generation Result (tietai.seam.generation-result/v1) or an array of them; each element is processed independently. |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
results | json | No | Per document: {package_id, document_type, record_version, status, outcome, output_id, reason_codes}. No content, names, identifiers or dates. |
counts | json | No | PHI-free totals of the batch. |
success | boolean | No | True when at least one document is stored (or was already stored). |
Settings
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Fail on any rejection | fail_on_any_rejection | boolean | No | false | When true, one rejected document fails the node so the mesh redelivers. The pilot uses false and routes rejections to the hospital review queue. |
Errors
| Code | Description |
|---|---|
SEAM_NOT_DATA_HOLDER | Not on the data-holder site, or the seam dependencies are not wired (canonical name; emitted today as its alias SEAM_NOT_HOSPITAL) |
SEAM_NOT_HOSPITAL | Deprecated alias of SEAM_NOT_DATA_HOLDER; the code currently emitted |
KEY_MISMATCH | A correspondence row does not re-derive its token, or the stored date offset differs (wrong key after a restore) |
DB_ERROR | The store or the audit chain failed; nothing was stored for the affected documents |
SEAM_INPUT | No generations input |
Runtime notes
- Requires HYDRA_SITE_RESIDENCY=data-holder (deprecated alias: hospital), the seam keys and the correspondence store; refuses to run otherwise (SEAM_NOT_HOSPITAL).
- Never wire this node towards a hop-out: its segment must stay on the data holder (HG-22 pins refuse a path from a reidentifies node to hop-out).
- Rejections (UNKNOWN_TOKEN, MALFORMED_TOKEN, CROSS_PATIENT_TOKEN, UNKNOWN_PACKAGE, SPAN_MAP_MISSING, RECORD_MISMATCH) store nothing for that document, log the attempt and open a seam_reassociation review.
- A redelivery with the same input hash returns the existing output id; a different input for the same (consult, document type, record version) is a CONFLICTING_REDELIVERY and opens a review.
- Re-associated content is read only through GET /api/seam/reassociated/{id} (read:hydra.seam.reassociated); every read is audited.
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
Something unclear? Send documentation feedback by email.