bcbi / DeIdentification.jl

A Julia package for de-identifying CSV data sets
https://bcbi.github.io/DeIdentification.jl/latest/
MIT License
2 stars 1 forks source link

Add de-identifier for DOB and Age #45

Open ibacher opened 5 years ago

ibacher commented 5 years ago

Basically, we need to add a way to implement this requirement (HIPAA Privacy Rule §164.514(b)(2)(i)(C)):

All elements of dates (except year) for dates directly related to an individual, including birth date, admission date, discharge date, date of death; and all ages over 89 and all elements of dates (including year) indicative of such age, except that such ages and elements may be aggregated into a single category of age 90 or older;

We can already date-shift dates, but we need to ensure that this complies with the rules of people 90+.

DilumAluthge commented 5 years ago

Here’s one option:

  1. Add a keyword argument currentdatetime. The default value is today at the currrnt time, but the user can specify any date and time.
  2. Make a list of all of the patients that as of currentdatetime are greater than or equal to 90 years old.
  3. For each patient in this list, change their date of birth to exactly 90 years before currentdatetime

Basically lump all 90+ year olds as being exactly 90.

The reason to allow the user to specify currentdatetime is: suppose I download from the electronic health record on Friday. I don’t get around to running Deidentification until Monday. During the weekend some 89 year olds turn 90. But we want to calculate ages the way they were when we first downloaded the data set. So we specify Friday as the currentdatetime.

ibacher commented 5 years ago

That's definitely a good point.