1.2k questions
1.4k answers
361 comments
339 users
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);