Make mass transfer discovery resilient to non-conformant StudyDate/StudyTime - #400
Make mass transfer discovery resilient to non-conformant StudyDate/StudyTime#400samuelvkwong wants to merge 1 commit into
Conversation
Some PACS return studies with non-conformant date/time values (e.g. StudyDate "20143822" or StudyTime "1113.672"). These raised ValueError during series discovery and failed the whole partition task, even though only a single study was affected. - Fall back to midnight when StudyTime cannot be parsed (the time is only cosmetic for folder naming). - Skip studies whose metadata still cannot be parsed (e.g. invalid StudyDate), instead of failing the task. Skipped studies are listed in the task log and the task finishes as WARNING so the data loss stays visible. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 59 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
1113.672)._discover_seriesraised a bareValueErrorfrom pydicom'sDA/TMparsing, which nothing caught, so the whole daily partition task failed (mass transfer job 2, tasks 8543/9805) and stayed failed on every retry.WARNING, so the omission stays visible._discover_study_series()so the skip is a singletry/exceptaround it.Test plan
adit/mass_transfer/tests/test_processor.py: malformed StudyTime is salvaged, malformed StudyDate skips only that study with WARNING, all-malformed partition warns instead of failingadit/mass_transfer/tests/test_processor.pygreen (102 passed), ruff + pyright clean🤖 Generated with Claude Code