-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deid): drop valueString instead of passing it through
Previously, we would let Observation.valueString (and its component form) through, optionally masking it with philter if you passed --philter in. But it held PHI too often, and if we ever will use the field, it will likely be via ETL-side NLP. We don't need to keep the string intact into Athena. So now, we unconditionally drop Observation.valueString, replacing it with a data-absent-reason extension marker (so consumers know it _was_ present).
- Loading branch information
Showing
6 changed files
with
59 additions
and
58 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,21 +23,6 @@ def setUp(self): | |
{"Coding": {"display": "Patient 012-34-5678"}}, | ||
{"Coding": {"display": "Patient ***-**-****"}}, | ||
), | ||
( | ||
# philter catches the month for some reason, but correctly leaves the date numbers alone | ||
{"resourceType": "Observation", "valueString": "Born on december 12 2012"}, | ||
{"resourceType": "Observation", "valueString": "Born on ******** 12 2012"}, | ||
), | ||
( | ||
{ | ||
"resourceType": "Observation", | ||
"component": [{"valueString": "Contact at [email protected]"}], | ||
}, | ||
{ | ||
"resourceType": "Observation", | ||
"component": [{"valueString": "Contact at ***@***.***"}], | ||
}, | ||
), | ||
) | ||
@ddt.unpack | ||
def test_scrub_resource(self, resource, expected): | ||
|
This file contains 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