E2E UID and birthdate error handling #147
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A couple of small fixes to address problems that have arisen with various new E2E files I've received...
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.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!