Open
Conversation
0b8bbd6 to
3bc576a
Compare
3bc576a to
d548ba8
Compare
d548ba8 to
12dfe32
Compare
|
|
||
| ## De-identification | ||
|
|
||
| ViewDefinition columns can be annotated with de-identification methods to transform sensitive data during SQL generation. Supported methods include redact, cryptoHash, dateshift, encrypt, substitute, perturb, and custom PostgreSQL functions. |
| @@ -0,0 +1,341 @@ | |||
| # De-identification | |||
|
|
|||
| Aidbox supports per-column de-identification in ViewDefinitions via a FHIR extension. When a column has a de-identification extension, the SQL compiler wraps the column expression with a PostgreSQL function that transforms the value before it reaches the output. | |||
|
|
||
| Install the package via FHIR package management and use these ViewDefinitions directly, or copy and customize them. Every cryptographic key parameter in the pre-built VDs is blank (`""`) — you must set real keys before using them for actual de-identification. | ||
|
|
||
| ## Using the UI |
Collaborator
There was a problem hiding this comment.
screenshot would help here
aleksandrkislitsyn
requested changes
Apr 16, 2026
Contributor
There was a problem hiding this comment.
remove this summary.md file - obsolete
| @@ -8,6 +8,10 @@ description: Create flat SQL views from FHIR resources using ViewDefinitions for | |||
| **SQL on FHIR** engine is currently in **preview** | |||
Contributor
There was a problem hiding this comment.
lets remove this hint btw
|
|
||
| ### birthDateSafeHarbor | ||
|
|
||
| Intended **only for `Patient.birthDate`**. Behaves like `dateshift` but returns NULL when the birth date implies the patient is over 89 years old, per HIPAA Safe Harbor rule 45 CFR 164.514(b)(2)(i)(C). |
Contributor
There was a problem hiding this comment.
Can we add a link here?
I think this one: https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-E/section-164.514
|
|
||
| Applying this method to any other date column is semantically incorrect — the function computes `age(current_date, input)` and treats the input as a birth date. Use plain `dateshift` for non-birth-date fields. | ||
|
|
||
| Because the function depends on `current_date`, it is marked `STABLE` rather than `IMMUTABLE`. The age cutoff re-evaluates on every query. |
Contributor
There was a problem hiding this comment.
STABLE rather than IMMUTABLE
it might be a bit unclear to a reader at this point what does this mean - a link might be usefull, and also some short explanations
| | rangeType | code | no | `fixed` (absolute noise) or `proportional` (relative to value). Default: `fixed` | | ||
| | roundTo | integer | no | Decimal places to round to. 0 means integer. Default: 0 | | ||
|
|
||
| With `fixed` range type, noise is in the range ±span/2. With `proportional`, noise is ±(span × value)/2. Any other `rangeType` value raises a SQL error. |
Contributor
There was a problem hiding this comment.
±span/2 and ±(span × value)/2 don't look great
probably mark it with ``
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.