privacy
¶
Re-exports from hiperhealth.skills.privacy
for backward compatibility.
Modules:
Classes:
Functions:
Deidentifier
¶
Methods:
Source code in src/hiperhealth/skills/privacy/deidentifier.py
add_custom_recognizer
¶
add_custom_recognizer(
entity_name: str,
regex_pattern: str,
score: float = 0.85,
language: str = 'en',
) -> None
If a recognizer for the same entity_name already exists, this method replaces the old one to prevent duplicate definitions.
Args:
entity_name: The name for the new entity (e.g., "CUSTOM_ID"). regex_pattern: The regex pattern to detect the entity. score: The confidence score for the detection (0.0 to 1.0). language: The language for the recognizer registry. parameters: entity_name: type: str description: Value for entity_name. regex_pattern: type: str description: Value for regex_pattern. score: type: float description: Value for score. language: type: str description: Value for language.
Source code in src/hiperhealth/skills/privacy/deidentifier.py
analyze
¶
analyze(
text: str,
entities: Optional[list[str]] = None,
language: str = 'en',
) -> list[RecognizerResult]
Source code in src/hiperhealth/skills/privacy/deidentifier.py
deidentify
¶
Source code in src/hiperhealth/skills/privacy/deidentifier.py
deidentify_patient_record
¶
deidentify_patient_record(
record: dict[str, object],
deidentifier: Deidentifier,
keys_to_deidentify: frozenset[str] | None = None,
) -> dict[str, object]