Skip to contents

Scans and redacts small cell counts (e.g. N < 11 or N < 20) across exported consortium summary tables (Table 1, Table 2, risk factor tables) in compliance with HIPAA Safe Harbor, GDPR, and CMS de-identification cell suppression policies.

Usage

audit_cell_suppression(
  tables,
  min_cell_count = 11L,
  mask_value = NULL,
  count_cols = NULL,
  suppress_zero = FALSE,
  preserve_pct = FALSE,
  secondary_suppression = FALSE,
  return_audit = FALSE
)

consortium_privacy_audit(
  tables,
  min_cell_count = 11L,
  mask_value = NULL,
  count_cols = NULL,
  suppress_zero = FALSE,
  preserve_pct = FALSE,
  secondary_suppression = FALSE,
  return_audit = FALSE
)

Arguments

tables

Single data.frame or named list of data.frames to scan.

min_cell_count

Threshold below which patient counts are masked (default 11L).

mask_value

String replacement for suppressed counts (default paste0("<", min_cell_count)).

count_cols

Optional character vector of specific count columns to redact.

suppress_zero

Logical; whether to suppress zero counts (default FALSE).

preserve_pct

Logical; whether to preserve the percentage in formatted cells like "5 (2.3\\%)" (default FALSE).

secondary_suppression

Logical; whether to apply complementary cell suppression to prevent algebraic disclosure from marginal totals (default FALSE).

return_audit

Logical; whether to return the full privacy audit result object instead of the cleaned data frame when a single table is passed (default FALSE).

Value

An S3 object of class consortium_privacy_audit containing $tables (sanitized tables), $violations (data.frame of redacted cells), $violation_count, $primary_count, $secondary_count, and $summary.