cobra_db.deid

Module Contents

Classes

Deider

Attributes

base_recipe_path

mr_recipe_path

deid_logging_levels

cobra_db.deid.base_recipe_path
cobra_db.deid.mr_recipe_path
cobra_db.deid.deid_logging_levels
class cobra_db.deid.Deider(hasher_secret_salt: str, recipe_path: Union[str, List] = None, logging_level: str = 'ERROR')[source]
pseudonymize(dataset: pydicom.Dataset) pydicom.Dataset[source]

Pseudonymize a single dicom dataset

Parameters:

dataset – dataset that will be pseudonymized

Returns:

pseudonymized dataset

static _remove_day(item, value, field, dicom)[source]

Removes the day from a DT field in the deid framework

static _replace_name(item, value, field, dicom)[source]
static _round_to_nearest(value, interval)[source]

Rounds value to closest multiple of interval

static _round_AS_to_nearest_5y(item, value, field, dicom)[source]

Rounds age(AS) field to 5 year intervals in the deid framework

static _round_DS_to_nearest_5(item, value, field, dicom)[source]

Rounds age(AS) field to 5 year intervals in the deid framework

static _round_DS_to_nearest_0_05(item, value, field, dicom) str[source]

Rounds field.element.value to increments of 0.05

_deid_hash_func(item, value, field, dicom) str[source]

Performs self.hash to field.element.value