Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(upload-notes): add ability to tag philter spans, not redact them #297

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

mikix
Copy link
Contributor

@mikix mikix commented Feb 29, 2024

This commit deprecates --no-philter in favor of --philter=disable and adds --philter=label (and the default --philter=redact).

When --philter=label is requested, we send a prediction layer to Label Studio that highlights all the detected PHI spans for you.

This is helpful when doing manual de-identification, since philter can do some of the grunt work for you.

Example (synthea note, no PHI here):
image

Checklist

  • Consider if documentation (like in docs/) needs to be updated
  • Consider if tests should be added

parser.add_argument(
"--no-philter", action="store_false", dest="philter", default=True, help="Don’t run philter on notes"
"--no-philter", action="store_const", const=PHILTER_DISABLE, dest="philter", help=argparse.SUPPRESS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very kind of you, but i think you could make a breaking change now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, I like to give some amount of gracetime, even to ourselves and our own muscle memory. But I've added a note that the arg can be removed after May 2024, to help avoid it staying around forever.

This commit deprecates --no-philter in favor of --philter=disable
and adds --philter=label (and the default --philter=redact).

When --philter=label is requested, we send a prediction layer to Label
Studio that highlights all the detected PHI spans for you.

This is helpful when doing manual de-identification, since philter can
do some of the grunt work for you.
@mikix mikix force-pushed the mikix/philter-labels branch 2 times, most recently from 4ab9528 to 943cb3c Compare March 5, 2024 09:27
@mikix
Copy link
Contributor Author

mikix commented Mar 5, 2024

OK tests fixed after adjusting to a moto API change: 90d2d51

@mikix mikix merged commit e551495 into main Mar 5, 2024
3 checks passed
@mikix mikix deleted the mikix/philter-labels branch March 5, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants