I’m writing a modality worklist plugin and everything is working great except the PregnancyStatus attribute. Which I wouldn’t bother with except my ultrasound machine sends this over as null when it’s requesting a modality worklist which alone blocks my mwl plugin from functioning. I have no way to prevent it from doing so. I assume this issue extends beyond MWL and impacts all C-FIND omitting (requesting) PregnancyStatus.
For example, if I run this query:
findscu -v -W -k 0008,0052=WORKLIST -k 0008,0060=US -k 0010,0010 -k 0010,21C0 127.0.0.1 4242
it will fail for reason:
E0919 18:52:05.167445          DICOM-2 OrthancException.cpp:62] Bad file format: While creating a DICOM instance, tag (0010,21c0) has out-of-range value: ""
However, no other -k attributes that I omit will cause this same issue and PregnancyStatus is coded properly in my output. For example, if I run this query (omitting the return of PregnancyStatus) it will succeed:
findscu -v -W \
  -k 0008,0052=WORKLIST \
  -k 0008,0060=US \
  -k 0008,0050 \
  -k 0008,0090 \
  -k 0010,0010 \
  -k 0010,0020 \
  -k 0010,0030 \
  -k 0010,0032 \
  -k 0010,0040 \
  -k 0010,1000 \
  -k 0010,1020 \
  -k 0010,1030 \
  -k 0010,2000 \
  -k 0010,2160 \
  -k 0010,21B0 \
  -k 0010,21D0 \
  -k 0010,4000 \
  -k 0020,000D \
  -k 0032,1032 \
  -k 0032,1033 \
  -k 0032,1060 \
  -k 0038,0300 \
  -k 0040,0001 \
  -k 0040,0003 \
  -k 0040,0004 \
  -k 0040,0005 \
  -k 0040,0006 \
  -k 0040,0007 \
  -k 0040,0008 \
  -k 0040,0009 \
  -k 0040,0010 \
  -k 0040,0011 \
  -k 0040,0012 \
  -k 0040,0020 \
  -k 0040,0400 \
  -k 0040,1001 \
  -k 0040,1010 \
  -k 0040,1400 \
  -k 0040,2400 \
  127.0.0.1 4242