Welcome to DICOM-wonderland.
You are correct that you should very, very, very, very carefully run random requests in clinical PACS. I saw that commercial PACses send the entire (!) Database as a result of a query that he did not understand. Not a beautiful sight. This (and confidentiality) is one of the reasons why in many hospitals around the world, PACS administrators are very afraid to give direct access to PACS through DICOM.
In general, I would say that standardization will not help you. Therefore, you need to find something that works for you, and which does not make PACS work. There are no guarantees.
Just a list of observations from PACS requests in hospitals:
- Some of them are case sensitive when matching, some are not.
- Most support some kind of wild card. Usually this "*". but I also saw "%" (since it is a conditional SQL character, and the query is simply passed as an SQL string). I do not think that this is not so.
- The list you get may be limited to say the first 500 entries. Or 1000. Or a random number from 500 to 1000. Or the whole PACS. You just donβt know.
- DICOM and cancel do not play well. Canceling a request does not work well. Typically, PACS perceives this as an unsuccessful transfer and after a while will try again. And the retry queue is limited in size, so it can ignore new requests. Therefore, always allow the STORE-SCP server to start this queue.
- Sometimes requests take minutes, especially for retrieval. The next time he might have been removed (from the tape?) And will be quick for a while.
- A DICOM request can take a lot of resources from PACS, depending on the PACS. Don't be surprised if the PACS administrator appears, if you experiment too much.
- Supported queries are very different. Only basic queries are supported by everyone: a list of patients, a list of StudyID / study instanceid for patients, a list of series per study, receipt of a study or series. If you do not get a funky research department that uses Osirix, which does not support patient-level queries, only research-level questions.
So, what would I recommend if you want to work on any random PACS:
- Use an empty return key instead of '*'. This is the DICOM way to get information.
- Do not use '-cancel'. If you really need to cancel, just close the TCP connection (not supported in DCMTK)
- Use the query for PatientId, PatientName, Datedate, StudyDate to get a list of StudyIDs / StudyInstanceUids.
The simplest is the use of a fixed StudyID, assuming that it remains in PACS for quite some time. If not, consider limiting your request so as not to overload PACS (the sentence "TODAY" is that you matched this description).
Good luck
source share