// The second OBX in the sample message has an extra subcomponent at
// OBX-3-1. This component is actually an ST, but the HL7 specification allows
// extra subcomponents to be tacked on to the end of a component. This is
// uncommon, but HAPI nontheless allows it.
ST observationIdentifier = obx.getObservationIdentifier().getIdentifier();
observationIdentifier.setValue("88304");
ST extraSubcomponent = new ST(message);
extraSubcomponent.setValue("MDT");
observationIdentifier.getExtraComponents().getComponent(0).setData(extraSubcomponent );
// The first OBX has a value type of TX. So first, we populate OBX-2 with "TX"...
obx.getValueType().setValue("TX");