Issue90

Title C-Find shall match missing tags to null/empty string
Priority bug Status resolved
Superseder Nosy List admin
Assigned To
Keywords Orthanc Core

Created on 2018-05-02.10:10:43 by admin, last changed by admin.

Files
File name Uploaded Type Edit Remove
1716449192-Capture.PNG admin, 2020-06-29.15:22:55 image/png
CR000000.dcm admin, 2020-06-29.15:18:02 application/dicom
Messages
msg404 (view) Author: admin Date: 2018-05-02.10:10:43
[BitBucket user: Alain Mazy]
[BitBucket date: 2018-05-02.08:10:43]

this bug was previously part of [Issue 57](bug 57)

# Steps to reproduce #

- upload an instance from the ORTHO patient (attached),
- perform the following tools/find request:

```
#!python
curl 'http://localhost:8042/tools/find' --data-binary '{"Level":"Patient","CaseSensitive":false,"Query":{"AccessionNumber":"*","PatientBirthDate":"*","PatientID":"*","PatientName":"*O*","PatientSex":"*","StudyDate":"*","StudyDescription":"*"},"Limit":10,"Since":0}'

```
- the search returns no result because `PatientSex` is missing from the `ORTHO` patient

# additional info #
The spec is not clear about that: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.2.2.2.html We should also check how other tools behave in this case.
msg405 (view) Author: admin Date: 2020-06-29.15:18:02
[Bugzilla user: s.jodogne@gmail.com]
[Bugzilla date: 2020-06-29T13:18:02+00:00]

Created attachment 66
CR000000.dcm
msg406 (view) Author: admin Date: 2018-12-10.18:18:40
[BitBucket user: Alain Mazy]
[BitBucket date: 2018-12-10.17:18:40]

Note that this also affects the new Orthanc Explorer interface and therefore, some studies might be inaccessible through the web interface.
In this case, I have 3 patients whose name is "MAZY^ALAIN".  Two of them have incomplete tags.  Only one is found in the lookup interface.

![Capture.PNG](1716449192-Capture.PNG)
msg407 (view) Author: admin Date: 2020-06-29.15:22:55
[Bugzilla user: s.jodogne@gmail.com]
[Bugzilla date: 2020-06-29T13:22:55+00:00]

Created attachment 100
1716449192-Capture.PNG
msg408 (view) Author: admin Date: 2018-12-11.13:26:17
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2018-12-11.12:26:17]

"PatientSex" is a mandatory type 2 DICOM tag, as can be seen using dicom3tools:

```text
$ dciodvfy /tmp/CR000000.dcm 2>&1 | grep Error
Error - Missing attribute Type 2 Required Element=<PatientSex> Module=<Patient>
Error - Missing attribute Type 1C Conditional Element=<DeidentificationMethod> Module=<Patient>
Error - Missing attribute Type 1C Conditional Element=<DeidentificationMethodCodeSequence> Module=<Patient>
Error - Missing attribute Type 2 Required Element=<ReferringPhysicianName> Module=<GeneralStudy>
Error - Missing attribute Type 2 Required Element=<StudyID> Module=<GeneralStudy>
Error - Missing attribute Type 2 Required Element=<AccessionNumber> Module=<GeneralStudy>
Error - Attribute present when condition unsatisfied (which may not be present otherwise) Type 2C Conditional Element=<Laterality> Module=<GeneralSeries>
```

I guess the images from the first comment are invalid as well
msg409 (view) Author: admin Date: 2018-12-17.11:20:34
[BitBucket user: Alain Mazy]
[BitBucket date: 2018-12-17.10:20:34]

images from the first comment where linked to a UI problem that has been solved in https://hg.orthanc-server.com/orthanc/changeset/c9c2faf76bec1b3573d389a744ddae241ea2e037
msg410 (view) Author: admin Date: 2019-01-24.18:25:17
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2019-01-24.17:25:17]

Fixed by changelist: https://hg.orthanc-server.com/orthanc/changeset/cf91b6f222784a9664961569f76ace9d47d52231
History
Date User Action Args
2026-07-29 15:51:22admincreate