messageType = ( (ca.uhn.hl7v2.model.v22.segment.MSH) structure ).getMessageType().encode(); } else if ( structure instanceof ca.uhn.hl7v2.model.v23.segment.MSH ) { messageType = ( (ca.uhn.hl7v2.model.v23.segment.MSH) structure ).getMessageType().encode(); } else if ( structure instanceof ca.uhn.hl7v2.model.v231.segment.MSH ) { messageType =