Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(optionally?) change subject.age to subject.dob (date of birth) #145

Closed
bendichter opened this issue Apr 18, 2018 · 7 comments · Fixed by NeurodataWithoutBorders/pynwb#767
Assignees
Labels
category: proposal proposed enhancements or new features priority: low alternative solution already working and/or relevant to only specific user(s)
Milestone

Comments

@bendichter
Copy link
Contributor

I see that the age of the animal is currently stored as subject.age. I'd like to request the option to alternatively store this information as subject.dob. The reason is that I'd like to have the subject object change minimally from session to session. As long as NWBFile.session_start_time is supplied and correct, you should be able to easily recover the age of the animal. I have found that most labs store age this way.

@bendichter bendichter added priority: low alternative solution already working and/or relevant to only specific user(s) category: proposal proposed enhancements or new features labels Apr 18, 2018
@bendichter bendichter changed the title request: (optionally?) change subject.age to subject.dob (date of birth) (optionally?) change subject.age to subject.dob (date of birth) Apr 23, 2018
@tjd2002
Copy link
Contributor

tjd2002 commented Apr 26, 2018

Agreed; we generally refer to animals by date of birth. I'd recommend that the field be called 'date_of_birth', for clarity

For Human subjects there might be privacy implications--DOB might be PII whereas 'age' is not (?)

@bendichter
Copy link
Contributor Author

HIPAA:

All elements of dates (except year) for dates that are directly related to an individual, including birth date, admission date, discharge date, death date, 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

For HIPAA, you can only include the year. It gets tricky when the subject is >89, though, because then you can't even report their birth year-- you have to report them as "over 89." We could create a simple utility called hipaa_dates_check which makes sure that if the subject is human the dates are all just years and the >89-rule is followed e.g.

if subject.species is human:
    for date in dates:
        if date is not just_year:
            raise Warning()
    if date_of_birth is year and (session_start_time - date_of_birth) > 89 years:
        raise Warning()

@mgrauer
Copy link

mgrauer commented May 11, 2018

It makes me nervous when I see HIPAA, and you are encoding it into the name hipaa_dates_check, which is suggestive that this somehow complies with HIPAA. I am no lawyer and don't even deal with HIPAA, just know enough to steer clear of it. If you do include this utility function with this name, can you include a comment with the link to the referenced document as the explanation, and also note that people should do their own due diligence for HIPAA compliance rather than relying on the software?

The license of NWB-schema already says that it is not warrantied to be fit for any purpose and makes no such claims, but I think adding this additional level of warning is showing proper consideration for users of the software.

@bendichter
Copy link
Contributor Author

bendichter commented May 11, 2018 via email

@bendichter
Copy link
Contributor Author

There are a few issues with the way dates are currently stored that would need to be addressed for NWB to be HIPAA-able. All exact dates are a HIPAA violation, including birth date, surgery date, session_start_time, etc. session_start_time can have year, hour, minute, second, but not day or month. Is there standard way of removing that information? maybe 2008-XX-XXT15:53:00+05:00? Then perhaps all other dates (date_of_birth, surgery_date, etc.) could optionally be added as datetime.timedelta objects which would be relative to the true (i.e. unmasked) session start time. Is there a standard way to convert time deltas to strings? A quick google led me to this post which might be good if there isn't anything more standard

@bendichter
Copy link
Contributor Author

but this is turning into another important conversation so I'm going to open up a new thread

@bendichter bendichter mentioned this issue May 11, 2018
@oruebel oruebel added this to the NWB 2.0 Full milestone May 18, 2018
@oruebel
Copy link
Contributor

oruebel commented Aug 24, 2018

@bendichter let me know in case I should change the milestone to 2.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: proposal proposed enhancements or new features priority: low alternative solution already working and/or relevant to only specific user(s)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants