Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New / Legacy archive attribute coercion : Supplement Issuer of Patient ID from Device does not get correctly applied on incoming C-FIND request dataset #3811

Closed
vrindanayak opened this issue Oct 1, 2022 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@vrindanayak
Copy link
Member

Describe the bug
Supplement Issuer Of Patient ID does not get correctly applied on new / legacy archive attribute coercions for

DIMSE : C_FIND_RQ
Role : SCU

To Reproduce
Steps to reproduce the behavior:

  1. Configure Issuer Of Patient ID on test device as Site A&1.2.40.0.13.1.1.999.111.1111&ISO
  2. Configure new / legacy archvie attribute cercions respectively as
dn: cn=new-attr-coerce-c-find-rq-sup-from-dev,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
objectClass: dcmArchiveAttributeCoercion2
cn: new-attr-coerce-c-find-rq-sup-from-dev
dcmDIMSE: C_FIND_RQ
dcmURI: sup-from-dev:
dicomTransferRole: SCU
dcmProperty: SendingApplicationEntityTitle=CASE13
dicomDeviceName: dicomDeviceName=test,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org

and

dn: cn=legacy-attr-coerce-c-find-rq-sup-from-dev,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
objectClass: dcmArchiveAttributeCoercion
cn: legacy-attr-coerce-c-find-rq-sup-from-dev
dcmDIMSE: C_FIND_RQ
dicomTransferRole: SCU
dcmProperty: SendingApplicationEntityTitle=CASE13A
dcmSupplementFromDeviceReference: dicomDeviceName=test,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
  1. Store 2 studies to archive with equal values of Patient ID but with different values for Issuer of Patient ID
storescu -s PatientID=MADTPID3597 -s "IssuerOfPatientID=Site A" -s IssuerOfPatientIDQualifiersSequence.UniversalEntityID=1.2.40.0.13.1.1.999.111.1111 -s IssuerOfPatientIDQualifiersSequence.UniversalEntityIDType=ISO  -c DCM4CHEE@localhost:11112 study1.dcm

storescu -s PatientID=MADTPID3597 -s IssuerOfPatientID=Site2 -c DCM4CHEE@localhost:11112 study2.dcm
  1. Invoke C-FIND by matching Patient ID only and using condition from coercion rule (for coercion to get applied)
    findscu tool log
findscu -b CASE13A -L SERIES --relational  -c DCM4CHEE@localhost:11112 -r StudyInstanceUID -r PatientID -r IssuerOfPatientID -r IssuerOfPatientIDQualifiersSequence  -r InstitutionName -m PatientID=MADTPID3597 | grep -A15 "C-FIND-RSP Dataset"
20:00:10.297 DEBUG - CASE13A->DCM4CHEE(1) >> 1:C-FIND-RSP Dataset:
(0008,0005) CS [] SpecificCharacterSet
(0008,0052) CS [SERIES] QueryRetrieveLevel
(0008,0054) AE [DCM4CHEE] RetrieveAETitle
(0008,0056) CS [ONLINE] InstanceAvailability
(0008,0080) LO [Institution name] InstitutionName
(0008,0201) SH [] TimezoneOffsetFromUTC
(0010,0020) LO [MADTPID3597] PatientID
(0010,0021) LO [Site A] IssuerOfPatientID
(0010,0024) SQ [1 Items] IssuerOfPatientIDQualifiersSequence
>Item #1
>(0040,0032) UT [1.2.40.0.13.1.1.999.111.1111] UniversalEntityID
>(0040,0033) CS [ISO] UniversalEntityIDType
(0020,000D) UI [1.2.840.113619.2.216.2.1.2642006103252234.10589] StudyInstance

20:00:10.298 INFO  - CASE13A->DCM4CHEE(1) >> 1:C-FIND-RSP[pcid=1, status=ff00H
--
20:00:10.298 DEBUG - CASE13A->DCM4CHEE(1) >> 1:C-FIND-RSP Dataset:
(0008,0005) CS [] SpecificCharacterSet
(0008,0052) CS [SERIES] QueryRetrieveLevel
(0008,0054) AE [DCM4CHEE] RetrieveAETitle
(0008,0056) CS [ONLINE] InstanceAvailability
(0008,0080) LO [] InstitutionName
(0008,0201) SH [] TimezoneOffsetFromUTC
(0010,0020) LO [MADTPID3597] PatientID
(0010,0021) LO [Site2] IssuerOfPatientID
(0010,0024) SQ [] IssuerOfPatientIDQualifiersSequence
(0020,000D) UI [2.25.176235938376010848517050220792077100668] StudyInstanceUID

20:00:10.298 INFO  - CASE13A->DCM4CHEE(1) >> 1:C-FIND-RSP[pcid=1, status=0H
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
20:00:10.298 DEBUG - CASE13A->DCM4CHEE(1) >> 1:C-FIND-RSP Command:

Archive server.log

20:00:10,244 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-8) Accept connection Socket[addr=/127.0.0.1,port=34775,localport=11112]
20:00:10,261 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-16) DCM4CHEE<-CASE13A(9) >> A-ASSOCIATE-RQ
20:00:10,261 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-16) DCM4CHEE<-CASE13A(9) << A-ASSOCIATE-AC
20:00:10,282 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-16) DCM4CHEE<-CASE13A(9) >> 1:C-FIND-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
20:00:10,283 INFO  [org.dcm4chee.arc.query.scp.CommonCFindSCP] (EE-ManagedExecutorService-default-Thread-16) DCM4CHEE<-CASE13A(9): Process C-FIND RQ:
(0008,0052) CS [SERIES] QueryRetrieveLevel
(0008,0080) LO [] InstitutionName
(0010,0020) LO [MADTPID3597] PatientID
(0010,0021) LO [] IssuerOfPatientID
(0010,0024) SQ [1 Items] IssuerOfPatientIDQualifiersSequence
>Item #1
(0020,000D) UI [] StudyInstanceUID

20:00:10,283 INFO  [org.dcm4chee.arc.query.impl.QueryServiceImpl] (EE-ManagedExecutorService-default-Thread-16) Apply ArchiveAttributeCoercion[cn=legacy-attr-coerce-c-find-rq-sup-from-dev, priority=0, DIMSE=C_FIND_RQ, role=SCU, cuids=[], conditions={SendingApplicationEntityTitle=CASE13A}, retrieveAsReceived=false, deIdentification=[], xslturi=null, noKeywords=false, leadingCFindSCP=null, mergeMWLMatchingKey=null, mergeMWLTemplateURI=null, mergeMWLSCP=null, mergeLocalMWLSCPs=[], mwlImportFilterBySCU=false, attributeUpdatePolicy=MERGE, trimISO2022CharacterSet=false, useCallingAETitleAs=null, nullifyTags=[], mergeAttributes=[], nullifyIssuerOfPatientID=null, issuerOfPatientIDs=[], issuerOfPatientIDFormat=null, supplementFromDeviceName=test] to Search Attributes
20:00:10,283 INFO  [org.dcm4chee.arc.conf.ArchiveAttributeCoercion] (EE-ManagedExecutorService-default-Thread-16) Merge attributes using coercion [cn=legacy-attr-coerce-c-find-rq-sup-from-dev]
20:00:10,283 INFO  [org.dcm4chee.arc.mima.SupplementAssigningAuthorities] (EE-ManagedExecutorService-default-Thread-16) Supplement entity Query by coercion org.dcm4chee.arc.mima.SupplementAssigningAuthorities@cb810ba
20:00:10,284 INFO  [org.dcm4chee.arc.mima.SupplementAssigningAuthorities] (EE-ManagedExecutorService-default-Thread-16) Supplement composite query from device: test
20:00:10,290 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-7) DCM4CHEE<-CASE13A(9) << 1:C-FIND-RSP[pcid=1, status=ff00H
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
20:00:10,291 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-7) DCM4CHEE<-CASE13A(9) << 1:C-FIND-RSP[pcid=1, status=ff00H
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
20:00:10,291 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-7) DCM4CHEE<-CASE13A(9) << 1:C-FIND-RSP[pcid=1, status=0H
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
20:00:10,299 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-16) DCM4CHEE<-CASE13A(9) >> A-RELEASE-RQ
20:00:10,299 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-16) DCM4CHEE<-CASE13A(9) << A-RELEASE-RP
20:00:10,349 INFO  [org.dcm4che3.net.Association] (EE-ManagedScheduledExecutorService-default-Thread-13) DCM4CHEE<-CASE13A(9): close Socket[addr=view-localhost/127.0.0.1,port=34775,localport=11112]

Expected behavior
If coercion is correctly applied, device level value of Issuer Of Patient ID should get applied as Issuer of Patient ID and Issuer of Patient ID Qualifiers Sequence in C-FIND request dataset, thereby returning only the exact matching patient record.
findscu tool log

findscu -b CASE13A -L SERIES --relational  -c DCM4CHEE@localhost:11112 -r StudyInstanceUID -r PatientID -r IssuerOfPatientID -r IssuerOfPatientIDQualifiersSequence  -r InstitutionName -m PatientID=MADTPID3597 | grep -A15 "C-FIND-RSP Dataset"
20:09:45.784 DEBUG - CASE13A->DCM4CHEE(1) >> 1:C-FIND-RSP Dataset:
(0008,0005) CS [] SpecificCharacterSet
(0008,0052) CS [SERIES] QueryRetrieveLevel
(0008,0054) AE [DCM4CHEE] RetrieveAETitle
(0008,0056) CS [ONLINE] InstanceAvailability
(0008,0080) LO [Institution name] InstitutionName
(0008,0201) SH [] TimezoneOffsetFromUTC
(0010,0020) LO [MADTPID3597] PatientID
(0010,0021) LO [Site A] IssuerOfPatientID
(0010,0024) SQ [1 Items] IssuerOfPatientIDQualifiersSequence
>Item #1
>(0040,0032) UT [1.2.40.0.13.1.1.999.111.1111] UniversalEntityID
>(0040,0033) CS [ISO] UniversalEntityIDType
(0020,000D) UI [1.2.840.113619.2.216.2.1.2642006103252234.10589] StudyInstance

20:09:45.785 INFO  - CASE13A->DCM4CHEE(1) >> 1:C-FIND-RSP[pcid=1, status=0H

Archive server.log

20:09:45,714 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-2) Accept connection Socket[addr=/127.0.0.1,port=42911,localport=11112]
20:09:45,729 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-8) DCM4CHEE<-CASE13A(10) >> A-ASSOCIATE-RQ
20:09:45,732 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-8) DCM4CHEE<-CASE13A(10) << A-ASSOCIATE-AC
20:09:45,757 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-8) DCM4CHEE<-CASE13A(10) >> 1:C-FIND-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
20:09:45,758 INFO  [org.dcm4chee.arc.query.scp.CommonCFindSCP] (EE-ManagedExecutorService-default-Thread-8) DCM4CHEE<-CASE13A(10): Process C-FIND RQ:
(0008,0052) CS [SERIES] QueryRetrieveLevel
(0008,0080) LO [] InstitutionName
(0010,0020) LO [MADTPID3597] PatientID
(0010,0021) LO [] IssuerOfPatientID
(0010,0024) SQ [1 Items] IssuerOfPatientIDQualifiersSequence
>Item #1
(0020,000D) UI [] StudyInstanceUID

20:09:45,759 INFO  [org.dcm4chee.arc.query.impl.QueryServiceImpl] (EE-ManagedExecutorService-default-Thread-8) Apply ArchiveAttributeCoercion[cn=legacy-attr-coerce-c-find-rq-sup-from-dev, priority=0, DIMSE=C_FIND_RQ, role=SCU, cuids=[], conditions={SendingApplicationEntityTitle=CASE13A}, retrieveAsReceived=false, deIdentification=[], xslturi=null, noKeywords=false, leadingCFindSCP=null, mergeMWLMatchingKey=null, mergeMWLTemplateURI=null, mergeMWLSCP=null, mergeLocalMWLSCPs=[], mwlImportFilterBySCU=false, attributeUpdatePolicy=MERGE, trimISO2022CharacterSet=false, useCallingAETitleAs=null, nullifyTags=[], mergeAttributes=[], nullifyIssuerOfPatientID=null, issuerOfPatientIDs=[], issuerOfPatientIDFormat=null, supplementFromDeviceName=test] to Search Attributes
20:09:45,761 INFO  [org.dcm4chee.arc.conf.ArchiveAttributeCoercion] (EE-ManagedExecutorService-default-Thread-8) Merge attributes using coercion [cn=legacy-attr-coerce-c-find-rq-sup-from-dev]
20:09:45,761 INFO  [org.dcm4chee.arc.mima.SupplementAssigningAuthorities] (EE-ManagedExecutorService-default-Thread-8) Supplement entity Query by coercion org.dcm4chee.arc.mima.SupplementAssigningAuthorities@236e3ba5
20:09:45,761 INFO  [org.dcm4chee.arc.mima.SupplementAssigningAuthorities] (EE-ManagedExecutorService-default-Thread-8) Supplement composite query from device: test
20:09:45,777 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-13) DCM4CHEE<-CASE13A(10) << 1:C-FIND-RSP[pcid=1, status=ff00H
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
20:09:45,777 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-13) DCM4CHEE<-CASE13A(10) << 1:C-FIND-RSP[pcid=1, status=0H
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
20:09:45,785 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-8) DCM4CHEE<-CASE13A(10) >> A-RELEASE-RQ
20:09:45,785 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-8) DCM4CHEE<-CASE13A(10) << A-RELEASE-RP
20:09:45,836 INFO  [org.dcm4che3.net.Association] (EE-ManagedScheduledExecutorService-default-Thread-8) DCM4CHEE<-CASE13A(10): close Socket[addr=view-localhost/127.0.0.1,port=42911,localport=11112]

Related #3473

DIMSE Role SOP Class URI scheme Parameters
C_FIND_RQ
(QIDO)
SCU Comp. Query sup-from-dev:
@vrindanayak vrindanayak added the bug Something isn't working label Oct 1, 2022
@vrindanayak vrindanayak added this to the 5.29.0 milestone Oct 1, 2022
@vrindanayak vrindanayak self-assigned this Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant