Replace stylesheet hl7-order2dcm.xsl by custom stylesheet

190 views
Skip to first unread message

Ze Ay

unread,
Jun 3, 2020, 11:44:24 AM6/3/20
to dcm...@googlegroups.com
I tried to create a new stylesheet to add some more tags like weight or size similar to the stylesheet hl7-order2dcm.xsl and also created a rule.

https://github.com/dcm4che/dcm4chee-arc-light/wiki/Coerce-received-DICOM-objects-attributes-by-XSLT

Unfortunately the stylesheet is not used when new Hl7 messages arrive.

In the example the „ Merge from MWL stylesheet example“ is explained.

My question would be, which parameters I have to enter for my use case no matter if LDAP or in gui.

Vrinda Nayak

unread,
Jun 4, 2020, 4:00:04 AM6/4/20
to dcm4che
hl7order2dcm.xsl is applied when archive receives HL7 order messages to transform them into corresponding MWL Items. It is not related to feature explained in https://github.com/dcm4che/dcm4chee-arc-light/wiki/Coerce-received-DICOM-objects-attributes-by-XSLT. The feature explained in the link is to coerce the attributes of the received DICOM objects using stylesheets. What exactly is your use case?

Ze Ay

unread,
Jun 4, 2020, 9:30:36 AM6/4/20
to dcm4che
I noticed that I looked in the wrong place and misunderstood the use case.

I didn't want to overwrite the original (hl7-order2dcm.xsl) stylesheet but create a new one. I did that and changed the entry in LDAP to this stylesheet.

Background was, that in a hospital both the RIS and the HIS send HL7 messages to the Pacs.

In the stylesheet there is now a differentiated treatment, depending on which system the message is received from, based on certain factors.

In the future we will place a com server in front of the pacs to standardize the HL7 messages.

Thiago Sena

unread,
Jun 8, 2020, 8:13:57 PM6/8/20
to dcm4che
Ze Ay, did you manage to put the patient's height and weight in the hl7 message?

I tried to put this code snippet inside the xml but it didn't work.
<xsl:template match="OBX[1]">
    <xsl:call-template name="attr">
      <xsl:with-param name="tag" select="'00101030'"/>
      <xsl:with-param name="vr" select="'DS'"/>
      <xsl:with-param name="val" select="string(field[5]/text())"/>
    </xsl:call-template>
</xsl:template>

Ze Ay

unread,
Jun 9, 2020, 6:41:46 AM6/9/20
to dcm4che
Thiago Sena this the beginnging of my hl7-order2dcm.xsl
I added first to choose the template. In my case OBX[1] and OBX[2].


<?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"/>
<xsl:include href="hl7-common.xsl"/>
<xsl:param name="hl7ScheduledProtocolCodeInOrder"/>
<xsl:param name="hl7ScheduledStationAETInOrder"/>

<xsl:template match="/hl7">
<NativeDicomModel>
<xsl:apply-templates select="PID"/>
<xsl:apply-templates select="PV1"/>
<xsl:apply-templates select="ORC[1]"/>
<xsl:apply-templates select="OBR[1]"/>
<xsl:apply-templates select="TQ1[1]"/>
<xsl:apply-templates select="OBX[1]"/>
<xsl:apply-templates select="OBX[2]"/>

<!-- Scheduled Procedure Step Sequence -->
<DicomAttribute tag="00400100" vr="SQ">
<xsl:apply-templates select="ORC" mode="sps"/>
</DicomAttribute>
<xsl:apply-templates select="ZDS"/>
</NativeDicomModel>
</xsl:template>


<xsl:template match="OBX[1]">

<!-- Patient's Size -->
<xsl:call-template name="attr">
<xsl:with-param name="tag" select="'00101020'"/>


<xsl:with-param name="vr" select="'DS'"/>
<xsl:with-param name="val" select="string(field[5]/text())"/>
</xsl:call-template>
</xsl:template>

<xsl:template match="OBX[2]">
<!-- Patient's Weight -->

Thiago Sena

unread,
Jun 9, 2020, 9:36:25 AM6/9/20
to dcm4che
Thank you very much Ze Ay, it worked perfectly.

Johnson F

unread,
Sep 14, 2021, 3:59:54 AM9/14/21
to dcm4che
hello sena, can you please explain and let me know steps required to add patient weight, height to hl7 message

where to add above mappings

Reply all
Reply to author
Forward
0 new messages