Query patient images
Moderator: Moderator Team
Query patient images
Hi everyone,
I have been building a website lately in PHP. In the site i use a page where you can get images of a certaint patient. Well i have been playing around with findscu and its working. The only problem i am still stuck at is making a query.
The query needs to be like:
Send patient id (ex. 12345)
then i need to get his images/series, etc.
I have made a query like:
# query patient names and IDs
(0008,0052) CS [PATIENT] # QueryRetrieveLevel
(0010,0010) PN [] # PatientsName
(0010,0020) LO [12345] # PatientID
(0008,0060) CS [] #modality
(0008,1030) LO [] #study description
(0008,103e) LO [] #series description
(0008,0020) DA [] # study date
I am getting an answer, but only 1, while this patient has 3 series and around 400 images each.
Thank you in advance.
ps...YAY!!!! My first post
I have been building a website lately in PHP. In the site i use a page where you can get images of a certaint patient. Well i have been playing around with findscu and its working. The only problem i am still stuck at is making a query.
The query needs to be like:
Send patient id (ex. 12345)
then i need to get his images/series, etc.
I have made a query like:
# query patient names and IDs
(0008,0052) CS [PATIENT] # QueryRetrieveLevel
(0010,0010) PN [] # PatientsName
(0010,0020) LO [12345] # PatientID
(0008,0060) CS [] #modality
(0008,1030) LO [] #study description
(0008,103e) LO [] #series description
(0008,0020) DA [] # study date
I am getting an answer, but only 1, while this patient has 3 series and around 400 images each.
Thank you in advance.
ps...YAY!!!! My first post
-
- OFFIS DICOM Team
- Posts: 1493
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
If you have a patient ID and want to know a list of series or images, you have to use more than one query (unless the archive supports "relational query" which is an option that not all archives support). You first have to query a list of studies for the patient and then, for each study, query for a list of series within that study, and then, for each series, query for a list of images within that series within a study. This is how the hierarchical query model works.
ah yes,
like a while loop.
I was searching the the forum for this problem and i stumpled upon Thomas Wilkens post wich can be found at viewtopic.php?p=339#339
My quess is that it has to be in that same model. Unfortunatly i have been trying anything i could posibly imagine to get the results for the past 2 weeks, without succes.
Its actually a simpe query i need to send: patientID and then get Series and ImagesID.
Please help.
ps. Thanks for replying Mr. Eichelberg
like a while loop.
I was searching the the forum for this problem and i stumpled upon Thomas Wilkens post wich can be found at viewtopic.php?p=339#339
My quess is that it has to be in that same model. Unfortunatly i have been trying anything i could posibly imagine to get the results for the past 2 weeks, without succes.
Its actually a simpe query i need to send: patientID and then get Series and ImagesID.
Please help.
ps. Thanks for replying Mr. Eichelberg
-
- OFFIS DICOM Team
- Posts: 1493
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
The first query could simply look like this:
Let's assume that one of the results is a study with the StudyInstanceUID 1.2.3.4.5.6 - the next query, asking for the series within the study, would look like this:
Again, let's assume that one of the results is a series with the SeriesInstanceUID 8.7.6.5.4 - the next query, asking for the images within that series would looke like this:
Of course you might add further query keys for the information you are interested in, and in order to automate the whole process, you would need some kind of script or program that evaluates the query responses, extracts the UIDs and creates the next query based on the response. But the principle should be clear and you can do the whole thing manually once to try it out.
Code: Select all
(0008,0052) CS [STUDY] # QueryRetrieveLevel
(0010,0020) LO [12345] # PatientID
(0020,000D) UI [] # StudyInstanceUID
Code: Select all
(0008,0052) CS [SERIES] # QueryRetrieveLevel
(0010,0020) LO [12345] # PatientID
(0020,000D) UI [1.2.3.4.5.6] # StudyInstanceUID
(0020,000e) UI [] # SeriesInstanceUID
Code: Select all
(0008,0052) CS [IMAGE] # QueryRetrieveLevel
(0010,0020) LO [12345] # PatientID
(0020,000D) UI [1.2.3.4.5.6] # StudyInstanceUID
(0020,000e) UI [8.7.6.5.4] # SeriesInstanceUID
(0008,0018) UI [] # SOPInstanceUID
(0020,000D) UI [] # StudyInstanceUID
Hi, i have run into a problem on the second query.
My error:
C-Find RSP: MsgID: 1 [Status=Failed: UnableToProcess]
AffectedSOPClassUID: =FINDPatientStudyOnlyQueryRetrieveInformationModel
Data Set: Not Present
Releasing Association
Uhm ..help?
The problem is that i don't get any SeriesInstanceUID. I found out the when i run the QueryRetrieveLevel in PATIENT or STUDY, i get a response (1 at the moment). Both SeriesInstanceUID from PATIENT and STUDY QueryRetrieveLevel are the same.(0008,0052) CS [SERIES] # QueryRetrieveLevel
(0010,0020) LO [12345] # PatientID
(0020,000D) UI [1.2.3.4.5.6] # StudyInstanceUID
(0020,000e) UI [] # SeriesInstanceUID
My error:
C-Find RSP: MsgID: 1 [Status=Failed: UnableToProcess]
AffectedSOPClassUID: =FINDPatientStudyOnlyQueryRetrieveInformationModel
Data Set: Not Present
Releasing Association
Uhm ..help?
-
- Posts: 99
- Joined: Tue, 2005-07-12, 13:50
- Location: Erlangen, Germany
Referring to DICOM, Part 4
HTH
Markus
In other words: The "FINDPatientStudyOnlyQueryRetrieveInformationModel" does not support Series- or Instance-Level attributes in the query. I suggest you try to send the query in PatientRoot or StudyRoot information model.C.3.3 Patient/Study Only Query/Retrieve Information Model
The Patient/Study Only Query/Retrieve Information Model is identical to the Patient Root except
the series and composite object instance levels are not supported.
Note: Even though this model does not include the composite object instance level, composite object
instances may be retrieved at the patient and study level (i.e., retrieve all composite object
instances for a Patient or Study).
HTH
Markus
HI,
Can you post me an example? Actually much better would be the complete query. Sorry i am completely new to DICOM. I have been working here at the hospital for a month now (for school, called business experience) and i was assigned to do a project. My project was building a website where patients can ask their images. The website is done with PHP and MySQL and it is completely functional (getting image from patient is done with MySQL as a replacement for DICOM, for testing).
So now i need the real deal .
I already made a dicom class. But i need the query that retrieves all series and images by just sending the patiendID.
Such a simple question, but so hard to find the answer.
Thanks in advance
Can you post me an example? Actually much better would be the complete query. Sorry i am completely new to DICOM. I have been working here at the hospital for a month now (for school, called business experience) and i was assigned to do a project. My project was building a website where patients can ask their images. The website is done with PHP and MySQL and it is completely functional (getting image from patient is done with MySQL as a replacement for DICOM, for testing).
So now i need the real deal .
I already made a dicom class. But i need the query that retrieves all series and images by just sending the patiendID.
Such a simple question, but so hard to find the answer.
Thanks in advance
-
- Posts: 99
- Joined: Tue, 2005-07-12, 13:50
- Location: Erlangen, Germany
Hi,
as Marco stated above, you have to query down from the patient to the instance (image-) level. However, there is a good chance that your DICOM archive will accept and answer a query correctly that contains all the attributes in one dataset, e.g.
(0008,0052) CS [IMAGE] # QueryRetrieveLevel
(0010,0020) LO [12345] # PatientID
(0020,000D) UI [] # StudyInstanceUID
(0020,000e) UI [] # SeriesInstanceUID
(0008,0018) UI [] # SOPInstanceUID
Mind, that this does not conform to the DICOM standard!
But you have to pass the parameter "-P" or "-S" to the findscu or at least omit "-O"
HTH
Markus
as Marco stated above, you have to query down from the patient to the instance (image-) level. However, there is a good chance that your DICOM archive will accept and answer a query correctly that contains all the attributes in one dataset, e.g.
(0008,0052) CS [IMAGE] # QueryRetrieveLevel
(0010,0020) LO [12345] # PatientID
(0020,000D) UI [] # StudyInstanceUID
(0020,000e) UI [] # SeriesInstanceUID
(0008,0018) UI [] # SOPInstanceUID
Mind, that this does not conform to the DICOM standard!
But you have to pass the parameter "-P" or "-S" to the findscu or at least omit "-O"
HTH
Markus
Who is online
Users browsing this forum: Google [Bot] and 1 guest