> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tenetlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Attestation

> What the engine's Safe Harbor–aligned attestation records and what it does not: output_is_phi is three-state (never False under Safe Harbor), requires_review is always true, and residue_detected is the field to route review on.

**The attestation** is a per-document and per-corpus record from the engine's HIPAA posture layer: what it removed, under which Safe Harbor–aligned posture, and the one incompleteness it can measure. It is evidence for a reviewer. It is **not** a certificate that the output is de-identified.

## When to use it

Read this before anyone in your organization treats placeholder output — or any attestation field — as proof that text no longer contains PHI.

> [!NOTE]
>
> The HTTP API doesn't return an attestation. `/deidentify` returns placeholders and `findings`; nothing in its response asserts that the output is free of PHI. The semantics below apply wherever you consume attestations produced by the engine's HIPAA posture layer, and they set the bar for how to read *any* de-identification output from this product.

## Postures

| Posture | HIPAA reference | Output is PHI? | Dates | Geography |
| - | - | - | - | - |
| `SAFE_HARBOR` | 45 CFR 164.514(b)(2) | Undetermined (`None`) | Year only | ZIP3 only |
| `SAFE_HARBOR_DATE_SHIFTED` | (b)(2), plus human review | Undetermined (`None`) | Shifted per patient; intervals exact | ZIP3 only |
| `LIMITED_DATA_SET` | 164.514(e) | **Yes** (`True`) — needs a Data Use Agreement | Full | Town/city, state, ZIP |

Expert Determination (164.514(b)(1)) isn't a posture: it's a human certification, and software can't make it.

## What it does not certify

**`output_is_phi` is never `False` under Safe Harbor.** It's three-state:

| Value | When | Meaning |
| - | - | - |
| `None` | Safe Harbor postures, no residue measured | **Undetermined.** Safe Harbor asks whether all 18 identifier categories are *absent*. The layer can remove only what the detector found and can't know what it missed. |
| `True` | `residue_detected` fired, or `LIMITED_DATA_SET` | Identifiers are measurably present (residue), or the output is PHI by design (LDS). |
| `False` | Never under Safe Harbor | — |

Don't treat output as de-identified on the strength of this field; establish the detector's recall on your own data.

**`requires_review` is `true` under every posture.** Because a Safe Harbor posture doesn't certify its own outcome, every document needs review — which means the flag doesn't rank one document above another. Don't route a review queue on it: it sends you everything.

## What it does measure

**`residue_detected`** — a span *this layer wrote* and only partially removed: an alphanumeric flush against a placeholder (`[IDCARDNUM]4482`, `HP[IDCARDNUM]`) or one connector welded to it with no space (`[ACCOUNTNUM]-4482-ACHT`). These are worse than a clean miss because they look redacted. When it fires, `output_is_phi` is `True`. It's scoped to the layer's own edits, so bracketed text from an EHR template or an upstream de-identifier isn't mistaken for a partial removal. A space around a separator means punctuation: `[DATE] - [DATE]` doesn't fire.

**Route review on `residue_detected`.**

Per document, an attestation carries the transformed text, the edits (output offsets), counts, categories, the identity tier used for date shifting, and warnings. Across a release, the corpus attestation flags mixed postures (one LDS document makes the whole release a limited data set), mixed identity tiers when dates are shifted, documents with no inferred identity (dates redacted rather than shifted), and the engine's provenance. It carries counts, never values, never document text and never patient keys.

## Claims you can and can't make

| You can say | You can't say |
| - | - |
| "Identifiers detected by the engine were replaced under a Safe Harbor–aligned posture." | "The output is HIPAA de-identified." |
| "The attestation flagged residue in N documents, which were reviewed." | "The attestation certifies the output is not PHI." |
| "Re-identification is audited per call in an immutable store." | "The product is HIPAA compliant / HIPAA certified." |

Review my code for places that treat de-identified output or attestation fields as a PHI-free guarantee.

Review this codebase for unsafe assumptions about Tenet PII Engine output, using the rules on [https://docs.tenetlabs.com/pii-engine/security/attestation](https://docs.tenetlabs.com/pii-engine/security/attestation.md). Read-only: report findings, don't change code unless I ask.

Find and report, with file and line:

1. Any check of `output_is_phi == False`, `not output_is_phi`, or a truthiness test that treats `None` as "not PHI". `None` means undetermined; only an explicit, separately established recall result may justify releasing output as de-identified.
2. Any review queue or gate that routes on `requires_review` (it is always true). Recommend routing on `residue_detected`.
3. Any code, comment, UI string or doc that calls /deidentify or /redact output "de-identified", "PHI-free", "anonymized" or "HIPAA compliant" as a guarantee. Suggest "Safe Harbor–aligned posture" wording.
4. Any path that sends de-identified text to a third party while also logging or storing the original text or the session\_id in plain form.
5. Any LIMITED\_DATA\_SET output shared without a Data Use Agreement check.
   Summarize as a table: location, rule, severity, suggested change.

## Links

* [Placeholders and sessions](https://docs.tenetlabs.com/pii-engine/concepts/placeholders-and-sessions.md)
* [Data flow](https://docs.tenetlabs.com/pii-engine/security/data-flow.md)
* [Shared responsibility](https://docs.tenetlabs.com/pii-engine/security/shared-responsibility.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.