coerced mwl-cfindrsp.xsl.out file

492 views
Skip to first unread message

Sven N.

unread,
Jul 25, 2013, 11:49:26 AM7/25/13
to
my task is to modify the response of dcm4chee that is being sent back to the modality after a worklist request. i'm using attribute coercion.

this is how far i got my dcm4chee:
- i get my modality logged in the directory server/default/log/AETitle
- i get those .in/.out files that are being created during coercion in the directory server/default/log/coercion

the generated <timestamp>-mwl-cfindrsp.xml file (in log/AETitle directory) and the <timestamp>.mwl-cfindrsp.xsl.in (log/coercion directory) seem to be identical.

my problem is that the <timestamp>.mwl-cfindrsp.xsl.out file only contains my coerced attribute and not the .in file merged with the coerced attributes. where can i find the full response that is sent back to the modality?

my coercion file mwl-cfindrsp.xsl (in directory server/default/conf/dcm4chee-ae) is this:

<?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"/>
<xsl:template match="/">
   <dataset>
      <attr tag="00080005" vr="CS">
         <xsl:text>ISO_IR 123</xsl:text>  <!-- 100=LATIN1, 192=UTF8 -->
      </attr>
   </dataset>
</xsl:template>
</xsl:stylesheet>

note: i used ISO_IR 123 on purpose, this makes it easier to see whether my changes have an effect or not.

<timestamp>.mwl-cfindrq.xsl.in is 5k in size and contains all the tags from the request, some of them filled with values. i'm sending the worklist request from a pc running DVTk Modality Emulator.

but:

<timestamp>.mwl-cfindrsp.xsl.out contains only 162 bytes, mirroring only my coerced attribute:

<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<attr tag="00080005" vr="CS" pos="-1" name="Specific Character Set" vm="1" len="10">ISO_IR 123</attr>
</dataset>

where has the rest from the .in file gone?

i guess i'm missing some more instructions in my .xsl file, but google couldn't point me to a tutorial on attribute coercion, so i'm a bit lost now.


any hints?



ps: adding this to my .xsl file didn't lead to a different result, i was expecting this would copy all attributes from the .in file (i'm a n00b in this topic):

<xsl:template match="node() | @*">
    <xsl:copy>
        <xsl:apply-templates select="node() | @*"/>
    </xsl:copy>
</xsl:template>

fleetwoodfc

unread,
Jul 25, 2013, 2:15:15 PM7/25/13
to dcm...@googlegroups.com
You can set the log level to DEBUG and look at the server.log output - I don't know if the code checks for a valid 'Specific Character Set' value.

Sven N.

unread,
Jul 26, 2013, 1:16:47 AM7/26/13
to


On Thursday, 25 July 2013 20:15:15 UTC+2, fleetwoodfc wrote:
You can set the log level to DEBUG and look at the server.log output - I don't know if the code checks for a valid 'Specific Character Set' value.

maybe i should've mentioned that, sorry: setting the encoding to "ISO_IR 100" or "ISO_IR 192", both are valid charsets, results in the same small .out file, it contains only this one attribute, all other attributes found in the .in file are missing in the .out file.

the idea is NOT to explicitly add all attributes (found in the request/.in file) to the .xsl file in order to not lose them in the response/.out file.

or is this the only way it works?

adding a 2nd attribute to the .xsl will lead to a .out file containing no more than exactly these 2 attributes:

.xsl file:

<?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"/>
<xsl:template match="/">
   <dataset>
      <attr tag="00080005" vr="CS">
         <xsl:text>ISO_IR 123</xsl:text>  <!-- 100=LATIN1, 192=UTF8 -->
      </attr>
      <attr tag="00100040" vr="CS">
         <xsl:text>M</xsl:text>  <!-- M)ale  F)emale -->
      </attr>
   </dataset>
</xsl:template>
</xsl:stylesheet>

.out file:

<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<attr tag="00080005" vr="CS" pos="-1" name="Specific Character Set" vm="1" len="10">ISO_IR 123</attr>
<attr tag="00100040" vr="CS" pos="-1" name="Patient's Sex" vm="1" len="1">M</attr>
</dataset>

how do i get ALL attributes from the worklist request in my .out file? (whithout having to add ALL of them to my .xsl file)

Sven N.

unread,
Jul 29, 2013, 8:48:44 AM7/29/13
to dcm...@googlegroups.com
found the problem, i was missing the identity rule, resp. it was probably at the wrong position in my xsl file. this piece of code is now my first match, all other transformations follow after:

<!-- identity rule first -->
<xsl:template match="node() | @*">
    <xsl:copy>
        <xsl:apply-templates select="node() | @*"/>
    </xsl:copy>
</xsl:template>

<!-- other modifications go here -->

this way it works for me.

Algie Rosario

unread,
Jun 4, 2014, 12:03:25 AM6/4/14
to
Hi Sven, just want to ask. I have my mwl-sfindrq.xls inside MOD-AET folder, but i dont have mwl-sfindrsp.xls. But i have mwl-cfindrsp2cstorerq.xls outside the MOD-AET folder.

Does mwl-cfindrsp and mwl-cfindrsp2cstrerq.xsl are the same. Thank you.

Thanks, any help would be greatfully accepted.


On Thursday, July 25, 2013 11:08:29 PM UTC+8, Sven N. wrote:
my task is to modify the response of dcm4chee that is being sent back to the modality after a worklist request. i'm using attribute coercion.

this is how far i got my dcm4chee:
- i get my modality logged in the directory server/default/log/AETitle
- i get those .in/.out files that are being created during coercion in the directory server/default/log/coercion

the generated <timestamp>-mwl-cfindrsp.xml file (in log/AETitle directory) and the <timestamp>.mwl-cfindrsp.xsl.in (log/coercion directory) seem to be identical.

my problem is that the <timestamp>.mwl-cfindrsp.xsl.out file only contains my coerced attribute and not the .in file merged with the coerced attributes. where can i find the full response that is sent back to the modality?

my coercion file mwl-cfindrsp.xsl (in directory server/default/conf/dcm4chee-ae) is this:

<?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"/>
<xsl:template match="/">
   <dataset>
      <attr tag="00080005" vr="CS">
         <xsl:text>ISO_IR 123</xsl:text>  <!-- 100=LATIN1, 192=UTF8 -->
      </attr>
   </dataset>
</xsl:template>
</xsl:stylesheet>
note: i used ISO_IR 123 on purpose, this makes it easier to see whether my changes have an effect or not.

<timestamp>.mwl-cfindrq.xsl.in is 5k in size and contains all the tags from the request, some of them filled with values. i'm sending the worklist request from a pc running DVTk Modality Emulator.

but:

<timestamp>.mwl-cfindrsp.xsl.out contains only 162 bytes, mirroring only my coerced attribute:

<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<attr tag="00080005" vr="CS" pos="-1" name="Specific Character Set" vm="1" len="10">ISO_IR 123</attr>
</dataset>

where has the rest from the .in file gone?

i guess i'm missing some more instructions in my .xsl file, but google couldn't point me to a tutorial on attribute coercion, so i'm a bit lost now.


any hints?



ps: adding this to my .xsl file didn't lead to a different result, i was expecting this would copy all attributes from the .in file (i'm a n00b in this topic):

Reply all
Reply to author
Forward
0 new messages