-
Notifications
You must be signed in to change notification settings - Fork 127
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
fix code failure when dicom time fields are empty #755
Conversation
This scenario happens when anonymization empties the field (not removed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR.
I wonder if we could figure out some unittest.
Left some recommended changes to make code a little more generic/shorter and thus easier to read. If you do not see a gotcha with the proposed approach, please accept.
Note to myself:
Overall this is inline with the logic we had before -- if either of them is not defined, we do not return.
But when we are talking about anonymization we might then expect the case where date is null-ed out but time is left untouched. But since I do not think it makes sense to choose some random base for the case when only time is known -- we are ok.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #755 +/- ##
=======================================
Coverage 82.04% 82.04%
=======================================
Files 42 42
Lines 4205 4205
=======================================
Hits 3450 3450
Misses 755 755 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Yaroslav Halchenko <[email protected]>
Co-authored-by: Yaroslav Halchenko <[email protected]>
Co-authored-by: Yaroslav Halchenko <[email protected]>
Hi @yarikoptic , sorry for the delay. I have included your changes, but I am equally happy if you merge #756 and close this PR :-). |
🚀 Issue was released in |
Hello,
This pull request is meant to fix an error we are encountering when processing data with empty date/time fields due to anonymization. Please note the fields are not missing but contain an empty string.
I have adapted the code of
get_datetime_from_dcm
to handle this scenario the same way as if the date/time was missing.Please let me know if you need more details or changes to this pull request.
Thank you :).