Can wlmscpfs generate a Study Instance UID?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
linux1976
Posts: 6
Joined: Thu, 2010-07-15, 15:32

Can wlmscpfs generate a Study Instance UID?

#1 Post by linux1976 »

Although I know the correct behavior is for the Study Instance UID to be the same each time the worklist is queried by the modality, does wlmscpfs have any ability to generate a Study Instance UID when queried? If so, does the value stay the same or is it generated each time the worklist is queried? We have some worklists that have entries that do not contain a Study Instance UID and we want the UID to be generated by wlmscpfs and for it to be different each time (so that one appointment can be re-used to make many studies.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi,

if you leave the Study Instance UID empty in the workist files, the DCMTK worklist server will generate one. And, as you desire, a different one will be generated for every new query. So far so good :)

However, as far as I remember, it turned out some months ago, that the Study Instance UID should be the same for each work item (i.e. worklist file for wlmscp) for any query response containint that specific work item. This is not yet implemented but maybe changed later (and then made optionally switched off/on to also implement the old behaviour if desired).

Best regards,
Michael

linux1976
Posts: 6
Joined: Thu, 2010-07-15, 15:32

#3 Post by linux1976 »

Thank you for the quick reply. I guess we will put in a zero length Study Instance UID field in the worklist entry and give it a go.

linux1976
Posts: 6
Joined: Thu, 2010-07-15, 15:32

#4 Post by linux1976 »

Although I put a zero length Study Instance UID in the worklist entry:

[dicom@linux title]$ dcmdump 20100707.3112.1600.wl

# Dicom-File-Format

# Dicom-Meta-Information-Header
# Used TransferSyntax: UnknownTransferSyntax

# Dicom-Data-Set
# Used TransferSyntax: LittleEndianImplicit
(0008,0020) DA [20100707] # 8, 1 StudyDate
(0008,0030) TM [160000.000] # 10, 1 StudyTime
(0008,0050) SH [55555] # 6, 1 AccessionNumber
(0008,0060) CS [CR] # 2, 1 Modality
(0008,0090) PN [9999^Smith^John^J] # 24, 1 ReferringPhysiciansName
(0008,1030) LO (no value available) # 0, 0 StudyDescription
(0010,0010) PN [Doe^Joe^S] # 20, 1 PatientsName
(0010,0020) LO [3333] # 4, 1 PatientID
(0010,0030) DA [19230101] # 8, 1 PatientsBirthDate
(0010,0040) CS [F] # 2, 1 PatientsSex
(0020,000d) UI (no value available) # 0, 0 StudyInstanceUID
(0032,1032) PN [9999^Smith^John^J] # 24, 1 RequestingPhysician
(0032,1060) LO (no value available) # 0, 0 RequestedProcedureDescription
(0040,0100) SQ (Sequence with undefined length #=1) # u/l, 1 ScheduledProcedureStepSequence
(fffe,e000) na (Item with undefined length #=8) # u/l, 1 Item
(0040,0001) AE (no value available) # 0, 0 ScheduledStationAETitle
(0040,0002) DA [20100707] # 8, 1 ScheduledProcedureStepStartDate
(0040,0003) TM [160000.000] # 10, 1 ScheduledProcedureStepStartTime
(0040,0006) PN (no value available) # 0, 0 ScheduledPerformingPhysiciansName
(0040,0007) LO (no value available) # 0, 0 ScheduledProcedureStepDescription
(0040,0009) SH [55555] # 6, 1 ScheduledProcedureStepID
(0040,0010) SH (no value available) # 0, 0 ScheduledStationName
(0040,0011) SH (no value available) # 0, 0 ScheduledProcedureStepLocation
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0040,1001) SH [00] # 2, 1 RequestedProcedureID
(0040,1003) SH (no value available) # 0, 0 RequestedProcedurePriority


I still do not see a Study Instance UID being generated (we are using wlmscpfs from version 3.5.4 of dcmtk):


[dicom@linux title]$ findscu -v -aec title localhost 4001 ~/config/wlquery.dcm
Requesting Association
Association Accepted (Max Send PDV: 16372)
Find SCU RQ: MsgID 1
REQUEST:

# Dicom-Data-Set
# Used TransferSyntax: LittleEndianExplicit
(0008,0050) SH (no value available) # 0, 0 AccessionNumber
(0008,0090) PN (no value available) # 0, 0 ReferringPhysiciansName
(0010,0010) PN (no value available) # 0, 0 PatientsName
(0010,0020) LO [3333] # 4, 1 PatientID
(0010,0030) DA (no value available) # 0, 0 PatientsBirthDate
(0010,0040) CS (no value available) # 0, 0 PatientsSex
(0020,000d) UI (no value available) # 0, 0 StudyInstanceUID
(0032,1060) LO (no value available) # 0, 0 RequestedProcedureDescription
(0040,0100) SQ (Sequence with explicit length #=1) # 80, 1 ScheduledProcedureStepSequence
(fffe,e000) na (Item with explicit length #=9) # 72, 1 Item
(0008,0060) CS (no value available) # 0, 0 Modality
(0040,0001) AE (no value available) # 0, 0 ScheduledStationAETitle
(0040,0002) DA (no value available) # 0, 0 ScheduledProcedureStepStartDate
(0040,0003) TM (no value available) # 0, 0 ScheduledProcedureStepStartTime
(0040,0006) PN (no value available) # 0, 0 ScheduledPerformingPhysiciansName
(0040,0007) LO (no value available) # 0, 0 ScheduledProcedureStepDescription
(0040,0009) SH (no value available) # 0, 0 ScheduledProcedureStepID
(0040,0010) SH (no value available) # 0, 0 ScheduledStationName
(0040,0011) SH (no value available) # 0, 0 ScheduledProcedureStepLocation
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0040,1001) SH (no value available) # 0, 0 RequestedProcedureID
(0040,1003) SH (no value available) # 0, 0 RequestedProcedurePriority
--------
RESPONSE: 1 (Pending)

# Dicom-Data-Set
# Used TransferSyntax: LittleEndianExplicit
(0008,0050) SH [55555 ] # 6, 1 AccessionNumber
(0008,0090) PN [9999^Smith^John^J ] # 24, 1 ReferringPhysiciansName
(0010,0010) PN [Doe^Joe^S] # 20, 1 PatientsName
(0010,0020) LO [3333] # 4, 1 PatientID
(0010,0030) DA [19230101] # 8, 1 PatientsBirthDate
(0010,0040) CS [F ] # 2, 1 PatientsSex
(0020,000d) UI (no value available) # 0, 0 StudyInstanceUID
(0040,0100) SQ (Sequence with explicit length #=1) # 96, 1 ScheduledProcedureStepSequence
(fffe,e000) na (Item with explicit length #=8) # 88, 1 Item
(0008,0060) CS (no value available) # 0, 0 Modality
(0040,0001) AE (no value available) # 0, 0 ScheduledStationAETitle
(0040,0002) DA [20100707] # 8, 1 ScheduledProcedureStepStartDate
(0040,0003) TM [160000.000] # 10, 1 ScheduledProcedureStepStartTime
(0040,0006) PN (no value available) # 0, 0 ScheduledPerformingPhysiciansName
(0040,0009) SH [55555 ] # 6, 1 ScheduledProcedureStepID
(0040,0010) SH (no value available) # 0, 0 ScheduledStationName
(0040,0011) SH (no value available) # 0, 0 ScheduledProcedureStepLocation
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0040,1001) SH [00] # 2, 1 RequestedProcedureID
(0040,1003) SH (no value available) # 0, 0 RequestedProcedurePriority
--------
C-Find RSP: MsgID: 1 [Status=Success]
AffectedSOPClassUID: =FINDModalityWorklistInformationModel
Data Set: Not Present
Releasing Association

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#5 Post by Michael Onken »

Hi,

Maybe leave the study instance UID out of the file at all?

Best regards,
Michael

linux1976
Posts: 6
Joined: Thu, 2010-07-15, 15:32

#6 Post by linux1976 »

Actually that is what we tried first before starting this post (we left the Study Instance UID completely out of the file). What could we try to determine what wlmscpfs wants (besides reading the source code :D )? I have wlmscpfs running with "-v -d -dfr -dfp DIR 4001" and the output of wlmscpfs does not seem to point to any issues, it just seems to pass the emptiness through.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#7 Post by Michael Onken »

Well, that's really mysterious, let me check that issue later and I'll report. I'm pretty sure that should work;)

linux1976
Posts: 6
Joined: Thu, 2010-07-15, 15:32

#8 Post by linux1976 »

Okay, thanks, let me know what you find. I'm flummoxed at the moment as I retried both cases (empty Study Instance UID and non-existent Study Instance UID in worklist entry file) and neither is causing wlmscpfs to fill in the Study Instance UID; I always get a response with an empty Study Instance UID.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#9 Post by Michael Onken »

Hi,

You are right -- I was so sure that wlmscpfs _does_ generate a study instance UID, but sorry, I was wrong!

The reason is (I can only guess since that was before my time) that the information system providing the worklist files usually requires to know the study instance UID of the worklist entries. If the worklist server would generate them itself, there would be no possibility to find out which study instance UIDs have been generated.

That's why the worklist server is (should! did not test but looked into the code) complain if a worklist file is missing a value for study instance UID.

However, if you like to change the study instance UID behaviour, it should be pretty easy to do, e. g. by patching the function

Code: Select all

WlmFileSystemInteractionManager::DatasetIsComplete( DcmDataset *dataset )
to insert a study instance UID into the dataset if it is missing. This would return a different UID for each request, as you desire. If you want the same study instance UID to be returned for multiple requests of the same work item, you have to do some additional work, of course, e.g. by insertin the study instnace UID into the while after inventing it.

Hope that helps,
Michael
Best regards,
Michael

linux1976
Posts: 6
Joined: Thu, 2010-07-15, 15:32

#10 Post by linux1976 »

Alright, thanks for tracking down the definitive answer and giving us direction on how to tackle it from here.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest