Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

MWL SCU query params (mwl-cfindrq.xsl)

381 views
Skip to first unread message

enrique benedetti

unread,
Jun 4, 2014, 1:44:07 PM6/4/14
to dcm...@googlegroups.com
Hello

My goal is coerce the MWL SCU(client) raw query to limit response based on the queried
00400100/0040,0001 (Scheduled Station AE) value.

I can't use the AE_CALLING value and I need to use 1 mwl-cfindrq.xsl  file (instead of using
technique of folder per AET.)

for my test I use the dcmmwl utility to filter by aet and accession no:

>> c:\dcm4che\bin\dcmmwl PA...@192.168.1.2:11112 -device DR03 -aet DR37 -q00080050 X1200275

The result should be that mwl-cfindrq.xsl should see:

  AE_CALLING ($calling) has value: DR03
  00400100/00400001 (-aet) should have value: DR37
  q00080050 (Accession No) should have value: X1200275


Below is my test mwl-cfindrq.xsl that I have modified ONLY to PRINTLN field values for debugging:

<?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:param select="'AE_CALLING'" name="calling"/>
  <xsl:param select="'AE_CALLED'" name="called"/>
  <xsl:variable name="accession-no" select="normalize-space(attr[@tag='00080050'])"/>
  <xsl:template match="/">
    <dataset>
      <xsl:variable name="ss_eat1"      select="attr[@tag='00400001']"/>
      <xsl:variable name="ss_eat2"      select="attr[@tag='00400100/00400001']"/>
      <xsl:message>Accession No          = <xsl:value-of select="$accession-no"/>  </xsl:message>
      <xsl:message>Schedule Station AE 1 = <xsl:value-of select="$ss_eat1"/>  </xsl:message>
      <xsl:message>Schedule Station AE 2 = <xsl:value-of select="$ss_eat2"/>  </xsl:message>     
      <xsl:message>Calling AE            = <xsl:value-of select="$calling"/> </xsl:message>
      <xsl:message>Called  AE            = <xsl:value-of select="$called"/> </xsl:message>
    </dataset>
  </xsl:template>
</xsl:stylesheet>

if I tail server.log:

2014-06-04 12:57:16,824 ERROR DR03->PCA_PACS2 (TCPServer-1-1) [STDERR] Accession No          =
2014-06-04 12:57:16,825 ERROR DR03->PCA_PACS2 (TCPServer-1-1) [STDERR] Schedule Station AE 1 =
2014-06-04 12:57:16,825 ERROR DR03->PCA_PACS2 (TCPServer-1-1) [STDERR] Schedule Station AE 2 =
2014-06-04 12:57:16,825 ERROR DR03->PCA_PACS2 (TCPServer-1-1) [STDERR] Calling AE            = DR03
2014-06-04 12:57:16,826 ERROR DR03->PCA_PACS2 (TCPServer-1-1) [STDERR] Called  AE            = PCA_PACS2

notice that both the AccessionNO and Scheduled Station AE are empty :-(

I did activate the coercion logging and below is the output on the mwl-cfindrq.xsl.in.
notice that the file has the accession number and Scheduled Station AE Title
correctly populated with value DR37.


cat ../log/coercion/20140604125716.826.mwl-cfindrq.xsl.in

<?xml version="1.0" encoding="UTF-8"?><dataset>
<attr tag="00080050" vr="SH" pos="0" name="Accession Number" vm="1" len="8">X1200275</attr>
<attr tag="00080090" vr="PN" pos="16" name="Referring Physician's Name" vm="0" len="0"/>
<attr tag="00100010" vr="PN" pos="24" name="Patient's Name" vm="0" len="0"/>
<attr tag="00100020" vr="LO" pos="32" name="Patient ID" vm="0" len="0"/>
<attr tag="00100030" vr="DA" pos="40" name="Patient's Birth Date" vm="0" len="0"/>
<attr tag="00100040" vr="CS" pos="48" name="Patient's Sex" vm="0" len="0"/>
<attr tag="00101030" vr="DS" pos="56" name="Patient's Weight" vm="0" len="0"/>
<attr tag="00102000" vr="LO" pos="64" name="Medical Alerts" vm="0" len="0"/>
<attr tag="00102110" vr="LO" pos="72" name="Contrast Allergies" vm="0" len="0"/>
<attr tag="001021C0" vr="US" pos="80" name="Pregnancy Status" vm="0" len="0"/>
<attr tag="0020000D" vr="UI" pos="88" name="Study Instance UID" vm="0" len="0"/>
<attr tag="00321032" vr="PN" pos="96" name="Requesting Physician" vm="0" len="0"/>
<attr tag="00321033" vr="LO" pos="104" name="Requesting Service" vm="0" len="0"/>
<attr tag="00321060" vr="LO" pos="112" name="Requested Procedure Description" vm="0" len="0"/>
<attr tag="00321064" vr="SQ" pos="-1" name="Requested Procedure Code Sequence" len="-1">
<item id="1" pos="132" len="-1"/>
</attr>
<attr tag="00380010" vr="LO" pos="148" name="Admission ID" vm="0" len="0"/>
<attr tag="00380050" vr="LO" pos="156" name="Special Needs" vm="0" len="0"/>
<attr tag="00380300" vr="LO" pos="164" name="Current Patient Location" vm="0" len="0"/>
<attr tag="00380500" vr="LO" pos="172" name="Patient State" vm="0" len="0"/>
<attr tag="00400100" vr="SQ" pos="-1" name="Scheduled Procedure Step Sequence" len="-1">
<item id="1" pos="192" len="-1">
<attr tag="00080060" vr="CS" pos="200" name="Modality" vm="0" len="0"/>
<attr tag="00321070" vr="LO" pos="208" name="Requested Contrast Agent" vm="0" len="0"/>
<attr tag="00400001" vr="AE" pos="216" name="Scheduled Station AE Title" vm="1" len="4">DR37</attr>
<attr tag="00400002" vr="DA" pos="228" name="Scheduled Procedure Step Start Date" vm="0" len="0"/>
<attr tag="00400003" vr="TM" pos="236" name="Scheduled Procedure Step Start Time" vm="0" len="0"/>
<attr tag="00400006" vr="PN" pos="244" name="Scheduled Performing Physician's Name" vm="0" len="0"/>
<attr tag="00400007" vr="LO" pos="252" name="Scheduled Procedure Step Description" vm="0" len="0"/>
<attr tag="00400008" vr="SQ" pos="-1" name="Scheduled Protocol Code Sequence" len="-1">
<item id="1" pos="272" len="-1"/>
</attr>
<attr tag="00400009" vr="SH" pos="288" name="Scheduled Procedure Step ID" vm="0" len="0"/>
<attr tag="00400010" vr="SH" pos="296" name="Scheduled Station Name" vm="0" len="0"/>
<attr tag="00400011" vr="SH" pos="304" name="Scheduled Procedure Step Location" vm="0" len="0"/>
<attr tag="00400012" vr="LO" pos="312" name="Pre-Medication" vm="0" len="0"/>
<attr tag="00400020" vr="CS" pos="320" name="Scheduled Procedure Step Status" vm="0" len="0"/>
</item>
</attr>
<attr tag="00401001" vr="SH" pos="344" name="Requested Procedure ID" vm="0" len="0"/>
<attr tag="00401003" vr="SH" pos="352" name="Requested Procedure Priority" vm="0" len="0"/>
<attr tag="00401004" vr="LO" pos="360" name="Patient Transport Arrangements" vm="0" len="0"/>
<attr tag="00402016" vr="LO" pos="368" name="Placer Order Number / Imaging Service Request" vm="0" len="0"/>
<attr tag="00402017" vr="LO" pos="376" name="Filler Order Number / Imaging Service Request" vm="0" len="0"/>
<attr tag="00403001" vr="LO" pos="384" name="Confidentiality Constraint on Patient Data Description" vm="0" len="0"/>
</dataset>

Is there a way to get access to the raw query fields from the MWL SCU application ? In my case
I want to get access to param (or query value) that holds: Scheduled Station AE Title.

Thanks in advance,

Enrique




fleetwoodfc

unread,
Jun 4, 2014, 2:02:11 PM6/4/14
to dcm...@googlegroups.com
Try using variable names without separator characters ie do not use '_' or '-' in the name. I seem to remember that this causes an issue - but could well be wrong!

enrique benedetti

unread,
Jun 4, 2014, 3:01:54 PM6/4/14
to dcm...@googlegroups.com
Hello,

Thanks for the response. I did as you suggested, but no change in the output :(

Is there another approach to getting the MWL SCU query params ?

Thanks in advance,

fleetwoodfc

unread,
Jun 4, 2014, 6:48:39 PM6/4/14
to
Try:

<?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:param select="'AE_CALLING'" name="calling"/>
  <xsl:param select="'AE_CALLED'" name="called"/>
  <xsl:template match="/">
  <xsl:variable name="accessionno" select="normalize-space(attr[@tag='00080050'])"/>
    <dataset>
      <xsl:variable name="sseat1"      select="attr[@tag='00400001']"/>
      <xsl:variable name="sseat2"      select="attr[@tag='00400100']/item/attr[@tag='00400001']"/>
      <xsl:message>Accession No          = <xsl:value-of select="$accessionno"/>  </xsl:message>
      <xsl:message>Schedule Station AE 1 = <xsl:value-of select="$sseat1"/>  </xsl:message>
      <xsl:message>Schedule Station AE 2 = <xsl:value-of select="$sseat2"/>  </xsl:message>      

      <xsl:message>Calling AE            = <xsl:value-of select="$calling"/> </xsl:message>
      <xsl:message>Called  AE            = <xsl:value-of select="$called"/> </xsl:message>
    </dataset>
  </xsl:template>
</xsl:stylesheet>

enrique benedetti

unread,
Jun 4, 2014, 7:19:50 PM6/4/14
to dcm...@googlegroups.com
Hello,

I got it to work as shown below:

<?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:param select="'AE_CALLING'" name="calling"/>
  <xsl:param select="'AE_CALLED'"  name="called"/>
  <xsl:template match="/">
    <dataset>
      <xsl:variable name="accessionno" select="dataset/attr[@tag='00080050']"/>
      <xsl:variable name="bankno"      select="dataset/attr[@tag='00100020']"/>
      <xsl:variable name="aet"         select="normalize-space(dataset/attr/item/attr[@tag='00400001']"/>
      <xsl:message>1 Accession No          = <xsl:value-of select="$accessionno"/>  </xsl:message>
      <xsl:message>2 Bank No               = <xsl:value-of select="$bankno"/>  </xsl:message>
      <xsl:message>3 Calling AE            = <xsl:value-of select="$calling"/> </xsl:message>
      <xsl:message>4 Called  AE            = <xsl:value-of select="$called"/> </xsl:message>
      <xsl:message>5 Scheduled AE          = <xsl:value-of select="$aet"/> </xsl:message>

    </dataset>
  </xsl:template>
</xsl:stylesheet>

Thanks again for your help!

Best Regards

Enrique


On Wednesday, June 4, 2014 6:48:39 PM UTC-4, fleetwoodfc wrote:
Try:

<?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:param select="'AE_CALLING'" name="calling"/>
  <xsl:param select="'AE_CALLED'" name="called"/>
  <xsl:template match="/">
  <xsl:variable name="accessionno" select="normalize-space(attr[@tag='00080050'])"/>
    <dataset>
      <xsl:variable name="sseat1"      select="attr[@tag='00400001']"/>
      <xsl:variable name="sseat2"      select="attr[@tag='00400100']/item/attr[@tag='00400001']"/>
      <xsl:message>Accession No          = <xsl:value-of select="$accessionno"/>  </xsl:message>
      <xsl:message>Schedule Station AE 1 = <xsl:value-of select="$sseat1"/>  </xsl:message>
      <xsl:message>Schedule Station AE 2 = <xsl:value-of select="$sseat2"/>  </xsl:message>      
Reply all
Reply to author
Forward
0 new messages