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

Request to de-identify more fields with highlevel.anonymize_edf() #131

Open
catvasily opened this issue Jun 19, 2021 · 4 comments
Open

Request to de-identify more fields with highlevel.anonymize_edf() #131

catvasily opened this issue Jun 19, 2021 · 4 comments

Comments

@catvasily
Copy link

Would it be possible to have more fields, which can be de-identified.
Now it is Subject name and BirthDate.
Could you please add Subject code, Admin code, Additional Info, and Technician to the list?
You never know what to expect - EEG technicians might use different fields occasionally - there are no strict guidelines.
At least, Subject Code, please.
Thank you.

@skjerns
Copy link
Collaborator

skjerns commented Jun 19, 2021

you can de-identify any field you like by just passing it to the function

to_remove = ['patientname', 'birthdate', 'admin_code']
new_values = ["xxx", 0, 'test']
anonymize_edf(edf_file, to_remove=to_remove, new_values=new_values, verify=False, verbose=False)

@catvasily
Copy link
Author

Thank you for letting me know.
I was confused with the help for this function - it specifies two fields.
Tested it for
to_remove=['patientname', 'patientcode', 'patient_additional', 'admincode', 'technician', 'recording_additional']
and it works fine.
Thanks!

@catvasily
Copy link
Author

Also, I would like to report one peculiarity. Not an issue, strictly speaking.
When I try to de-identify the field 'admincode', say, with a sting like '4761fdc1-3219-4e68-b5a1-00d93159ad39', highlevel.anonymize_edf() generates a new EDF without any error or warning, and returns True.
At the same time, EDFbrower cannot open this file.
Just wanted to let you know.

@skjerns
Copy link
Collaborator

skjerns commented Jun 20, 2021

What error message is EDFBrowser giving? Can you send a sample file?

The local patient information field (which combines a couple of fields like admincode, name, etc) can only be 80 characters in total (see EDF+ specs). It might be that you exceed this limit. I'm not sure if pyedflib gives a warning in this case, I need to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants