Worklist query problem

  • I am having a problem with getting Conquest as my MWL to query correctly my request for searching 12 hours before and 12 hours after. But I am not sure if this is a problem my Control Station or the query return from Conquest.
    First the setup: I have 5 patients registered in the MWL. Here is a small sample.


    `AccessionN`, `PatientID`, `PatientNam`, Modality`, `StartDate`, `StartTime`,
    '1224267718875', '65978089', 'Tom^Jones', 'CR', '20081020', '160000',
    '1224268796421', '88185034', 'Tom^Jones', 'CR', '20081020', '220000'
    '1224268965578', '10795111', 'Tom^Jones', 'CR', '20081020', '140000',
    '1224269022812', '94995368', 'Tom^Jones', 'CR', '20081021', '043500',
    '1224529778390', '45209499', 'Tom^Jones', 'CR', '20081020', '120000',


    I setup filter to be 12hrs before and 12hrs after, the current time was 4:35 PM.
    I can see from my logs I send:


    0008,0060 CS 001 Modality X O O 01 CR
    0032,1070 LO 001 RQContrastAgent X O O 01
    0040,0001 AE 001 ScheduledStation X O O 01
    0040,0002 DA 001 Sched.Proc.StartDate X O O 01 20081020-20081021
    0040,0003 TM 001 Sched.Proc.StartTime X O O 01 043500-043500


    Code
    P_Data Date (P_Data‘—M)=2008/10/20 16:35:08.078Command-Set [82]Byte 00 00 00 00 04 00 00 00 - 46 00 00 00 00 00 02 00 ........F....... 16 00 00 00 31 2E 32 2E - 38 34 30 2E 31 30 30 30 ....1.2.840.1000 38 2E 35 2E 31 2E 34 2E - 33 31 00 00 00 01 02 00 8.5.1.4.31...... 00 00 20 00 00 00 10 01 - 02 00 00 00 02 00 00 00 .. ............. 00 07 02 00 00 00 00 00 - 00 00 00 08 02 00 00 00 ................ 00 00 ..Tug VR Num Item Name Ap En Ep Se Value It St q ---- ---- -- --- -------------------- -- -- -- -- -------------------0000,0000 UL 001 CmdSetGroupLength X O O 01 700000,0002 UI 001 Eff.SOPClassUID X O O 01 1.2.840.10008.5.1.4.310000,0100 US 001 CommandField X O O 01 20H0000,0110 US 001 MessageID X O O 01 2H0000,0700 US 001 Priority X O O 01 0H0000,0800 US 001 DataSetType X O O 01 0HData-Set [466]Byte 08 00 05 00 00 00 00 00 - 08 00 50 00 00 00 00 00 ..........P..... 08 00 90 00 00 00 00 00 - 08 00 10 11 18 00 00 00 ................ FE FF 00 E0 10 00 00 00 - 08 00 50 11 00 00 00 00 ..........P..... 08 00 55 11 00 00 00 00 - 08 00 20 11 18 00 00 00 ..U....... ..... FE FF 00 E0 10 00 00 00 - 08 00 50 11 00 00 00 00 ..........P..... 08 00 55 11 00 00 00 00 - 10 00 10 00 00 00 00 00 ..U............. 10 00 20 00 00 00 00 00 - 10 00 30 00 00 00 00 00 .. .......0..... 10 00 40 00 00 00 00 00 - 10 00 00 10 00 00 00 00 ..@............. 10 00 30 10 00 00 00 00 - 10 00 00 20 00 00 00 00 ..0........ .... 10 00 10 21 00 00 00 00 - 10 00 C0 21 00 00 00 00 ...!......À!.... 10 00 00 40 00 00 00 00 - 20 00 0D 00 00 00 00 00 ...@.... ....... 32 00 32 10 00 00 00 00 - 32 00 33 10 00 00 00 00 2.2.....2.3..... 32 00 60 10 00 00 00 00 - 32 00 64 10 20 00 00 00 2.`.....2.d. ... FE FF 00 E0 18 00 00 00 - 08 00 00 01 00 00 00 00 ................ 08 00 02 01 00 00 00 00 - 08 00 04 01 00 00 00 00 ................ 38 00 50 00 00 00 00 00 - 38 00 00 03 00 00 00 00 8.P.....8....... 38 00 00 04 00 00 00 00 - 38 00 00 05 00 00 00 00 8.......8....... 40 00 00 01 A2 00 00 00 - FE FF 00 E0 9A 00 00 00 @...¢......àš... 08 00 60 00 02 00 00 00 - 43 52 32 00 70 10 00 00 ..`.....CR2.p... 00 00 40 00 01 00 00 00 - 00 00 40 00 02 00 12 00 ..@.......@..... 00 00 32 30 30 38 31 30 - 32 30 2D 32 30 30 38 31 ..20081020-20081 30 32 31 20 40 00 03 00 - 0E 00 00 00 30 34 33 35 021 @.......0435 30 30 2D 30 34 33 35 30 - 30 20 40 00 06 00 00 00 00-043500 @..... 00 00 40 00 07 00 00 00 - 00 00 40 00 08 00 20 00 ..@.......@... . 00 00 FE FF 00 E0 18 00 - 00 00 08 00 00 01 00 00 ................ 00 00 08 00 02 01 00 00 - 00 00 08 00 04 01 00 00 ................ 00 00 40 00 09 00 00 00 - 00 00 40 00 10 00 00 00 ..@.......@..... 00 00 40 00 11 00 00 00 - 00 00 40 00 01 10 00 00 ..@.......@..... 00 00 40 00 10 10 00 00 - 00 00 40 00 01 30 00 00 ..@.......@..0.. 00 00 ..Tug VR Num Item Name Ap En Ep Se Value It St q ---- ---- -- --- -------------------- -- -- -- -- -------------------0008,0005 CS 001 CharacterSet X O O 01 0008,0050 SH 001 AccessionNumber X O O 01 0008,0090 PN 003 ReferringPhysician X O O 01 02 03 0008,1110 SQ 001 Ref.StudySeq. X O O 01 Tug VR Num Item Name Ap En Ep Se Value It St q ---- ---- -- --- -------------------- -- -- -- -- ------------------- 0008,1150 UI 001 Ref.SOPClassUID X O O 01 0008,1155 UI 001 Ref.SOPInst.UID X O O 01 0008,1120 SQ 001 Ref.PatientSeq. X O O 01 Tug VR Num Item Name Ap En Ep Se Value It St q ---- ---- -- --- -------------------- -- -- -- -- ------------------- 0008,1150 UI 001 Ref.SOPClassUID X O O 01 0008,1155 UI 001 Ref.SOPInst.UID X O O 01 0010,0010 PN 003 Patient'sName X O O 01 02 03 0010,0020 LO 001 PatientID X O O 01 0010,0030 DA 001 Patient'sBirthDate X O O 01 0010,0040 CS 001 Patient'sSex X O O 01 0010,1000 LO 001 OtherPatientIDs X O O 01 0010,1030 DS 001 Patient'sWeight X O O 01 0010,2000 LO 001 MedicalAlerts X O O 01 0010,2110 LO 001 ContrastAllergies X O O 01 0010,21C0 US 000 PregnancyStatus X O O 0010,4000 LT 001 PatientComments X O O 01 0020,000D UI 001 StudyInstanceUID X O O 01 0032,1032 PN 003 RequestingPhysician X O O 01 02 03 0032,1033 LO 001 RequestingService X O O 01 0032,1060 SH 001 RQProc.Desc. X O O 01 0032,1064 SQ 001 RQProc.CodeSeq. X O O 01 Tug VR Num Item Name Ap En Ep Se Value It St q ---- ---- -- --- -------------------- -- -- -- -- ------------------- 0008,0100 SH 001 CodeValue X O O 01 0008,0102 SH 001 Cod.SchemeDesignator X O O 01 0008,0104 LO 001 CodeMeaning X O O 01 0038,0050 LO 001 SpecialNeeds X O O 01 0038,0300 LO 001 PatientLocation X O O 01 0038,0400 LO 001 Pat.Inst.Residence X O O 01 0038,0500 LO 001 PatientState X O O 01 0040,0100 SQ 001 Sched.Proc.StepSQ X O O 01 Tug VR Num Item Name Ap En Ep Se Value It St q ---- ---- -- --- -------------------- -- -- -- -- ------------------- 0008,0060 CS 001 Modality X O O 01 CR 0032,1070 LO 001 RQContrastAgent X O O 01 0040,0001 AE 001 ScheduledStation X O O 01 0040,0002 DA 001 Sched.Proc.StartDate X O O 01 20081020-20081021 0040,0003 TM 001 Sched.Proc.StartTime X O O 01 043500-043500 0040,0006 PN 003 Sched.Perform.Phys. X O O 01 02 03 0040,0007 LO 001 Sched.Proc.Descript. X O O 01 0040,0008 SQ 001 Sched.ProtocolCodeSQ X O O 01 Tug VR Num Item Name Ap En Ep Se Value It St q ---- ---- -- --- -------------------- -- -- -- -- ------------------- 0008,0100 SH 001 CodeValue X O O 01 0008,0102 SH 001 Cod.SchemeDesignator X O O 01 0008,0104 LO 001 CodeMeaning X O O 01 0040,0009 SH 001 Sched.Proc.StepID X O O 01 0040,0010 SH 001 Sched.StationName X O O 01 0040,0011 SH 001 Sched.Proc.Location X O O 01 0040,1001 SH 001 RQProc.ID X O O 01 0040,1010 PN 003 RecipientsofResults X O O 01 02 03 0040,3001 LO 001 Pat.Confidentiality X O O 01


    My Conquest server receives the query and logs it as:


    Where: DICOMWorkList.Modality = 'CR' and DICOMWorkList.StartDate >= '20081020' and DICOMWorkList.StartDate <= '20081021' and DICOMWorkList.StartTime >= '043500' and DICOMWorkList.StartTime <= '043500'
    This returned only 1 patient. The one it returned was the one that matched the time field EXACTLY. The others should have also been returned because they still fall within the time search period.
    Conquest receives 0040,0002 and 0040,0003, but the time is StartTime >= '043500' and StartTime <= '043500'. This will always only return the exact match. This also happens on 24hrs-24hrs as well.
    What am I doing wrong or how I can I change it so it returns the correct values.


  • Hi,


    in conquest the date and time queries are not linked. So your query:


    0040,0002 DA 001 Sched.Proc.StartDate X O O 01 20081020-20081021
    0040,0003 TM 001 Sched.Proc.StartTime X O O 01 043500-043500


    returns patients with (date 20081020-20081021) AND (time 043500-043500). So this matches the exact time 043500 only. I am not sure if this is correct dicom behavior (can you check this?). So you can use date ranges and time ranges, but in most cases both at the same time will not work.


    Marcel

  • Well, it took a lot of reading looking through many conformance statements, but none actuall state that they can or can not do both Date and Time Range Queries.
    But looking through the DICOM Standard Book 4 Service Class Specifications for 2008, I think I found it. On page 44, Section C.2.2.2.5 Range Matching, it says


    I pretty sure this means that Yes, it is OK to do both. I would tend to agree because if I wanted to do a 12 hr query I would need both Date and Time to get an accurate Query. My guess is that this would require another field? maybe in the databse that had DATE-TIME together to be able to do the search accurately.
    But in the mean time we all have to be aware that the values returned dont accurately return from the Query.

  • Hi,


    Thanks for finding this. I still believe Conquest is correct because "The SOP class Extended Negotiation is not supported and ignored". This means that date and time range matches are done independently which is correct according to the standard. However, it also should mean that hierarchical queries are be supported while in fact they are. So there is a bug there.


    Marcel

  • I've checked other MWL application's conformance statements and some do both Date and Time Range queries and some only do Date but not time. But no where does it say whether or not it is permissiable to do date and time range queries at the same time. Right now if my application sends out both time and date range queries to Conquest it returns either nothing or only a few that match the time exactly. So given a choice, I would rather have Conquest return just the DATE matches and let my application filter the matches for the TIME.
    But all this time we have been talking about 0040,0002 and 0040,0003. But doesnt this methodology apply also to Queries on the PACs side as well?

  • Hi,


    the application that queries on a date range should not send a time range at the same time to a system that does not support extended date-time queries. Conquest will correctly returns items that match BOTH query fields. So if the time range is from 10:00:00-10:00:00 it will return only those that are exactly. This topic does not apply to non-date time fields.


    Marcel

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!