privacy
¶
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
PrivacySkill
¶
Bases: BaseSkill
Methods:
-
check_requirements– -
execute– -
post– -
pre–
Source code in src/hiperhealth/skills/privacy/deidentifier.py
check_requirements
¶
check_requirements(
stage: str, ctx: PipelineContext
) -> list[Inquiry]
Override to return a list of Inquiry objects describing what additional data the skill needs. The default implementation returns an empty list (no extra data needed). Inquiries use three priority levels: - required: must have before this stage can run - supplementary: improves results, available now - deferred: only available after a future pipeline step parameters: stage: type: str ctx: type: PipelineContext returns: type: list[Inquiry]
Source code in src/hiperhealth/pipeline/skill.py
execute
¶
execute(
stage: str, ctx: PipelineContext
) -> PipelineContext
Source code in src/hiperhealth/skills/privacy/deidentifier.py
post
¶
post(stage: str, ctx: PipelineContext) -> PipelineContext
Source code in src/hiperhealth/pipeline/skill.py
pre
¶
pre(stage: str, ctx: PipelineContext) -> PipelineContext
Source code in src/hiperhealth/pipeline/skill.py
deidentify_patient_record
¶
deidentify_patient_record(
record: dict[str, object],
deidentifier: Deidentifier,
keys_to_deidentify: frozenset[str] | None = None,
) -> dict[str, object]