Saltar al contenido principal

HL7 Transform

Category: Healthcare Standards
Node id: hl7-transform

Standards: HIPAA, GDPR, SOC2

Transforms HL7v2 messages by modifying fields, segments, applying value mappings, or executing conditional rules

What it does​

  • Field-level transformations: set, append, prepend, replace, remove, uppercase, lowercase, trim
  • Segment-level operations: add, remove, reorder
  • Value mapping with dictionary-based substitution
  • Conditional rule engine with field value evaluation
  • Regex-based field replacement
  • Configurable segment insertion position (start, end, after)

Use cases​

  • Modify HL7 messages to comply with downstream system requirements
  • Map coded values between sending and receiving systems
  • Add or remove segments for interface compatibility
  • Apply conditional transformations based on message content

Runtime​

  • Performance tier: fast

Input ports​

NameTypeRequiredDescription
messagetextYesRaw HL7v2 message string
valuetextNoOverride value for field transformation

Output ports​

NameTypeRequiredDescription
resultjsonNoTransform result (message, original, segment_count, transformed)
successbooleanNoWhether the transformation succeeded

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Transform Typetransform_typeenumYesfieldfield, segment, mapping, rulesType of transformation to apply
Segment IDsegment_idstringNoTarget segment ID (e.g., MSH, PID, PV1)
Field Numberfield_numbernumberNomin 11-based field number within the segment
ActionactionenumNoset, append, prepend, replace, remove, uppercase, lowercase, trim, add, reorderAction to perform on the field or segment
ValuevaluestringNoValue to set, or pattern->replacement for replace action

Advanced​

SettingNameTypeRequiredDefaultAllowed valuesDescription
MappingsmappingsjsonNoArray of value mapping definitions for mapping transform type
RulesrulesjsonNoArray of conditional transformation rules
Segment Ordersegment_orderjsonNoDesired segment order for reorder action
PositionpositionenumNoendstart, end, afterInsert position for segment add action
After Segmentafter_segmentstringNoSegment ID to insert after (when position is 'after')
FieldsfieldsjsonNoField values for new segment (segment add action)

Errors​

CodeDescription
MESSAGE_REQUIREDHL7 message input is missing
PARSE_FAILEDHL7 message could not be parsed
SEGMENT_NOT_FOUNDTarget segment ID not found in message
INVALID_REGEXReplace action contains an invalid regex pattern

Runtime notes​

  • result.message contains the rebuilt HL7 string — wire it to downstream HL7 nodes
  • result.original preserves the input for diff/audit; both are full HL7 message strings
  • For replace action, use 'pattern->replacement' syntax in value (regex supported)
  • Mapping transform applies value_map substitution only when the current field value matches a key

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..