Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

MWL SCU Filtering : coercion

542 views
Skip to first unread message

Rajesh Kanattu

unread,
May 25, 2014, 2:13:48 AM5/25/14
to dcm...@googlegroups.com

Dear All,

I am using dcm4chee-2.17.2 with mysql as MWL SCP component. We have multiple facilities where modality asks for worklist from DCM4CHEE. In the MySQL tables, I am updating "Issuer of Patient ID" field thinking to filter mwl items based this field in SCU query. 

I have changed mwl-cfindrq.xsl and copied to modality AET folder under C:\apps\dcm4chee-2.17.2-mysql\server\default\conf\dcm4chee-ae. ( I only copied mwl-cfindrq.xsl , is that fine?)

mwl-cfindrq.xsl 

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" indent="no"/>
  <!-- overwritten by application with actual values -->
  <xsl:param name="calling" select="'SAMPLE_MOD'"/>
  <xsl:param name="called" select="'DCM4CHEE'"/>
  <xsl:param name="date" select="'20051206'"/>
  <xsl:param name="time" select="'115600.000'"/>
  <xsl:template match="/">
    <dataset>
      <!-- Scheduled Procedure Step Sequence -->
      <attr tag="00400100" vr="SQ">
        <item>
          <!-- Scheduled Procedure Step Sequence -->
          <attr tag="00400001" vr="AE">
            <xsl:value-of select="$calling"/>
          </attr>
          <!-- Scheduled Procedure Step Start Date -->
          <attr tag="00400002" vr="DA">
            <xsl:value-of select="$date"/>
          </attr>
          <!-- Scheduled Procedure Step Status -->
          <attr tag="00400020" vr="CS">
            <xsl:text>ARRIVED\READY</xsl:text>
          </attr>         
        </item>
      </attr>
     <!-- Issuer of Patient ID -->
     <attr tag="00100021" vr="LO">
      <xsl:text>DPSC</xsl:text>
      </attr>
    </dataset>
  </xsl:template>
</xsl:stylesheet>

Coercion to "Issuer of patient id" works fine, but I don't get any MWL RSP/records!! I can't see what is the sql query MWL SCP is performing to DB to get the results even though I have switched the log levels to DEBUG  and added log4j to include SQL as below...
   <!-- In order to get the SQL commands -->
     <category name="org.jboss.ejb.plugins.cmp.jdbc">
      <priority value="DEBUG"/>
   </category>

Can any one help me identify the issue? Is there a better way to filter MWL items based on facility, department, AE Groups or institution. Any pointers will surely help me, I could;t find any post relevant to fix/get it working. I've been banging my head against the wall for the past 12 hours trying to get this worked out. Does anyone have any suggestions?

Thanks for your advice!

Rajesh Kanattu

unread,
May 26, 2014, 12:07:42 AM5/26/14
to dcm...@googlegroups.com
Can some experts help me here?

fleetwoodfc

unread,
May 26, 2014, 9:30:50 AM5/26/14
to dcm...@googlegroups.com
Try removing this from your filter:

      <!-- Scheduled Procedure Step Sequence -->
     <attr tag="00400100" vr="SQ">
       <item>
         <!-- Scheduled Procedure Step Sequence -->
         <attr tag="00400001" vr="AE">
           <xsl:value-of select="$calling"/>
         </attr>
         <!-- Scheduled Procedure Step Start Date -->
         <attr tag="00400002" vr="DA">
           <xsl:value-of select="$date"/>
         </attr>
         <!-- Scheduled Procedure Step Status -->
         <attr tag="00400020" vr="CS">
           <xsl:text>ARRIVED\READY</xsl:text>
         </attr>        
        </item>
     </attr>



Rajesh Kanattu

unread,
May 26, 2014, 5:44:16 PM5/26/14
to dcm...@googlegroups.com
Thank you for the response fleetwoodfc!! Highly appreciated, I have been puzzling around with this issue.

No it doesn't work :(.

I have 2 mwl items in the DB with different Issuer of patientID. Modality queries with modality type, I wanted to filter MWL RSP with "Issuer of PatientID".

So under C:\apps\dcm4chee-2.17.2-mysql\server\default\conf\dcm4chee-ae\MODALITY ( where MODALITY is AET of SCU).

mwl-cfindrq.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" indent="no"/>
  <!-- overwritten by application with actual values -->
  <xsl:param name="calling" select="'SAMPLE_MOD'"/>
  <xsl:param name="called" select="'DCM4CHEE'"/>
  <xsl:param name="date" select="'20051206'"/>
  <xsl:param name="time" select="'115600.000'"/>
  <xsl:template match="/">
    <dataset>
      <!-- Issuer of Patient ID -->
       <attr tag="00100021" vr="LO">
        <xsl:text>DPSC_MUSSAFAH</xsl:text>
      </attr>
    </dataset>
  </xsl:template>
</xsl:stylesheet>

But I get all 2 items irrespective of specifying one in the coercian xml !!. 

attached are the server log and coercian xml. I don't see the filtering anywhere in the server log.  How does coercian works??

PS:I am using dcm4chee-2.17.2 with mysql.
20140527012251.619.mwl-cfindrq.xsl.in
20140527012251.619.mwl-cfindrq.xsl.out
server.log

Rajesh Kanattu

unread,
May 28, 2014, 12:03:45 AM5/28/14
to dcm...@googlegroups.com
I am still counting on you guys support..


On Sunday, 25 May 2014 10:13:48 UTC+4, Rajesh Kanattu wrote:

Rajesh Kanattu

unread,
May 28, 2014, 10:14:04 AM5/28/14
to dcm...@googlegroups.com
Anyone could help me please with this issue?

Marek Święcicki

unread,
May 29, 2014, 2:52:20 AM5/29/14
to dcm...@googlegroups.com
Well, i don't know why this is not working, but i could advice you to turn on logging.
In JMX Console take a peek at MWLFindSCP service, especially at LogAETitles and WriteCoercionXmlLog.
These will let you see exactly how cfindrq and cfindrsp look like, and also you will be able to check it before and after coercion (then .in and .out files)
I hope this, if not maybe directly solving your problem, will make it easier to find a solution.

Best regards
Marek

fleetwoodfc

unread,
May 29, 2014, 6:37:17 AM5/29/14
to dcm...@googlegroups.com
You do have an error showing in the server.log:
"ERROR -> (TCPServer-1) [org.dcm4chex.archive.dcm.mwlscp.MWLFindScpService] Error logging coercion:
java.lang.NullPointerException"

It might be caused by 'Issuer of Patient ID' being 13 characters in length (DICOM requires even number of chars for this VR).

Try:     
   <dataset>
     
<!-- Issuer of Patient ID -->
       
<attr tag="00100021" vr="LO">
       
<xsl:text>DPSC_MUSSAFAH </xsl:text>
     
</attr>
   
</dataset>


Rajesh Kanattu

unread,
May 29, 2014, 2:28:17 PM5/29/14
to dcm...@googlegroups.com
Thank you Marek,

Actually I have done the same, and I could the filter criteria is logged into the coercion out xml!! But the SQL query doesn't contain this criteria. Hows this possible...the log file attached shows the same, I had attached the coercion xmls as well as server logs.

I have coercion working for other attributes like Procedure Code, Admission ID,study instance id etc...Only for Issuer of Patient ID this doesn;t work. I agree that I have an Error logging coercion in the server log but it does works for other attributes...

Rajesh Kanattu

unread,
May 29, 2014, 2:33:02 PM5/29/14
to dcm...@googlegroups.com

I tried this, couldn't make it working..even if I have an error in the server log, I get the coercion xml correct but can't find this criteria being applied to the issued SQL!! Coercion works for other attributes like study instance id, Requested procedure, Admission ID etc.....Really breking my head!

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" indent="no"/>
  <!-- overwritten by application with actual values -->
  <xsl:param name="calling" select="'SAMPLE_MOD'"/>
  <xsl:param name="called" select="'DCM4CHEE'"/>
  <xsl:param name="date" select="'20051206'"/>
  <xsl:param name="time" select="'115600.000'"/>
  <xsl:template match="/">
  <dataset>
      <!-- Issuer of Patient ID -->
       <attr tag="00100021" vr="LO">
        <xsl:text>DPSCMUSSAFAH </xsl:text>
      </attr>
    </dataset>
  </xsl:template>
</xsl:stylesheet>


Algie Rosario

unread,
May 30, 2014, 4:35:23 AM5/30/14
to dcm...@googlegroups.com
Hi, did you get your mwl-cfindrq.xsl.in and xsl.out? 
thank you.

Rajesh Kanattu

unread,
May 30, 2014, 10:46:19 AM5/30/14
to dcm...@googlegroups.com
Thank you,

Yes,  mwl-cfindrq.xsl.in and xsl.out, with values filled(attached). I get the coercion xml correct but can't find this criteria being applied to the issued SQL!! Coercion works for other attributes like study instance id, Requested procedure, Admission ID etc...


/Rajesh
20140530184139.701.mwl-cfindrq.xsl.in
20140530184139.701.mwl-cfindrq.xsl.out

Rajesh Kanattu

unread,
Jun 1, 2014, 12:57:48 PM6/1/14
to dcm...@googlegroups.com
Can some one help me please here? I am looking for filtering MWL SCP results based on Issuer of Patient ID.
Reply all
Reply to author
Forward
0 new messages