Modality worklist wlmscpfs inconsistent results

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
afsdcm
Posts: 6
Joined: Tue, 2021-06-08, 07:29

Modality worklist wlmscpfs inconsistent results

#1 Post by afsdcm » Fri, 2021-06-25, 02:38

Hello,

I'm currently using the DCMTK worklist management tool wlmscpfs, DCMTK version 3.6.6. It is updating the worklists on the requesting modalities but not consistently. The modalities being used are Toshiba i800 ultrasound machines. When testing by repeatedly querying from the same machine, it will return all, some, or sometimes none of the exams that should be assigned to that machine. All worklist files are formatted the same.

The command I am using to start the worklist management tool is:
wlmscpfs 114 -dfr -dfp "C:\DicomMWL\Worklists" -rfp "C:\DicomMWL\Queries" --sleep-before 5 --log-config log2file.cfg
The only other messages I see are when its checking the search mask. There are a number of these messages however they're for tags I'm not using so I'm assuming this is unrelated.
Unsupported (sequence) attribute (InstitutionCodeSequence) encountered in the search mask. This attribute will not be existent in any result dataset.


When an exam doesn't show up the log reports this error:
Could not read worklist file "<worklist file path>", file will be ignored: I/O suspension or premature end of stream
On the modality I can re-query and sometimes have the same worklist item(s) that previously errored then show up correctly or vice versa have one that displayed then not show up in which case the log displays the above error.

My Setup:
I was running wlmscpfs as a service (using NSSM) on a server running Windows Server 2016. However for testing I have also tried running from command line with the debug switch added and I'm getting the same results. The worklist, dump, and query locations are local folders on the same server. I have a separate custom application running that detects when a Dicom query file is generated by wlmscpfs. It then queries the database storing the information, creates the corresponding .dump file(s), and then calls dump2dcm to convert the dump files to .wl worklist files at the directory that wlmscpfs is expecting them. I also had it removing previous dumps, queries, and worklists when a new query comes in before generating new ones, however for now I've disabled that functionality in case that was causing issues but doing so hasn't resolve the issue.

Below logs are using test study information. This example was one that had error listed above but all files have the same format.

Any insight into a possible cause would be much appreciated.

Example query:
# Dicom-Data-Set
# Used TransferSyntax: Little Endian Explicit
(0008,0050) SH (no value available) # 0, 0 AccessionNumber
(0008,0080) LO (no value available) # 0, 0 InstitutionName
(0008,0081) ST (no value available) # 0, 0 InstitutionAddress
(0008,0082) SQ (Sequence with explicit length #=1) # 40, 1 InstitutionCodeSequence
(fffe,e000) na (Item with explicit length #=4) # 32, 1 Item
(0008,0100) SH (no value available) # 0, 0 CodeValue
(0008,0102) SH (no value available) # 0, 0 CodingSchemeDesignator
(0008,0103) SH (no value available) # 0, 0 CodingSchemeVersion
(0008,0104) LO (no value available) # 0, 0 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0008,0090) PN (no value available) # 0, 0 ReferringPhysicianName
(0008,0092) ST (no value available) # 0, 0 ReferringPhysicianAddress
(0008,0094) SH (no value available) # 0, 0 ReferringPhysicianTelephoneNumbers
(0008,1030) LO (no value available) # 0, 0 StudyDescription
(0008,1040) LO (no value available) # 0, 0 InstitutionalDepartmentName
(0008,1070) PN (no value available) # 0, 0 OperatorsName
(0008,1080) LO (no value available) # 0, 0 AdmittingDiagnosesDescription
(0008,1084) SQ (Sequence with explicit length #=1) # 40, 1 AdmittingDiagnosesCodeSequence
(fffe,e000) na (Item with explicit length #=4) # 32, 1 Item
(0008,0100) SH (no value available) # 0, 0 CodeValue
(0008,0102) SH (no value available) # 0, 0 CodingSchemeDesignator
(0008,0103) SH (no value available) # 0, 0 CodingSchemeVersion
(0008,0104) LO (no value available) # 0, 0 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0008,1110) SQ (Sequence with explicit length #=1) # 24, 1 ReferencedStudySequence
(fffe,e000) na (Item with explicit length #=2) # 16, 1 Item
(0008,1150) UI (no value available) # 0, 0 ReferencedSOPClassUID
(0008,1155) UI (no value available) # 0, 0 ReferencedSOPInstanceUID
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0008,1120) SQ (Sequence with explicit length #=1) # 24, 1 ReferencedPatientSequence
(fffe,e000) na (Item with explicit length #=2) # 16, 1 Item
(0008,1150) UI (no value available) # 0, 0 ReferencedSOPClassUID
(0008,1155) UI (no value available) # 0, 0 ReferencedSOPInstanceUID
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0010,0010) PN (no value available) # 0, 0 PatientName
(0010,0020) LO (no value available) # 0, 0 PatientID
(0010,0021) LO (no value available) # 0, 0 IssuerOfPatientID
(0010,0030) DA (no value available) # 0, 0 PatientBirthDate
(0010,0032) TM (no value available) # 0, 0 PatientBirthTime
(0010,0040) CS (no value available) # 0, 0 PatientSex
(0010,0050) SQ (Sequence with explicit length #=1) # 40, 1 PatientInsurancePlanCodeSequence
(fffe,e000) na (Item with explicit length #=4) # 32, 1 Item
(0008,0100) SH (no value available) # 0, 0 CodeValue
(0008,0102) SH (no value available) # 0, 0 CodingSchemeDesignator
(0008,0103) SH (no value available) # 0, 0 CodingSchemeVersion
(0008,0104) LO (no value available) # 0, 0 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0010,1000) LO (no value available) # 0, 0 RETIRED_OtherPatientIDs
(0010,1001) PN (no value available) # 0, 0 OtherPatientNames
(0010,1005) PN (no value available) # 0, 0 PatientBirthName
(0010,1010) AS (no value available) # 0, 0 PatientAge
(0010,1020) DS (no value available) # 0, 0 PatientSize
(0010,1030) DS (no value available) # 0, 0 PatientWeight
(0010,1040) LO (no value available) # 0, 0 PatientAddress
(0010,1060) PN (no value available) # 0, 0 PatientMotherBirthName
(0010,1080) LO (no value available) # 0, 0 MilitaryRank
(0010,1081) LO (no value available) # 0, 0 BranchOfService
(0010,1090) LO (no value available) # 0, 0 RETIRED_MedicalRecordLocator
(0010,2000) LO (no value available) # 0, 0 MedicalAlerts
(0010,2110) LO (no value available) # 0, 0 Allergies
(0010,2150) LO (no value available) # 0, 0 CountryOfResidence
(0010,2152) LO (no value available) # 0, 0 RegionOfResidence
(0010,2154) SH (no value available) # 0, 0 PatientTelephoneNumbers
(0010,2160) SH (no value available) # 0, 0 EthnicGroup
(0010,2180) SH (no value available) # 0, 0 Occupation
(0010,21a0) CS (no value available) # 0, 0 SmokingStatus
(0010,21b0) LT (no value available) # 0, 0 AdditionalPatientHistory
(0010,21c0) US (no value available) # 0, 0 PregnancyStatus
(0010,21d0) DA (no value available) # 0, 0 LastMenstrualDate
(0010,21f0) LO (no value available) # 0, 0 PatientReligiousPreference
(0010,4000) LT (no value available) # 0, 0 PatientComments
(0020,000d) UI (no value available) # 0, 0 StudyInstanceUID
(0032,1032) PN (no value available) # 0, 0 RequestingPhysician
(0032,1033) LO (no value available) # 0, 0 RequestingService
(0032,1060) LO (no value available) # 0, 0 RequestedProcedureDescription
(0032,1064) SQ (Sequence with explicit length #=1) # 40, 1 RequestedProcedureCodeSequence
(fffe,e000) na (Item with explicit length #=4) # 32, 1 Item
(0008,0100) SH (no value available) # 0, 0 CodeValue
(0008,0102) SH (no value available) # 0, 0 CodingSchemeDesignator
(0008,0103) SH (no value available) # 0, 0 CodingSchemeVersion
(0008,0104) LO (no value available) # 0, 0 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0038,0004) SQ (Sequence with explicit length #=1) # 24, 1 ReferencedPatientAliasSequence
(fffe,e000) na (Item with explicit length #=2) # 16, 1 Item
(0008,1150) UI (no value available) # 0, 0 ReferencedSOPClassUID
(0008,1155) UI (no value available) # 0, 0 ReferencedSOPInstanceUID
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0038,0008) CS (no value available) # 0, 0 VisitStatusID
(0038,0010) LO (no value available) # 0, 0 AdmissionID
(0038,0016) LO (no value available) # 0, 0 RouteOfAdmissions
(0038,0020) DA (no value available) # 0, 0 AdmittingDate
(0038,0021) TM (no value available) # 0, 0 AdmittingTime
(0038,0050) LO (no value available) # 0, 0 SpecialNeeds
(0038,0300) LO (no value available) # 0, 0 CurrentPatientLocation
(0038,0400) LO (no value available) # 0, 0 PatientInstitutionResidence
(0038,0500) LO (no value available) # 0, 0 PatientState
(0038,4000) LT (no value available) # 0, 0 VisitComments
(0040,0100) SQ (Sequence with explicit length #=1) # 210, 1 ScheduledProcedureStepSequence
(fffe,e000) na (Item with explicit length #=16) # 202, 1 Item
(0008,0060) CS [US] # 2, 1 Modality
(0032,1070) LO (no value available) # 0, 0 RequestedContrastAgent
(0040,0001) AE [APLIO3] # 6, 1 ScheduledStationAETitle
(0040,0002) DA [20210624] # 8, 1 ScheduledProcedureStepStartDate
(0040,0003) TM [000000-235959 ] # 14, 1 ScheduledProcedureStepStartTime
(0040,0004) DA (no value available) # 0, 0 ScheduledProcedureStepEndDate
(0040,0005) TM (no value available) # 0, 0 ScheduledProcedureStepEndTime
(0040,0006) PN (no value available) # 0, 0 ScheduledPerformingPhysicianName
(0040,0007) LO (no value available) # 0, 0 ScheduledProcedureStepDescription
(0040,0008) SQ (Sequence with explicit length #=1) # 40, 1 ScheduledProtocolCodeSequence
(fffe,e000) na (Item with explicit length #=4) # 32, 1 Item
(0008,0100) SH (no value available) # 0, 0 CodeValue
(0008,0102) SH (no value available) # 0, 0 CodingSchemeDesignator
(0008,0103) SH (no value available) # 0, 0 CodingSchemeVersion
(0008,0104) LO (no value available) # 0, 0 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(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
(0040,0012) LO (no value available) # 0, 0 PreMedication
(0040,0020) CS (no value available) # 0, 0 ScheduledProcedureStepStatus
(0040,0400) LT (no value available) # 0, 0 CommentsOnTheScheduledProcedureStep
(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,1002) LO (no value available) # 0, 0 ReasonForTheRequestedProcedure
(0040,1003) SH (no value available) # 0, 0 RequestedProcedurePriority
(0040,1004) LO (no value available) # 0, 0 PatientTransportArrangements
(0040,1005) LO (no value available) # 0, 0 RequestedProcedureLocation
(0040,1008) LO (no value available) # 0, 0 ConfidentialityCode
(0040,1009) SH (no value available) # 0, 0 ReportingPriority
(0040,1010) PN (no value available) # 0, 0 NamesOfIntendedRecipientsOfResults
(0040,1400) LT (no value available) # 0, 0 RequestedProcedureComments
(0040,2004) DA (no value available) # 0, 0 IssueDateOfImagingServiceRequest
(0040,2005) TM (no value available) # 0, 0 IssueTimeOfImagingServiceRequest
(0040,2008) PN (no value available) # 0, 0 OrderEnteredBy
(0040,2009) SH (no value available) # 0, 0 OrderEntererLocation
(0040,2010) SH (no value available) # 0, 0 OrderCallbackPhoneNumber
(0040,2016) LO (no value available) # 0, 0 PlacerOrderNumberImagingServiceRequest
(0040,2017) LO (no value available) # 0, 0 FillerOrderNumberImagingServiceRequest
(0040,2400) LT (no value available) # 0, 0 ImagingServiceRequestComments
(0040,3001) LO (no value available) # 0, 0 ConfidentialityConstraintOnPatientDataDescription

Example dump used to convert to worklist:
# Dicom-Data-Set
# Used TransferSyntax: Little Endian Explicit
(0008,0050) SH [41604] # 0, 0 AccessionNumber
(0008,0080) LO [] # 0, 0 InstitutionName
(0008,0081) ST [] # 0, 0 InstitutionAddress
(0008,0082) SQ (Sequence with explicit length #=1) # 40, 1 InstitutionCodeSequence
(fffe,e000) na (Item with explicit length #=4) # 32, 1 Item
(0008,0100) SH [] # 0, 0 CodeValue
(0008,0102) SH [] # 0, 0 CodingSchemeDesignator
(0008,0103) SH [] # 0, 0 CodingSchemeVersion
(0008,0104) LO [] # 0, 0 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0008,0090) PN [Doe MD, John] # 0, 0 ReferringPhysicianName
(0008,0092) ST [] # 0, 0 ReferringPhysicianAddress
(0008,0094) SH [] # 0, 0 ReferringPhysicianTelephoneNumbers
(0008,1030) LO [Thyroid] # 0, 0 StudyDescription
(0008,1040) LO [] # 0, 0 InstitutionalDepartmentName
(0008,1070) PN [] # 0, 0 OperatorsName
(0008,1080) LO [] # 0, 0 AdmittingDiagnosesDescription
(0008,1084) SQ (Sequence with explicit length #=1) # 40, 1 AdmittingDiagnosesCodeSequence
(fffe,e000) na (Item with explicit length #=4) # 32, 1 Item
(0008,0100) SH [] # 0, 0 CodeValue
(0008,0102) SH [] # 0, 0 CodingSchemeDesignator
(0008,0103) SH [] # 0, 0 CodingSchemeVersion
(0008,0104) LO [] # 0, 0 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0008,1110) SQ (Sequence with explicit length #=1) # 24, 1 ReferencedStudySequence
(fffe,e000) na (Item with explicit length #=2) # 16, 1 Item
(0008,1150) UI [] # 0, 0 ReferencedSOPClassUID
(0008,1155) UI [] # 0, 0 ReferencedSOPInstanceUID
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0008,1120) SQ (Sequence with explicit length #=1) # 24, 1 ReferencedPatientSequence
(fffe,e000) na (Item with explicit length #=2) # 16, 1 Item
(0008,1150) UI [] # 0, 0 ReferencedSOPClassUID
(0008,1155) UI [] # 0, 0 ReferencedSOPInstanceUID
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0010,0010) PN [Doe^Jane^A] # 0, 0 PatientName
(0010,0020) LO [123456] # 0, 0 PatientID
(0010,0021) LO [] # 0, 0 IssuerOfPatientID
(0010,0030) DA [19600311] # 0, 0 PatientBirthDate
(0010,0032) TM [] # 0, 0 PatientBirthTime
(0010,0040) CS [F] # 0, 0 PatientSex
(0010,0050) SQ (Sequence with explicit length #=1) # 40, 1 PatientInsurancePlanCodeSequence
(fffe,e000) na (Item with explicit length #=4) # 32, 1 Item
(0008,0100) SH [] # 0, 0 CodeValue
(0008,0102) SH [] # 0, 0 CodingSchemeDesignator
(0008,0103) SH [] # 0, 0 CodingSchemeVersion
(0008,0104) LO [] # 0, 0 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0010,1000) LO [] # 0, 0 RETIRED_OtherPatientIDs
(0010,1001) PN [] # 0, 0 OtherPatientNames
(0010,1005) PN [] # 0, 0 PatientBirthName
(0010,1010) AS [] # 0, 0 PatientAge
(0010,1020) DS [] # 0, 0 PatientSize
(0010,1030) DS [] # 0, 0 PatientWeight
(0010,1040) LO [] # 0, 0 PatientAddress
(0010,1060) PN [] # 0, 0 PatientMotherBirthName
(0010,1080) LO [] # 0, 0 MilitaryRank
(0010,1081) LO [] # 0, 0 BranchOfService
(0010,1090) LO [] # 0, 0 RETIRED_MedicalRecordLocator
(0010,2000) LO [] # 0, 0 MedicalAlerts
(0010,2110) LO [] # 0, 0 Allergies
(0010,2150) LO [] # 0, 0 CountryOfResidence
(0010,2152) LO [] # 0, 0 RegionOfResidence
(0010,2154) SH [] # 0, 0 PatientTelephoneNumbers
(0010,2160) SH [] # 0, 0 EthnicGroup
(0010,2180) SH [] # 0, 0 Occupation
(0010,21a0) CS [] # 0, 0 SmokingStatus
(0010,21b0) LT [] # 0, 0 AdditionalPatientHistory
(0010,21c0) US [] # 0, 0 PregnancyStatus
(0010,21d0) DA [] # 0, 0 LastMenstrualDate
(0010,21f0) LO [] # 0, 0 PatientReligiousPreference
(0010,4000) LT [] # 0, 0 PatientComments
(0020,000d) UI [] # 0, 0 StudyInstanceUID
(0032,1032) PN [Doe MD, John] # 0, 0 RequestingPhysician
(0032,1033) LO [Thyroid] # 0, 0 RequestingService
(0032,1060) LO [Thyroid] # 0, 0 RequestedProcedureDescription
(0032,1064) SQ (Sequence with explicit length #=1) # 40, 1 RequestedProcedureCodeSequence
(fffe,e000) na (Item with explicit length #=4) # 32, 1 Item
(0008,0100) SH [] # 0, 0 CodeValue
(0008,0102) SH [] # 0, 0 CodingSchemeDesignator
(0008,0103) SH [] # 0, 0 CodingSchemeVersion
(0008,0104) LO [] # 0, 0 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0038,0004) SQ (Sequence with explicit length #=1) # 24, 1 ReferencedPatientAliasSequence
(fffe,e000) na (Item with explicit length #=2) # 16, 1 Item
(0008,1150) UI [] # 0, 0 ReferencedSOPClassUID
(0008,1155) UI [] # 0, 0 ReferencedSOPInstanceUID
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0038,0008) CS [] # 0, 0 VisitStatusID
(0038,0010) LO [] # 0, 0 AdmissionID
(0038,0016) LO [] # 0, 0 RouteOfAdmissions
(0038,0020) DA [] # 0, 0 AdmittingDate
(0038,0021) TM [] # 0, 0 AdmittingTime
(0038,0050) LO [] # 0, 0 SpecialNeeds
(0038,0300) LO [] # 0, 0 CurrentPatientLocation
(0038,0400) LO [] # 0, 0 PatientInstitutionResidence
(0038,0500) LO [] # 0, 0 PatientState
(0038,4000) LT [] # 0, 0 VisitComments
(0040,0100) SQ (Sequence with explicit length #=1) # 210, 1 ScheduledProcedureStepSequence
(fffe,e000) na (Item with explicit length #=16) # 202, 1 Item
(0008,0060) CS [US] # 2, 1 Modality
(0032,1070) LO [] # 0, 0 RequestedContrastAgent
(0040,0001) AE [APLIO3] # 6, 1 ScheduledStationAETitle
(0040,0002) DA [20210624] # 8, 1 ScheduledProcedureStepStartDate
(0040,0003) TM [130000.00] # 14, 1 ScheduledProcedureStepStartTime
(0040,0004) DA [] # 0, 0 ScheduledProcedureStepEndDate
(0040,0005) TM [] # 0, 0 ScheduledProcedureStepEndTime
(0040,0006) PN [] # 0, 0 ScheduledPerformingPhysicianName
(0040,0007) LO [Thyroid] # 0, 0 ScheduledProcedureStepDescription
(0040,0008) SQ (Sequence with explicit length #=1) # 40, 1 ScheduledProtocolCodeSequence
(fffe,e000) na (Item with explicit length #=4) # 32, 1 Item
(0008,0100) SH [] # 0, 0 CodeValue
(0008,0102) SH [] # 0, 0 CodingSchemeDesignator
(0008,0103) SH [] # 0, 0 CodingSchemeVersion
(0008,0104) LO [] # 0, 0 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0040,0009) SH [] # 0, 0 ScheduledProcedureStepID
(0040,0010) SH [KAREO3] # 0, 0 ScheduledStationName
(0040,0011) SH [ROOM3] # 0, 0 ScheduledProcedureStepLocation
(0040,0012) LO [] # 0, 0 PreMedication
(0040,0020) CS [] # 0, 0 ScheduledProcedureStepStatus
(0040,0400) LT [] # 0, 0 CommentsOnTheScheduledProcedureStep
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0040,1001) SH [] # 0, 0 RequestedProcedureID
(0040,1002) LO [] # 0, 0 ReasonForTheRequestedProcedure
(0040,1003) SH [] # 0, 0 RequestedProcedurePriority
(0040,1004) LO [] # 0, 0 PatientTransportArrangements
(0040,1005) LO [] # 0, 0 RequestedProcedureLocation
(0040,1008) LO [] # 0, 0 ConfidentialityCode
(0040,1009) SH [] # 0, 0 ReportingPriority
(0040,1010) PN [] # 0, 0 NamesOfIntendedRecipientsOfResults
(0040,1400) LT [] # 0, 0 RequestedProcedureComments
(0040,2004) DA [] # 0, 0 IssueDateOfImagingServiceRequest
(0040,2005) TM [] # 0, 0 IssueTimeOfImagingServiceRequest
(0040,2008) PN [] # 0, 0 OrderEnteredBy
(0040,2009) SH [] # 0, 0 OrderEntererLocation
(0040,2010) SH [] # 0, 0 OrderCallbackPhoneNumber
(0040,2016) LO [] # 0, 0 PlacerOrderNumberImagingServiceRequest
(0040,2017) LO [] # 0, 0 FillerOrderNumberImagingServiceRequest
(0040,2400) LT [] # 0, 0 ImagingServiceRequestComments
(0040,3001) LO [] # 0, 0 ConfidentialityConstraintOnPatientDataDescription

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

Re: Modality worklist wlmscpfs inconsistent results

#2 Post by Michael Onken » Fri, 2021-07-02, 12:55

Hi,

it actually sounds like wlmscpfs tries to read incompletely written files. I understand that you use "--sleep-before 5" to avoid that.

Assuming that you stay below 5 seconds generating the worklist responses after the query arrives, my guess is that the sleep routine internally called by wlmscpfs does not reliably sleep 5 seconds but may be interrupted by system interrupts before. Is there a way for you to measure the time, e.g. by looking at the log event timestamps of incoming query and the error?

If that is the case, we should change the way, wlmscpfs sleeps.

Best regards,
Michael

afsdcm
Posts: 6
Joined: Tue, 2021-06-08, 07:29

Re: Modality worklist wlmscpfs inconsistent results

#3 Post by afsdcm » Wed, 2021-07-07, 01:27

Hi Michael,

I looked at the DCMTK log time stamps vs the ones in log generated from the custom application. The DCMTK log time stamps look like they match the -sleep setting. I modified the setting to 10 seconds and saw this in the log:

2021-07-06 10:05:41.924 INFO: Association Received (10:APLIO1 -> KAREO1)
.
.
2021-07-06 10:05:41.940 INFO: SLEEPING (before evaluating find request): 10 secs
.
.
2021-07-06 10:05:51.956 INFO: Checking the search mask

When previously testing the worklist files were routinely being generated in 3-4 seconds however doing further testing today it appears they are now sometimes taking roughly 7-9 seconds, most of which is spent waiting on a reply from the cloud-based database. I've modified wlmscpfs wait time to 15 seconds and so far I haven't run into the same issue today.

It seems like it could be I just wasn't giving it enough time to get a response back when the database query takes longer. The only things that don't quite line up with that are when I first ran into this issue I tried temporarily upping the wait time to 10 seconds and was still having the same intermittent problems. Also when I disabled the part of the custom application that deletes old worklist files, I would've expected it to always successfully populate on the second try since the worklist files were there from the last query but that wasn't always the case.

I'll continue to see if I run into the issue again and report back.

Thanks

afsdcm
Posts: 6
Joined: Tue, 2021-06-08, 07:29

Re: Modality worklist wlmscpfs inconsistent results

#4 Post by afsdcm » Mon, 2021-07-19, 21:13

Hello, apologies for the delayed update, I was out of office.

I bumped the delay in processing time up to 15 seconds and the issue appears to happen less but does still occur occasionally. I was able to find another example of it happening earlier. In this case the application retrieving the info and creating the worklist files called dump2dcm for each worklist file at 7/19/2021 10:17:10 AM and wlmscpfs started looking for files at 10:17:17 AM. I would think it would take less than 7 seconds for the (in this case 7) files to be converted by dump2dcm but I'm unsure how to verify that. Is there a separate log that can be accessed or configured from DCMTK to show details of any received/processed dump2dcm calls?

If it is just not getting enough time I could continue to increase the delay but the staffed sonographers may start to not like me as they do have to manually refresh it and sit there and wait in the event of same-day add on appointments. So I'd like to be completely certain that's all it is before going down that road. :)

Snippets from custom application logs:
(7/19/2021 10:17:03 AM): Query received
(7/19/2021 10:17:10 AM) Creating worklist with command: dump2dcm


Snippets from DCMTK Logs:
2021-07-19 10:17:02.026 INFO: Association Received (10:APLIO3 -> KAREO3)
.
.
2021-07-19 10:17:02.198 INFO: Storing request dataset to file
2021-07-19 10:17:02.198 INFO: SLEEPING (before evaluating find request): 15 secs
.
.
2021-07-19 10:17:17.309 INFO: Determining matching records from worklist files
2021-07-19 10:17:17.324 WARN: Could not read worklist file "C:\DicomMWL\Worklists\KAREO3\4199020210719100000.00.wl", file will be ignored: I/O suspension or premature end of stream
2021-07-19 10:17:17.324 WARN: Could not read worklist file "C:\DicomMWL\Worklists\KAREO3\4201720210719160000.00.wl", file will be ignored: I/O suspension or premature end of stream
2021-07-19 10:17:17.324 INFO: Information from worklist file "C:\DicomMWL\Worklists\KAREO3\4202720210719104500.00.wl" matches query
2021-07-19 10:17:17.324 INFO: Information from worklist file "C:\DicomMWL\Worklists\KAREO3\4203320210719133000.00.wl" matches query
2021-07-19 10:17:17.324 INFO: Information from worklist file "C:\DicomMWL\Worklists\KAREO3\4204020210719130000.00.wl" matches query
2021-07-19 10:17:17.324 INFO: Information from worklist file "C:\DicomMWL\Worklists\KAREO3\4205420210719141500.00.wl" matches query
2021-07-19 10:17:17.324 WARN: Could not read worklist file "C:\DicomMWL\Worklists\KAREO3\4205520210719233000.00.wl", file will be ignored: I/O suspension or premature end of stream
2021-07-19 10:17:17.324 INFO: Matching results: 4 matching records found in worklist files

Any further suggestions would be much appreciated.

Thanks!

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

Re: Modality worklist wlmscpfs inconsistent results

#5 Post by Michael Onken » Tue, 2021-07-20, 10:45

Hi,

I changed the sleep implementation that so that sleeping a given amount of seconds is guaranteed. The change is not yet visible in the public DCMTK (but will in a few days). I have built a windows binary using Visual Studio 2017 (together two DLLs) that you can download from here. I hope it works (=starts) on your system. Otherwise wait until the change shows up on git.dcmtk.org or github and build DCMTK yourself.

Best regards,
Michael

afsdcm
Posts: 6
Joined: Tue, 2021-06-08, 07:29

Re: Modality worklist wlmscpfs inconsistent results

#6 Post by afsdcm » Tue, 2021-07-20, 18:24

Thanks Michael, I'll give that a try and see if it resolves the issue.

afsdcm
Posts: 6
Joined: Tue, 2021-06-08, 07:29

Re: Modality worklist wlmscpfs inconsistent results

#7 Post by afsdcm » Wed, 2021-07-28, 18:04

Hi Michael,

A couple days ago I updated wlmscpfs.exe with the one you provided. I put the DLLs in the same directory as wlmscpfs. Was that all that was needing done to fully implement the change? I haven't had any issues since updating the files.

I've been watching to see if the issue happened again and it did this morning. This time there were 6 total dump files to be converted to worklists. The one that errored was the first of the 6. Timing-wise it is similar to before. I have wlmscpfs sleeping for 15 seconds before looking. The dump2dcm calls were made 7 seconds before wlmscpfs started looking for them.

Logs from DCMTK and custom application that generates the dumps and calls dump2dcm:
2021-07-28 07:34:27.462 WARN: Could not read worklist file <file path>, file will be ignored: I/O suspension or premature end of stream
(7/28/2021 7:34:20 AM) Creating worklist with command: dump2dcm
Could repeatedly calling dump2dcm in too fast succession cause the dump2dcm call to possibly generate an incorrectly formatted worklist file? I may try and add a half second delay between each dump2dcm call to see if that makes a difference.

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

Re: Modality worklist wlmscpfs inconsistent results

#8 Post by Michael Onken » Mon, 2021-08-02, 14:37

Hi,

the installation as you performed it should be fine.

Since waiting in wlmscpfs works fine (according to your log) I can see no other problem than the dump2dcm call. Do you accidentially re-use file names or something like this? Let me know the results of your extra delay you wanted to try out.

Best regards,
Michael

afsdcm
Posts: 6
Joined: Tue, 2021-06-08, 07:29

Re: Modality worklist wlmscpfs inconsistent results

#9 Post by afsdcm » Sat, 2021-08-14, 04:55

I introduced a half second delay between each dump2dcm call and so far it appears to have removed the inconsistent results. I had to increase wlmscpfs wait time to 18 seconds but so far so good. The modality appears to time-out its MWL request at 20 seconds so don't have a lot of wiggle room to play with but at least it appears I know where the issue seems to be coming from.

Thanks for the assistance!

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

Re: Modality worklist wlmscpfs inconsistent results

#10 Post by Michael Onken » Wed, 2021-08-18, 09:33

Happy that it works for you now ;) If you find any bugs, just let us know.

Best regards,
Michael

Post Reply

Who is online

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