Purpose
For replacing matching target sub-string in a source string, with a new replacement sub-string. A source string can be a static string value or a reference to a data element.
Format
REPLACE(source-value, target-sub-string, replacement-string)
Example
The following config entry in am HL7DataTransformer handler replaces the word “works” to “rocks” in the MSH-3 field.
<Parameter>
<!-- REPLACE Example -->
<Name>transformation-rule</Name>
<Value>$MSH-3=>REPLACE($MSH-3, "works", "rocks")</Value>
</Parameter>
Input | Outcome |
MSH|^~\&|Foldda-works|| | MSH|^~\&|Foldda-rocks|| |
Related
Nil.