Data coercion rules


 

Data coercion rules insert, remove and modify values in DICOM attributes when the system first acquires the object, before it is initially registered. The rules are assigned to a specific registered device, and applied to all DICOM C-STORE messages arriving from that device. Coercion works for DICOM alpha-numeric attributes only. Multiple rules can exist for a single device, and are applied in the defined sequence.

 

To define coercion rules, go to the Devices page and click on the edit button, , of the device in the Devices table.  At the bottom of the DICOM Services page, the format of each rule is explained in the legend.  If you need the DICOM tag for a particular attribute, select it from the pull-down menu and click on Add Tag.  If the attribute is not available, enter it directly into the text box.  Complete the rule by typing the rest of the command.  When you have completed all the rules, click on Save.  

 

Note: data coercion rules do not propagate between servers.  If they are required on multiple eRAD PACS servers, you must make the change on each one.

 

The supported coercion rules are as follows:

 

General Syntax:

<lvalue>=<expression>

 

lvalues:

DICOM Tag – This is in the form, “(gggg,eeee)”. It represents the target attribute. After the expression is evaluated, the results are assigned to this attribute.

 

Expressions: Can be either a Value or a Function.

Values

Functions

In the evaluation of expressions, NULL is not the same as the empty string, “”. If a DICOM attribute does not exist, it is NULL. If it exists, but contains a 0-length value, it is the empty string, “”.

 

An example of a coercion rule to insert a prefix, “PFX”, before the Accession Number (0008,0050). If the attribute 0008,0050 exists, even if it contains a 0-length value, insert “PFX” into the beginning of the existing value and assign it back to the original attribute. If the original attribute does not exist, return NULL(), which prevents it from being added to the object.

 

(0008,0050)=if( (0008,0050) , concat(“PFX”,(0008,0050)) , NULL() )

 

Another example is to coerce a patient name, (0010,0010), defined as “LASTNAME,FIRSTNAME[,MI]” into DICOM-compliant syntax, “LASTNAME^FIRSTNAME[^MI]”. Note that the line break is inserted for readability only. To work, this needs to be entered on a single line.

 

(0010,0010)=concat(split((0010,0010), ”,”, 1), “^”, split((0010,0010), ”,”, 2),

if(split((0010,0010), ”,”, 3), “^”, “”), split((0010,0010), ”,”, 3) )