extracting-pii-entities
maziyarpanahi/openmed
Use openmed.extract_pii to detect and retrieve specific types of Protected Health Information (PHI) or Personally Identifiable Information (PII) spans (names, dates, MRNs, etc.) from clinical text. Unlike deidentification, this function returns the original text and the detected spans, allowing users to audit, preview redactions, normalize labels, or route spans to a custom anonymizer without altering the source data. It is ideal for pre-processing and policy enforcement.