HL7 Custom Functions
An important part of any HL7 integration project is the data mapping from one message format to another. TIBCO ActiveMatrix BusinessWorks™ offers advanced functionality in data mapping, including drag-and-drop and a comprehensive suite of built-in functions.
However, no matter how complete the built-in functions are, there is always a need to customize, especially in the healthcare industry. TIBCO ActiveMatrix BusinessWorks™ Plug-in for HL7 includes a useful set of custom functions.
See the TIBCO ActiveMatrix BusinessWorks™ documentation for detailed information on how to write, load, and use your own custom functions.
Using HL7 Custom Functions
TIBCO ActiveMatrix BusinessWorks™ Plug-in for HL7 includes a set of HL7-related custom functions, which are specified in the bwpluginhl7_HOME/resources/HL7CustomFunctions.class file.
Available HL7 Custom Functions
Function | Description and Sample Usage |
---|---|
HL7ToDisplayable |
Replaces \r with system line separator. Sample usage:HL7ToDisplayable($hl7Msg) |
currentTimeMillis |
Returns current time in milliseconds. |
currentTimeStamp |
Returns current timestamp in HL7 format: yyyyMMddhhmmss. |
deleteSegments |
Returns HL7 message after the specified segments are removed. Sample usage:deleteSegment($hl7Msg, "ZSH:EVN") Sample output:Message will have EVN and ZSH segments removed |
displayableToHL7 |
HL7 requires that all segments end with \r . This function converts DOS/UNIX format file into HL7 ER7 format. Sample usage:displayableToHL7($hl7MsgInDisplayFormat) |
extractField |
Extracts the indexed field from HL7 Message from the first segment with a given segment name. Sample usage:extractField($Hl7MsgString, $segmentName,$index ) |
generateNewGUID |
Generates Unique ID. |
separateMsgsFromBatch |
Returns individual messages in the batch by removing FHS/BHS/BTS/FTS segments. |
trimEmptyFields |
Trims empty fields from an HL7 message. |