Slow Cfind- LUA & ExtraMainDicomTags optimisations

Goodmorning,

  1. can you please let us know which dicom tags are not saved in database, and if adding these as extramaindicomtags will help Cfind to be quicker with radiant? (see the Log with cfind request and which Tags Radiant is requesting and we might need to add to speed up cfinds)

2.can you suggest a LUA script which will strip out all tags in Cfind and keep
only PatientID, PatientName, Modalities,study dates to check if that helps speeding Cfinds? -that can also be used in parallel with extramaindicomtags if needed.

=====DICOM cfind with radiant=====
I0327 11:04:16.719336 main.cpp:239] Maximum 100 instances will be returned for C-FIND queries at the Instance level
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:399] (dicom) DICOM C-Find request at level: Study
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,0020) StudyDate = *** POTENTIAL PHI ***
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,0030) StudyTime =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,0050) AccessionNumber =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,0052) QueryRetrieveLevel = STUDY
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,0056) InstanceAvailability =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,0061) ModalitiesInStudy =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,0080) InstitutionName =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,0090) ReferringPhysicianName =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,1030) StudyDescription =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,1040) InstitutionalDepartmentName =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,1050) PerformingPhysicianName =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0008,1060) NameOfPhysiciansReadingStudy =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0010,0010) PatientName =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0010,0020) PatientID =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0010,0030) PatientBirthDate =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0010,0040) PatientSex =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0020,000d) StudyInstanceUID =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0020,0010) StudyID =
I0327 11:04:16.719336 OrthancFindRequestHandler.cpp:405] (dicom) (0020,1208) NumberOfStudyRelatedInstances =

Regarding question 1, you might want to reference this: https://book.orthanc-server.com/faq/main-dicom-tags.html

There is also a suggested list of ExtraMainDicomTag there. Please note the warning about that change applying only to new studies, unless you manually reconstruct studies or run the HouseKeeper. I would recommend using the Housekeeper if you anticipate future updates.

The update should make your C-FIND quicker and also better optimized for DicomWeb, but I think there are other settings in the config file that you might want to tweak or at least look at.

You might just want to examine how many of those above are not in the default list or the recommended Extratags list and then just add them. These maybe just glancing at it.

QueryRetrieveLevel
InstanceAvailability
InstitutionalDepartmentName
PerformingPhysicianName
NameOfPhysiciansReadingStudy
NumberOfStudyRelatedInstances

Regarding 2:

See: https://book.orthanc-server.com/users/lua.html?highlight=lua%20scripting#fixing-c-find-requests

or consider a Python script to do something similar: https://book.orthanc-server.com/plugins/python.html?highlight=python%20plugin#handling-dicom-scp-requests-new-in-3-2

Stephen D. Scotti, M.D.

thank you for your quick reply.
for (1), we should be adding all of following to
“Study”: [ ],in orthanc configuration?
including also all the patient dicom tags (as seen below/at the end)?
what we are trying to achieve is to search quick (as we do with dcm4chee - almost instantly).

(0008,0052) QueryRetrieveLevel = is probably a DIMSE thing. You can look up the others to see what level they belong to: Patient/Study/Series/Instance

e.g.
https://dicom.nema.org/medical/Dicom/2017e/output/chtml/part06/chapter_6.html
https://dicom.innolitics.com/ciods
https://www.dclunie.com/dicom-status/status.html

/sds

Hi Daniel,

Going back to your first question: check for W001 warning in Orthanc logs (https://book.orthanc-server.com/faq/main-dicom-tags.html#warnings).

Also check the logs below the C-Find to check the output of “fast filtering” and number of final responses.
Then, you’ll know if it’s worth trying to tune the C-Find responses.

Best regards,

Alain.