Page tree
Skip to end of metadata
Go to start of metadata

Coercion Basics

Coercion is the process of manipulating DICOM tags during the incoming DICOM C-STORE to the OnePacs Gateway.  Coercion rules are defined as XSL transformations in <OPG_HOME>\server\default\conf\dcm4chee-ae\cstorerq.xsl. 

Applying coerced tags to instances forwarded to the cloud

In order for the forwarded instances to include the changes in the coercion rules, one of the following must be done.

Save the DICOM coercion changes to the instances before they are written to disk

The StoreSCP must be modified to set CoerceBeforeWrite to true.

  1. Log into the OnePacs Gateway Administrative Interface.
  2. Select service=StoreSCP
  3. Set CoerceBeforeWrite to true
  4. Apply changes

Coerce the outbound instances with the coerced values from the database

Alternatively, to leave the incoming files as-is and coerce the outbound instances, the <OPG_HOME>\server\default\conf\dcm4chee-ae\out-cstorerq.xsl file can be modified.  The following XSL in the dataset element would overwrite tag (0008,0050) with the value of the same tag in the database.

Modify outbound coercion in out-cstorerq.xsl

 

<attr tag="00080050" vr="SH">
    <xsl:value-of select="attr[@tag='00080050']"/>
</attr>

Example:  Fixing illegal DICOM tag (0028,0008) "Number of Frames" with value of -1

<xsl:if test="attr[@tag='00280008']=-1">
  <attr tag="00280008" vr="IS">1</attr>
</xsl:if>

 

Example:  Called AE Title

The following XSL could be added to the "dataset" element in the cstorerq.xsl file to place the called AE title into tag (0032,1021):

Example XSLT storing called AE title in tag (0032,1021)
<attr tag="00321021" vr="AE">
    <xsl:value-of select="$called"/>
</attr>

 

Example:  Calling AE Title

The following XSL could be added to the "dataset" element in the cstorerq.xsl file to place the calling AE title in tag (0032,1021):

Example XSLT storing calling AE title in tag (0032,1021)
<attr tag="00321021" vr="AE">
    <xsl:value-of select="$calling"/>
</attr>

 

 

Other tags, more complex rules

It's possible to use DICOM coercion to make more advanced manipulation of DICOM tags.  Please make sure you completely understand coercion rules and facility distribution rules before making custom DICOM coercion changes.

  • No labels