FINDSCU INFORMATION MODELS
Moderator: Moderator Team
FINDSCU INFORMATION MODELS
I am sucessfully able to query a worklist using the modality worklist information model (-W). I am only able to retrieve information pertaining to patient demographic information but I can't retrieve study specific information.
When I try to use the study "root information model" (-S), I always get the message: "findscu: No Acceptable Presentation Contexts". What does this mean?
When I try to use the study "root information model" (-S), I always get the message: "findscu: No Acceptable Presentation Contexts". What does this mean?
Annex K of Part 4 of the DICOM standard has what you need. You can find it at http://medical.nema.org/dicom/2004.html
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
In the wlmscpfs.man, for the matching and returning keys, what does the indented ">" mean? Is there a way to use findscu to return all possible keys (wildcard)?
I am trying to get the study description based on the accession number. I am not using the worklist scp provided. I am using another system that I do not know the keys for. I assume they are closely related. When I try to query for the study description with accession number being defined, I do not recieve a value for the study description (does not show up on the list of returned keys). What am I doing wrong?
I am trying to get the study description based on the accession number. I am not using the worklist scp provided. I am using another system that I do not know the keys for. I assume they are closely related. When I try to query for the study description with accession number being defined, I do not recieve a value for the study description (does not show up on the list of returned keys). What am I doing wrong?
-
- DCMTK Developer
- Posts: 117
- Joined: Tue, 2004-11-02, 17:21
- Location: Oldenburg, Germany
- Contact:
In wlmscpfs.man you can see that the wlmscpfs application supports the following attributes as matching keys:
The indented ">" means that this particular attribute is part of the sequence attribute that is mentioned above. I.e. the attributes Modality, ScheduledStationAETitle, ScheduledProcedureStepStartDate, ScheduledProcedureStepStartTime and ScheduledPerformingPhysiciansName are part of the sequence attribute ScheduledProcedureStepSequence.
Because you are unfamiliar with the ">" character, I assume that you dont know what a sequence attribute is. Here's a short explanation:
Good luck!
Code: Select all
(0008,0050) AccessionNumber
(0008,0090) ReferringPhysiciansName
(0010,0010) PatientsName
(0010,0020) PatientID
(0010,0040) PatientsSex
(0032,1032) RequestingPhysician
(0038,0010) AdmissionID
(0040,0100) ScheduledProcedureStepSequence
(0008,0060) > Modality
(0040,0001) > ScheduledStationAETitle
(0040,0002) > ScheduledProcedureStepStartDate
(0040,0003) > ScheduledProcedureStepStartTime
(0040,0006) > ScheduledPerformingPhysiciansName
(0040,1001) RequestedProcedureID
(0040,1003) RequestedProcedurePriority
Because you are unfamiliar with the ">" character, I assume that you dont know what a sequence attribute is. Here's a short explanation:
- A special case among the DICOM data types is the sequence („Sequence of Items“, SQ), which can be used to create hierarchical data structures
- Attribute value is an order list of so-called „Items“
- An item is a frame structure containing a complete DICOM data set
Therefore, the value of a sequence is a list of DICOM data sets which again may contain sequences, and so on. - Most of the time, all items of a sequence have the same structure (analogy: an array of structs in C/C++)
- There are a few sequences, though, where each item may have a different structure.
Code: Select all
(0008,0050) SH [Enter your accession number here] # AccessionNumber
(0040,0100) SQ (Sequence explicit length #=1) # ScheduledProcedureStepSequence
(fffe,e000) na (Item with explicit length #=5) # Item
(0008,0060) CS [] # Modality
(0040,0001) AE [] # ScheduledStationAETitle
(0040,0002) DA [] # ScheduledProcedureStepStartDate
(0040,0003) TM [] # ScheduledProcedureStepStartTime
(0040,0006) PN [] # ScheduledPerformingPhysiciansName
(fffe,e0dd) na (SequenceDelimitationItem for re-encoding)
(fffe,e0dd) na (SequenceDelimitationItem for re-encoding)
I tried to take that query, filled in the accession numberm and run it through dump2dcm. I recieved the folowing message:
I am actually wanting to do all command line queries. I am able to get the Study Description using matching key 0032,1060 only if I specify a StudyUID key 0020,000d.
The process I am doing now is listing the StudyUID based on PatientID. Choosing on of the StudyUID and getting a Study Description from it. I still can not figure out how to get the AETitle, StudyDate/StudyTime.
I understand the hierarchy of the sequences.
This appears to work find except I am using RequestedProcedureDescription (matching key 0032,1060) rather than ScheduledProcedureStepDescription (0040,0007). I don't think I understand the difference between these two matching keys.
So my question is: On a command line query, how would I query all the accession numbers, patientIDs and study descriptions based on a AETitle and a date? I hope this example will clear up my misunderstandings!
Code: Select all
[root@server bin]# ./dump2dcm query query.dcm
dump2dcm: query: Error in creating Element: Invalid Tag (line 9)
dump2dcm: query: Error in creating Element: Invalid Tag (line 10)
dump2dcm: query: Block Error in dataset
3 Errors found in query
The process I am doing now is listing the StudyUID based on PatientID. Choosing on of the StudyUID and getting a Study Description from it. I still can not figure out how to get the AETitle, StudyDate/StudyTime.
I understand the hierarchy of the sequences.
This appears to work find except I am using RequestedProcedureDescription (matching key 0032,1060) rather than ScheduledProcedureStepDescription (0040,0007). I don't think I understand the difference between these two matching keys.
Code: Select all
[root@server lib]# /usr/local/dicom/bin/findscu -v -k 0008,0052="STUDY" -k 0010,0020="########" -k 0020,000d="##.##.##.##.##.##" -k 0032,1060 [IP] [PORT]
Requesting Association
Association Accepted (Max Send PDV: 99988)
Find SCU RQ: MsgID 1
REQUEST:
# Dicom-Data-Set
# Used TransferSyntax: UnknownTransferSyntax
(0008,0052) CS [STUDY] # 6, 1 QueryRetrieveLevel
(0010,0020) LO [########] # 10, 1 PatientID
(0020,000d) UI [##.##.##.##.##.##] # 52, 1 StudyInstanceUID
(0032,1060) LO (no value available) # 0, 0 RequestedProcedureDescription
--------
RESPONSE: 1 (Pending)
# Dicom-Data-Set
# Used TransferSyntax: LittleEndianImplicit
(0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
(0010,0020) LO [########] # 10, 1 PatientID
(0020,000d) UI [##.##.##.##.##.##] # 52, 1 StudyInstanceUID
(0032,1060) LO [CHEST 1V] # 8, 1 RequestedProcedureDescription
--------
C-Find RSP: MsgID: 1 [Status=Success]
AffectedSOPClassUID: =FINDModalityWorklistInformationModel
Data Set: Not Present
Releasing Association
-
- DCMTK Developer
- Posts: 117
- Joined: Tue, 2004-11-02, 17:21
- Location: Oldenburg, Germany
- Contact:
I am sorry, I made a slight mistake in my example. The following query file should be correct:
Save this query as a file, run it through dump2dcm and use it with findscu like this:
Unfortunately, it is not possible to specify this query on the command line (without a file query.dcm) because sequence attributes are used in this particular query and (quotation from file dcmnet/docs/findscu.man:)
From the example command line you gave, the following things are obvious: you have not understood the difference between matching key attributes and return key attributes and you mix up the DICOM query/retrieve service and the DICOM worklist management service.
Difference between matching key attributes and return key attributes: Matching key attributes are attributes that have a value assigned to them in a query; these attributes decide which instances from the database will be returned. In my example from above, accession number is a matching key attribute, because I am trying to query records from the database based on their accession number. Return key attributes are attributes that do NOT have a value assigned to them in a query; these are the attributes whose values shall be returned in C-Find response messages; in my example from above, all attributes except for accession number are return key attributes (I am interested in all the values for these attributes, I want to retrieve these values from the database).
Difference between worklist management service and query/retrieve service: There is a big difference! The main difference is that Q/R has a hierarchical query structure (thats why you have to specify a query retrieve level) but worklist management has not. That is the reason why with worklist management, you dont have to pass the query retrieve level in your query! Please: no -k 0008,0052="STUDY" in your query when you are doing worklist management. Query retrieve level is for the Q/R service only!!
Read part 4 annex C of the DICOM standard thoroughly in order to get to know all differences between the worklist management service and the query/retrieve service.
And regarding your question about the difference between the two attributes RequestedProcedureDescription and ScheduledProcedureStepDescription: The latter is part of the ScheduledProcedureStepSequence, the former is not. If you want to query ScheduledProcedureStepDescription, you need to include in a ScheduledProcedureStepSequence item.
Code: Select all
(0008,0050) SH [enter your accession number here] # 6, 1 AccessionNumber
(0010,0010) PN [] # 6, 1 PatientName
(0010,0020) LO [] # 6, 1 PatientID
(0010,0030) DA [] # 8, 1 PatientBirthDate
(0010,0040) CS [] # 2, 1 PatientSex
(0032,1060) LO [] # 8, 1 RequestedProcedureDescription
(0040,0100) SQ # 250, 1 ScheduledProcedureStepSequence
(fffe,e000) na # 242, 1 Item
(0008,0060) CS [] # 2, 1 Modality
(0040,0001) AE [] # 8, 2 ScheduledStationAETitle
(0040,0002) DA [] # 8, 1 ScheduledProcedureStepStartDate
(0040,0003) TM [] # 6, 1 ScheduledProcedureStepStartTime
(0040,0006) PN [] # 8, 1 ScheduledPerformingPhysiciansName
(0040,0007) LO [] # 8, 1 ScheduledProcedureStepDescription
(0040,0009) SH [] # 8, 1 ScheduledProcedureStepID
(0040,0010) SH [] # 6, 2 ScheduledStationName
(0040,0011) SH [] # 4, 1 ScheduledProcedureStepLocation
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 1 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-enc.) # 0, 1 SequenceDelimitationItem
(0040,1001) SH [] # 6, 1 RequestedProcedureID
(0040,1003) SH [] # 4, 1 RequestedProcedurePriority
Code: Select all
findscu -v [IP] [PORT] query.dcm
Code: Select all
It is not possible to replace or insert attributes within sequences using the -k option.
Difference between matching key attributes and return key attributes: Matching key attributes are attributes that have a value assigned to them in a query; these attributes decide which instances from the database will be returned. In my example from above, accession number is a matching key attribute, because I am trying to query records from the database based on their accession number. Return key attributes are attributes that do NOT have a value assigned to them in a query; these are the attributes whose values shall be returned in C-Find response messages; in my example from above, all attributes except for accession number are return key attributes (I am interested in all the values for these attributes, I want to retrieve these values from the database).
Difference between worklist management service and query/retrieve service: There is a big difference! The main difference is that Q/R has a hierarchical query structure (thats why you have to specify a query retrieve level) but worklist management has not. That is the reason why with worklist management, you dont have to pass the query retrieve level in your query! Please: no -k 0008,0052="STUDY" in your query when you are doing worklist management. Query retrieve level is for the Q/R service only!!
Read part 4 annex C of the DICOM standard thoroughly in order to get to know all differences between the worklist management service and the query/retrieve service.
And regarding your question about the difference between the two attributes RequestedProcedureDescription and ScheduledProcedureStepDescription: The latter is part of the ScheduledProcedureStepSequence, the former is not. If you want to query ScheduledProcedureStepDescription, you need to include in a ScheduledProcedureStepSequence item.
Its all coming together now. I didn't realize you could not use sequence attributes on a command line. I assumed that since I didn't want to insert or replace, that I could use command line. Still don't understand how I am inserting or replacing since I am just trying to do a query. No matter how much I read the standard, its always a sentance I overlook.
On the last query: How do you know the "Two letter indentity"? For an example, "SH" or "PN" or "LO". When I look at the wlmscpfs man file, it only specifies the matching key.
Also with the last query: What is the two numbers specified in your comments? For an example "6, 1" in the AccessionNumber comment?
I think this finalizes my questions. Hopefully this topic is helpful to other viewers!
On the last query: How do you know the "Two letter indentity"? For an example, "SH" or "PN" or "LO". When I look at the wlmscpfs man file, it only specifies the matching key.
Also with the last query: What is the two numbers specified in your comments? For an example "6, 1" in the AccessionNumber comment?
I think this finalizes my questions. Hopefully this topic is helpful to other viewers!
-
- DCMTK Developer
- Posts: 117
- Joined: Tue, 2004-11-02, 17:21
- Location: Oldenburg, Germany
- Contact:
In this context (quotation from file dcmnet/docs/findscu.man:)
replace or insert means that if you are using a query file and the -k option to specify attributes in your query, the attributes that are passed on the command line (through the -k option) will replace attributes with the same group/element number in the query file or they will be inserted if there is no attribute with the same group/element number in the query file. Unfortunately, this does not work with attributes within sequences.
The "two letter identity" (= an attributes value representation (VR) (i.e. its datatype)) can be identified in part 6 (data dictionary) of the DICOM standard, and only there. You wont even find an attributes VR in part 4 where worklist management is explained in detail.
"6, 1" in the Accession Number comment is (as you have correctly said) part of the comment and does therefore not have any importance with regard to the query. Generelly, these numbers are shown when you dump a DICOM file with dcmdump, and thats where they come from. "6, 1" means that the value in this attribute is 6 bytes long and that this attribute has a value multiplicity (VM) of 1.
Code: Select all
It is not possible to replace or insert attributes within sequences using the -k option.
The "two letter identity" (= an attributes value representation (VR) (i.e. its datatype)) can be identified in part 6 (data dictionary) of the DICOM standard, and only there. You wont even find an attributes VR in part 4 where worklist management is explained in detail.
"6, 1" in the Accession Number comment is (as you have correctly said) part of the comment and does therefore not have any importance with regard to the query. Generelly, these numbers are shown when you dump a DICOM file with dcmdump, and thats where they come from. "6, 1" means that the value in this attribute is 6 bytes long and that this attribute has a value multiplicity (VM) of 1.
-
- Posts: 19
- Joined: Wed, 2005-02-09, 08:44
Semantics of dicom sequence
Hi
I am using dump2dcm utility
Can any one explain me how sequences can be added in a query file
For example consider this sequence:
(0040,0100) SQ # 250, 1 ScheduledProcedureStepSequence
(fffe,e000) na
<< items in sequence>>
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 1 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-enc.) # 0, 1 SequenceDelimitationItem
what is the meaning of (fffe,e000),item delimitation and sequence delimitation?
how can i add more items to this sequence?
Also How many items i can add to this particular sequence?
Also should i add code value and coding scheme designer tags for each sequences? if so what are its values for this sequence?
I am using dump2dcm utility
Can any one explain me how sequences can be added in a query file
For example consider this sequence:
(0040,0100) SQ # 250, 1 ScheduledProcedureStepSequence
(fffe,e000) na
<< items in sequence>>
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 1 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-enc.) # 0, 1 SequenceDelimitationItem
what is the meaning of (fffe,e000),item delimitation and sequence delimitation?
how can i add more items to this sequence?
Also How many items i can add to this particular sequence?
Also should i add code value and coding scheme designer tags for each sequences? if so what are its values for this sequence?
-
- DCMTK Developer
- Posts: 117
- Joined: Tue, 2004-11-02, 17:21
- Location: Oldenburg, Germany
- Contact:
Just look at the examples above, it is not that complicated.Can any one explain me how sequences can be added in a query file
The item delimitation item tells dump2dcm where the end of a corresponding item is. Attributes which follow the item delimitation item do not belong to the above specified item.what is the meaning of (fffe,e000),item delimitation and sequence delimitation?
The sequence delimitation item tells dump2dcm where the end of a corresponding sequence is. Attributes which follow the sequence delimitation item do not belong to the above specified sequence.
See this example:how can i add more items to this sequence?
Code: Select all
(0010,0010) PN [Wilkens^Thomas] # 6, 1 PatientName
(0010,0020) LO [12345] # 6, 1 PatientID
(0010,0030) DA [19730526] # 8, 1 PatientBirthDate
(0010,0040) CS [M] # 2, 1 PatientSex
(0040,0100) SQ # 250, 1 ScheduledProcedureStepSequence
(fffe,e000) na # 242, 1 Item
(0008,0060) CS [XA] # 2, 1 Modality
(0040,0001) AE [XA1] # 8, 2 ScheduledStationAETitle
(0040,0002) DA [20051027] # 8, 1 ScheduledProcedureStepStartDate
(0040,0003) TM [1000] # 6, 1 ScheduledProcedureStepStartTime
(0040,0006) PN [Eichelberg] # 8, 1 ScheduledPerformingPhysiciansName
(0040,0009) SH [123] # 8, 1 ScheduledProcedureStepID
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 1 ItemDelimitationItem
(fffe,e000) na # 242, 1 Item
(0008,0060) CS [XA] # 2, 1 Modality
(0040,0001) AE [XA1] # 8, 2 ScheduledStationAETitle
(0040,0002) DA [20051027] # 8, 1 ScheduledProcedureStepStartDate
(0040,0003) TM [1020] # 6, 1 ScheduledProcedureStepStartTime
(0040,0006) PN [Eichelberg] # 8, 1 ScheduledPerformingPhysiciansName
(0040,0009) SH [124] # 8, 1 ScheduledProcedureStepID
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 1 ItemDelimitationItem
(fffe,e000) na # 242, 1 Item
(0008,0060) CS [XA] # 2, 1 Modality
(0040,0001) AE [XA1] # 8, 2 ScheduledStationAETitle
(0040,0002) DA [20051027] # 8, 1 ScheduledProcedureStepStartDate
(0040,0003) TM [1040] # 6, 1 ScheduledProcedureStepStartTime
(0040,0006) PN [Eichelberg] # 8, 1 ScheduledPerformingPhysiciansName
(0040,0009) SH [125] # 8, 1 ScheduledProcedureStepID
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 1 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-enc.) # 0, 1 SequenceDelimitationItem
(0040,1001) SH [] # 6, 1 RequestedProcedureID
As many as you want, there is no restriction.How many items i can add to this particular sequence?
Please specify more clearly what your scenario is, otherwise we cannot help you.Should i add code value and coding scheme designer tags for each sequences? if so what are its values for this sequence?
Also please note that in the context of worklist management, you can only have one item in the ScheduledProcedureStepSequence attribute in the dataset of a C-Find request message. (See sequence matching in section C.2.2.2.6 of part 4 of the DICOM standard.)
-
- Posts: 19
- Joined: Wed, 2005-02-09, 08:44
How to add more elements to sequence after dum2dcm?
Hi
Thanks for ur reply. It really helped me.
Is it possible to add more elements to a sequence after dump2dcm without modifying the query file. using dcmodify?
I am using query file for MPPS. My dataset is getting values from the query.dcm file similer to findscu.
So sequences like referenced image sequence I would like to add more SOP class and Instance UID of images aquired to the .dcm file using dcmodify and how many images are going to be aquired is known at run time only.
example:
(0008,1140) SQ [] # Referenced Image Sequence 1
(fffe,e000) na #
(0008,1150) UI [1.2.840.113780.9800.0.20050408150157.20.11]
(0008,1155) UI [1.2.840.113780.9800.0.20050408150157.20.11.11.1.1.1]
(fffe,e00d) na (ItemDelimitationItem for re-encoding)
(fffe,e000) na #
(0008,1150) UI [1.2.840.113780.9800.0.20050408150157.20.11.2]
(0008,1155) UI [1.2.840.113780.9800.0.20050408150157.20.11.22.2]
(fffe,e00d) na (ItemDelimitationItem for re-encoding)
(fffe,e000) na #
(0008,1150) UI [1.2.840.113780.9800.0.20050408150157.20.11.1]
(0008,1155) UI [1.2.840.113780.9800.0.20050408150157.20.11.11.2.1]
(fffe,e00d) na (ItemDelimitationItem for re-encoding)
(fffe,e0dd) na (SequenceDelimitationItem for re-enc.)
this is referenced image sequnce with 3 elements.
Can I add more (more than 3 elements) elements to it using ./dcmodify after creating query.dcm using ./dump2dcm?
Thanks for ur reply. It really helped me.
Is it possible to add more elements to a sequence after dump2dcm without modifying the query file. using dcmodify?
I am using query file for MPPS. My dataset is getting values from the query.dcm file similer to findscu.
So sequences like referenced image sequence I would like to add more SOP class and Instance UID of images aquired to the .dcm file using dcmodify and how many images are going to be aquired is known at run time only.
example:
(0008,1140) SQ [] # Referenced Image Sequence 1
(fffe,e000) na #
(0008,1150) UI [1.2.840.113780.9800.0.20050408150157.20.11]
(0008,1155) UI [1.2.840.113780.9800.0.20050408150157.20.11.11.1.1.1]
(fffe,e00d) na (ItemDelimitationItem for re-encoding)
(fffe,e000) na #
(0008,1150) UI [1.2.840.113780.9800.0.20050408150157.20.11.2]
(0008,1155) UI [1.2.840.113780.9800.0.20050408150157.20.11.22.2]
(fffe,e00d) na (ItemDelimitationItem for re-encoding)
(fffe,e000) na #
(0008,1150) UI [1.2.840.113780.9800.0.20050408150157.20.11.1]
(0008,1155) UI [1.2.840.113780.9800.0.20050408150157.20.11.11.2.1]
(fffe,e00d) na (ItemDelimitationItem for re-encoding)
(fffe,e0dd) na (SequenceDelimitationItem for re-enc.)
this is referenced image sequnce with 3 elements.
Can I add more (more than 3 elements) elements to it using ./dcmodify after creating query.dcm using ./dump2dcm?
Dear Sir,
From the above example I tried to make a dcm file and it was successful, but when i tried to use it as specified (findscu -v IP PORT test.dcm), I get the following error.
Requesting Association
findscu: Association Rejected:
Result: Rejected Permanent, Source: Service User
Reason: No Reason
The only change I did before making a .dcm file was that I changed the patient name to,
(0010,0010) PN [A*] # 6, 1 PatientName
and
(0008,0050) SH [] # 6, 1 AccessionNumber
Which I hope just tell the findscu to query for all the patients names starting with A.
Please let me know if I'm doing anything wrong.
I have been hasseling with this for about three weeks and I really want to move forward and make a script so that I can query and retrieve all the exams for that day.
Thanks in advance for the help.
Ebaad Ahmed.
From the above example I tried to make a dcm file and it was successful, but when i tried to use it as specified (findscu -v IP PORT test.dcm), I get the following error.
Requesting Association
findscu: Association Rejected:
Result: Rejected Permanent, Source: Service User
Reason: No Reason
The only change I did before making a .dcm file was that I changed the patient name to,
(0010,0010) PN [A*] # 6, 1 PatientName
and
(0008,0050) SH [] # 6, 1 AccessionNumber
Which I hope just tell the findscu to query for all the patients names starting with A.
Please let me know if I'm doing anything wrong.
I have been hasseling with this for about three weeks and I really want to move forward and make a script so that I can query and retrieve all the exams for that day.
Thanks in advance for the help.
Ebaad Ahmed.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 0 guests