Can not get the PatientName,PatientId...

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
visDicare
Posts: 26
Joined: Tue, 2012-04-24, 02:26

Can not get the PatientName,PatientId...

#1 Post by visDicare »

Hi all,
I use the example:http://support.dcmtk.org/wiki/dcmtk/how ... cu-example to query information from the public DICOM server http://www.dicomserver.co.uk .
And I modify the example like below:

Code: Select all

	/* Assemble and send C-FIND request */ 
	OFList<QRResponse*> findResponses; 
	DcmDataset dataSet;  
	dataSet.putAndInsertOFStringArray(DCM_QueryRetrieveLevel, "SERIES"); 
	dataSet.putAndInsertOFStringArray(DCM_PatientID, patientId);
	dataSet.putAndInsertOFStringArray(DCM_PatientName, patientName);                
	dataSet.putAndInsertOFStringArray(DCM_PatientSex, "");                     
	dataSet.putAndInsertOFStringArray(DCM_PatientBirthDate, ""); 
	dataSet.putAndInsertOFStringArray(DCM_StudyID, "");
	dataSet.putAndInsertOFStringArray(DCM_StudyDate, this->ByDate);            
	dataSet.putAndInsertOFStringArray(DCM_Modality, this->ByModality); 
	dataSet.putAndInsertOFStringArray(DCM_StudyTime, this->ByTime); 
	dataSet.putAndInsertOFStringArray(DCM_SeriesNumber, "");
	dataSet.putAndInsertOFStringArray(DCM_SeriesInstanceUID, "");
I set the DCM_QueryRetrieveLevel to "SERIES", but the patient Id/Name/Sex/Bithdate/StudyId/StudyData are all none.
I read the Dicom standard Part-4 Annex C, and find the above attributes not belong to series level, I think it is the root cause

but I use the same code to access the local sever(DCM4CHEE), I can get all the information!

So Why?

Thanks!

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Can not get the PatientName,PatientId...

#2 Post by J. Riesmeier »

I read the Dicom standard Part-4 Annex C, and find the above attributes not belong to series level, I think it is the root cause
That's right.
but I use the same code to access the local sever(DCM4CHEE), I can get all the information!
This is something you should ask the author(s) of DCM4CHEE.

visDicare
Posts: 26
Joined: Tue, 2012-04-24, 02:26

Re: Can not get the PatientName,PatientId...

#3 Post by visDicare »

Thanks!
This is something you should ask the author(s) of DCM4CHEE.
You mean the DCM4CHEE does not match with the DICOM standard?

Oh, my god!

visDicare
Posts: 26
Joined: Tue, 2012-04-24, 02:26

Re: Can not get the PatientName,PatientId...

#4 Post by visDicare »

By the way,

If I set the DCM_QueryRetrieveLevel to "STUDY" and get the StudyInstanceUID, and then use it to query Series number, the run time will more than 40 times.
The code like below:

Code: Select all

   OFList<QRResponse*> findResponses; 
   DcmDataset dataSet;  
   dataSet.putAndInsertOFStringArray(DCM_QueryRetrieveLevel, "STUDY");
           
   scu.sendFINDRequest(presID, &dataSet, &findResponses);
   OFListIterator(QRResponse*) response = findResponses.begin();
   OFString uid = "";
	while (response != findResponses.end())
	{ 
		// be sure we are not in the last response which does not have a dataset 
		if((*response)->m_dataset != NULL) 
		{   
		     uid = FindAndGetOFStringArray(DCM_StudyInstanceUID, (*response)->m_dataset);
			
           newDataSet.putAndInsertOFStringArray(DCM_QueryRetrieveLevel, "SERIES");
	        newDataSet.putAndInsertOFStringArray(DCM_StudyInstanceUID, uid);
	        newDataSet.putAndInsertOFStringArray(DCM_SeriesNumber, "");
	        newDataSet.putAndInsertOFStringArray(DCM_SeriesInstanceUID, "");

	        scu.sendFINDRequest(presID, &newDataSet, &findResponses);  //here will take a lot of time
            ......

		} 
		response++;
	} 

Code: Select all

scu.sendFINDRequest(presID, &newDataSet, &findResponses);  //here will take a lot of time

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

Re: Can not get the PatientName,PatientId...

#5 Post by Xiao »

If you want to understand the relationship about query root and query level, you can see "testFindRequestList function" in dcmtk-3.6.0/dcmqrdb/libsrc/dcmqrdbi.cc

visDicare
Posts: 26
Joined: Tue, 2012-04-24, 02:26

Re: Can not get the PatientName,PatientId...

#6 Post by visDicare »

Thank you very much!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest