Closed CPBridge closed 2 years ago
Tagging @delton137
@CPBridge I ran into problems with this check, too.
Strict checks make sense for construction, but are problematic for parsing. However, we sometimes call constructors via from_dataset()
, which can also lead to problems.
I did update the tests, no?
Strict checks make sense for construction, but are problematic for parsing.
Right but this is sort of a grey zone on between where we are constructing based on the values found in another file, and there's no way for the code in that function to know whether it was user input or copied from somewhere else.
Oh i see it's failing in 3.10, hmm
Fixed the tests
A further reason why changing the error to a warning is that many anonymization programs (CTP, the old CCDS one, I think a few others) replace the names with strings created with a truncated hash of the original name.
I think I was probably a bit over zealous in raising an error when a malformed Person Name is passed. We are finding here that many DICOM files exist "in the wild" with incorrectly formatted patient names, unfortunately. This is now bringing down model inference pipelines when attempting to copy across the name and crashing everything when writing out results...
I suggest a more pragmatic compromise may be to raise a warning instead of an error, as implemented in this PR. @hackermd thoughts?