When searching for an existing study by Patient Name, ID, or Study Description, no results are found, and the following error is logged by Orthanc:
{“log”:“E0710 00:42:54.772681 HTTP-7 PluginsManager.cpp:154] PostgreSQL error: ERROR: unterminated quoted string at or near "‘\’) ) AS studies INNER JOIN Resources series ON series.parentId = studies.internalId GROUP BY studies.publicId ) AS studies_series INNER JOIN Resources instances ON instances.parentId = studies_series.series_internal_id GROUP BY studies_series.studies_public_id"\n”,“stream”:“stderr”,“attrs”:{“tag”:“orthanc”},“time”:“2024-07-10T00:42:54.772822905Z”}
{“log”:“LINE 1: …= 16 AND tagElement = 16 AND value LIKE $1 ESCAPE ‘\’) ) AS …\n”,“stream”:“stderr”,“attrs”:{“tag”:“orthanc”},“time”:“2024-07-10T00:42:54.772826208Z”}
{“log”:" ^\n",“stream”:“stderr”,“attrs”:{“tag”:“orthanc”},“time”:“2024-07-10T00:42:54.772828456Z”}
However, the search is successful when using Patient Birth Date or Study Date.
Steps to Reproduce:
Go to the search interface.
Enter a Patient Name, ID, or Study Description in the search field.
Execute the search.
Observe that no results are returned and the above error is logged.
Expected Behavior: Search results should be returned when querying by Patient Name, ID, or Study Description without any SQL errors.
Actual Behavior: No results are returned, and an SQL error is logged indicating an unterminated quoted string.
I noticed some variation from the minimal sample setup you provided, so there could be a field or flag that we have missed in our configuration. It should be noted that we see the same error when requesting studies via a DICOM Query Retrieve from a DICOM receiver.
If you are mapping locally built plugins into the container, I’m sure you understand that I’m not able to reproduce your issue (I won’t even try).
Please start from the working sample I have provided and modify it until it fails. If you are using custom plugins that have not been built for the Docker container, you should double check your code …