118 -> std::string_view {
125 return "remove_or_empty";
131 return "replace_uid";
196 std::string algorithm =
"SHA256",
201 .hash_algorithm = std::move(algorithm),
302namespace hipaa_identifiers {
304 [[nodiscard]]
auto get_name_tags() -> std::vector<core::dicom_tag>;
310 [[nodiscard]]
auto get_date_tags() -> std::vector<core::dicom_tag>;
DICOM Tag representation (Group, Element pairs)
auto get_all_identifier_tags() -> std::vector< core::dicom_tag >
Get all HIPAA identifier tags.
auto get_name_tags() -> std::vector< core::dicom_tag >
Tags containing names.
auto get_unique_id_tags() -> std::vector< core::dicom_tag >
Tags containing unique identifiers.
auto get_date_tags() -> std::vector< core::dicom_tag >
Tags containing dates (except year)
auto get_communication_tags() -> std::vector< core::dicom_tag >
Tags containing communication identifiers.
auto get_geographic_tags() -> std::vector< core::dicom_tag >
Tags containing geographic identifiers.
constexpr auto to_string(anonymization_profile profile) noexcept -> std::string_view
Convert profile enum to string representation.
tag_action
Actions to perform on DICOM attributes during de-identification.
@ hash
Hash the value for research linkage.
@ remove
D - Remove the attribute entirely.
@ keep
K - Keep the attribute unchanged.
@ replace_uid
U - Replace UIDs with new values.
@ encrypt
Encrypt the value.
@ shift_date
Shift dates by a fixed offset.
@ remove_or_empty
X - Remove or empty based on presence.
@ replace
C - Clean (replace with dummy value)
@ empty
Z - Replace with zero-length value.
@ keep
Preserve all private tags (default for backward compatibility)
Report generated after anonymization.
auto total_modifications() const noexcept -> std::size_t
Get total number of modifications made.
std::size_t private_tags_removed
Number of private tags removed.
std::vector< std::string > errors
Any errors encountered (non-fatal)
std::size_t tags_removed
Number of tags removed.
std::size_t total_tags_processed
Total number of tags processed.
std::optional< std::chrono::days > date_offset
Date offset applied (if any)
auto is_successful() const noexcept -> bool
Check if anonymization completed without errors.
std::size_t tags_kept
Number of tags kept unchanged.
std::size_t values_hashed
Number of values hashed.
std::size_t tags_replaced
Number of tags replaced.
std::string profile_name
Profile used for anonymization.
std::size_t tags_emptied
Number of tags emptied.
std::vector< tag_action_record > action_records
Detailed action records (optional, for audit)
std::chrono::system_clock::time_point timestamp
Timestamp of anonymization.
std::vector< std::string > warnings
Any warnings generated during anonymization.
std::size_t dates_shifted
Number of dates shifted.
std::size_t uids_replaced
Number of UIDs replaced.
Configuration for a custom tag action.
bool use_salt
Whether to include salt in hash.
static auto make_remove() -> tag_action_config
Create a remove action config.
tag_action action
The action to perform.
static auto make_hash(std::string algorithm="SHA256", bool salt=true) -> tag_action_config
Create a hash action config.
static auto make_keep() -> tag_action_config
Create a keep action config.
static auto make_replace(std::string value) -> tag_action_config
Create a replace action config with a custom value.
std::string hash_algorithm
Hash algorithm (for hash action): "SHA256", "SHA512".
std::string replacement_value
Replacement value (for replace action)
static auto make_empty() -> tag_action_config
Create an empty action config.
Record of an action performed on a tag.
std::string error_message
Error message if action failed.
std::string new_value
New value (if applicable)
std::string original_value
Original value (if retained for reporting)
tag_action action
The action that was performed.
bool success
Whether the action was successful.
core::dicom_tag tag
The tag that was processed.