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

E2E UID and birthdate error handling #147

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Conversation

sustrev
Copy link
Contributor

@sustrev sustrev commented Sep 9, 2024

A couple of small fixes to address problems that have arisen with various new E2E files I've received...

  1. Encountered an E2E file where a UID chunk was throwing a StreamError because the chunk size seemed to be incorrect (ran out of bytes to parse). I've wrapped this chunk in a try except so that it doesn't fail here.

  2. Encountered an E2E file where the birthdate was saved as YYYYMMDD (had been de-identified by the Heidelberg software user to be 19000101). Now I'm even more confused about how Heidelberg is storing this value, since all the other files I've seen are definitely not storing birthdate as YYYYMMDD. There might be a smarter way to toggle between birthdate forms, whether it's YYYMMDD or Julian or Windows dating or something completely different, but this at least is a simple solution to catch when the value would otherwise throw an error during julian_to_ymd()...

Thanks much, and let me know if you have any questions or suggestions!

Copy link
Owner

@marksgraham marksgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @sustrev, looks good to me!

@marksgraham marksgraham merged commit 1bc6422 into marksgraham:main Sep 10, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants