As I'm trying to develop a kind of DicomServer: will it be enough to include just the identifiers the service user asked for? I've been reading the DICOM Message Exchange PDF Documment and don't see anything related to that.
The QueryRetrieveLevel is required in each well-formed request and, therefore, also in each well-formed response message. SpecificCharacterSet may be contained in any request or response and explains in which character set attributes such as PatientsName are encoded. This is only needed when non-ASCII characters are transmitted. RetrieveAETitle is also required unless StorageMediaFileSetID and StorageMediaFileSetUID are returned. See DICOM part 4, C.4.1.1.3.2.
In this example, I've used eFilm to ask DCMQRSCP
for any DICOM with UserID: brain,
C-FIND-RQ:
# Dicom-Data-Set
# Used TransferSyntax: LittleEndianImplicit
(0008,0000) UL 86 # 4, 1 IdentifyingGroupLength
(0008,0020) DA (no value available) # 0, 0 StudyDate
(0008,0030) TM (no value available) # 0, 0 StudyTime
(0008,0050) SH (no value available) # 0, 0 AccessionNumber
(0008,0052) CS [STUDY] # 6, 1 QueryRetrieveLevel
(0008,0056) CS (no value available) # 0, 0 InstanceAvailability
(0008,0061) CS (no value available) # 0, 0 ModalitiesInStudy
(0008,0080) LO (no value available) # 0, 0 InstitutionName
(0008,0090) PN (no value available) # 0, 0 ReferringPhysiciansName
(0008,1030) LO (no value available) # 0, 0 StudyDescription
(0008,1040) LO (no value available) # 0, 0 InstitutionalDepartmentName
(0010,0000) UL 38 # 4, 1 PatientGroupLength
(0010,0010) PN (no value available) # 0, 0 PatientsName
(0010,0020) LO [brain*] # 6, 1 PatientID
(0010,0030) DA (no value available) # 0, 0 PatientsBirthDate
(0010,0040) CS (no value available) # 0, 0 PatientsSex
(0020,0000) UL 16 # 4, 1 ImageGroupLength
(0020,000d) UI (no value available) # 0, 0 StudyInstanceUID
(0020,0010) SH (no value available) # 0, 0 StudyID
C-FIND-RSP:
# Dicom-Data-Set
# Used TransferSyntax: UnknownTransferSyntax
(0008,0020) DA [20000229] # 8, 1 StudyDate
(0008,0030) TM [130156.00] # 10, 1 StudyTime
(0008,0050) SH (no value available) # 0, 0 AccessionNumber
(0008,0052) CS [STUDY] # 6, 1 QueryRetrieveLevel
(0008,0054) AE [TEDIAL] # 6, 1 RetrieveAETitle
(0008,0090) PN (no value available) # 0, 0 ReferringPhysiciansName
(0008,1030) LO [brain] # 6, 1 StudyDescription
(0010,0010) PN [brain] # 6, 1 PatientsName
(0010,0020) LO [brain] # 6, 1 PatientID
(0010,0030) DA [19110101] # 8, 1 PatientsBirthDate
(0010,0040) CS [M] # 2, 1 PatientsSex
(0020,000d) UI [1.3.46.670589.11.30.6.106049410282775290] # 40, 1 StudyInstanceUID
(0020,0010) SH [282775290] # 10, 1 StudyID
Why is the server including IDs with no value into the response?
And what about this fields meaning on the request?
(0008,0000) UL 86 # 4, 1
(0010,0000) UL 38 # 4, 1 PatientGroupLength
(0020,0000) UL 16 # 4, 1 ImageGroupLength
I didn't see these fields when using DCMDUMP..
What do they mean when appearing on a request?
Why is the server including IDs with no value into the response?
Because for the given study obviously the accession number and referring physicians name are not known. Since these attributes are type 2, they are returned empty by the SCP.
And what about this fields meaning on the request?
They mean nothing. Group length elements are a left-over from ACR/NEMA 2 and are just an encoding option. They are ignored by most readers.