1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
585 views
by brandon-w-8204 (34.1k points)
I want to move an SCH segment so it is after the MSH segment.

1 Answer

0 votes

Here is a code snippet to accomplish moving the SCH segment

// Retrieve the SCH Segment with its fields.
var schSegment = message.getNode('SCH');
// Remove the SCH segment from its current location
message.removeFirstNode('SCH');
// Add it back in after the MSH segement.
message.addChildAfter('MSH', 'SCH', schSegment);
by brandon-w-8204 (34.1k points)
...