ViewPosition dicom tag in the Instance-level query is ignored

The Orthanc logs show that the ViewPosition dicom tag specified in the tools/find or query/sample/modalities is ignored when searched at Instance level.

Could you please point to the documentation which specifies what all tags can be used for search within Orthanc at different levels (Instance/Study/Series/Patient)?

Thank you,
Rajshree

Could you check the value of your “StorageAccessOnFind” configuration option?
https://book.orthanc-server.com/users/configuration.html

// Performance setting to specify how Orthanc accesses the storage
// area during find operations (C-FIND, /tools/find API route and
// QIDO-RS in dicom-web). Three modes are available: (1) “Always”
// allows Orthanc to read the storage area as soon as it needs an
// information that is not present in its database (slowest mode),
// (2) “Never” prevents Orthanc from accessing the storage area, and
// makes it uses exclusively its database (fastest mode), and (3)
// “Answers” allows Orthanc to read the storage area to generate its
// answers, but not to filter the DICOM resources (balance between
// the two modes). By default, the mode is “Always”, which
// corresponds to the behavior of Orthanc <= 1.5.0.
“StorageAccessOnFind” : “Always”,

This option should be set to “Always” if you want to query the tags that are not indexed as “MainDicomTags” (which is the case of “ViewPosition”):
https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.7/OrthancFramework/Sources/DicomFormat/DicomMap.cpp#l48

If this does not solve your issue, please post a sample DICOM file together with a sample command-line call to the REST API of Orthanc:
https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example

Regards,
Sébsatien-

Hi Sébsatien,

The option StorageAccessOnFind is Always in orthanc.json file.

Here is the logs of orthanc docker container:
orthanc | W0209 11:52:28.808191 DicomControlUserConnection.cpp:170] Tag not allowed for this C-Find level, will be ignored: (0018,5101)
orthanc | W0209 11:52:28.814852 OrthancRestModalities.cpp:958] Driving C-Move SCU on remote modality pacs to target modality rhopacs
orthanc | W0209 11:52:28.865479 OrthancRestModalities.cpp:958] Driving C-Move SCU on remote modality pacs to target modality rhopacs
orthanc | W0209 11:52:28.875424 OrthancRestModalities.cpp:958] Driving C-Move SCU on remote modality pacs to target modality rhopacs

Hello,

You are visibly looking for the “Normalize” option of the “/modalities/{…}/query” URI, whose documentation can be found at:
https://api.orthanc-server.com/#tag/Networking/paths/~1modalities~1{id}~1query/post

Here is a fully working call that will let the “ViewPosition” tag in place (where “self” is the identifier of some DICOM modality):

$ curl http://localhost:8042/modalities/self/query -d ‘{“Level”: “Instance”, “Expand”: true, “Query”: {“StudyDescription”: “”, “Modality”: “”, “ViewPosition”: “”, “StudyDate”: “20170101-20170101”},“Normalize”:false}’

Sébastien-

That’s perfect!

Thank you Sebastien. Do we have a list of allowed tags which can be used for search? Like I was wondering if we can search based on PatientAge or Date of Birth? and give a range like we do in date dicom tag searches.

Regards,
Rajshree

To answer such questions, the best is to look at the source code:

https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.7/OrthancFramework/Sources/DicomNetworking/DicomControlUserConnection.cpp#l113
https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.7/OrthancFramework/Sources/DicomFormat/DicomTag.cpp#l186

Sébastien-

Thank you! That was very helpful.

Regards,
Rajshree