I’m having some trouble understanding the behavior of dicom web functionality to return certain study level tags.
What I am trying to achieve:
I am using a setup of Orthanc and DICOM viewer (MedDream). MedDream uses DICOMWeb to retrieve certain study level metadata tags which are then displayed in the MedDream user interface.
I am sending a particular CR study as well as an asociated DICOM SR (same study instance uid) to orthanc. The DICOM SR contains some tags which I have configured to be used by MedDream to be retrieved via DICOMWeb and displayed.
However, I cannot achive this intended functionality yet:
Once I send the CR study and DICOM SR (as well as a few PR and OT DICOMs which are not relevant for this functionality) although I can see all of them in the Orthanc explorer but the http://localhost:8042/dicom-web/studies endpoint does not return the relevant tags from the DICOM SR (only from the CR image).
However I noticed that if I send the same images (CR and SR) to orthanc again with OVERWRITE_INSTANCES enabled, the http://localhost:8042/dicom-web/studies does return the relevent tags from the DICOM SR.
I am not yet able to figure out why does the dicom web endpoint does not return the study level tags from the DICOM SR and why does it change once I forward the studies twice.
If you are calling the /dicom-web/studies/…/metadata routes, it is using a cache that is updated only after the StableSeries has occured → this typically takes 60 seconds if you have not changed the StableAge configuration.
So I would first advise you to repeat your tests with adequate timing and check the logs in verbose mode to see when the cache is populated.
If that does not help, feel free to share the file and a complete test scenario for us to reproduce.
However if I upload the dicom_SR.dcm first and then the dicom_DX.dcm to orthanc, the Orthanc explorer displays the same study structure, however in this case the DICOMWeb endpoint http://localhost:8042/dicom-web/studies?limit=1000&includefield=0008103E IS able to succesfully return the 0008103E tag from the DICOM SR (value “Test_REPORT”). Everything else retains the same.
(btw in this case the 0008103E tag is series description, but the same happens regardless of which tags from the DICOM SR is selected).
For my purposes I need the DICOMWeb endpoint to return the study level tags return via DICOMWeb regardless of the sequence (the image always comes first, then the SR).
Not sure why it is different if DICOM SR gets uploaded first, maybe related to the database indexing in some way.
Let me know if you are able to reproduce this or would have some insights.