De-identification

Clinical notes often contain the Protected Health Information (PHI). We provide two options for de-identification.

Usage:
    medtext-deid philter [options] -i FILE -o FILE
    medtext-deid bert [options] -i FILE -o FILE
    medtext-deid download

Options:
    -i FILE         Input file
    -o FILE         Output file
    --overwrite     Overwrite the existing file
    --repl CHAR     PHI replacement char [default: X]

philter

This module uses Philter to remove PHI from the reports.

# philter
from medtext_deid.models.deid_philter import BioCDeidPhilter
processor = BioCDeidPhilter(repl=argv['--repl'])

bert (robust-deid)

This module uses Robust DeID to remove PHI from the reports.

from medtext_deid.models.deid_robust_deid import BioCRobustDeid
processor = BioCRobustDeid(repl=argv['--repl'])