* @throws HL7Exception
*/
private Message populateResponseBefore25(Message response, AcknowledgmentCode acknowledgmentCode,
int repetition) throws HL7Exception {
// TODO define what should happen if there is no MSA or ERR
Segment msa = (Segment) response.get("MSA");
Terser.set(msa, 1, 0, 1, 1, acknowledgmentCode.name());
Terser.set(msa, 3, 0, 1, 1, errorCode.getMessage());
Segment err = (Segment) response.get("ERR");
if (location != null) {
if (location.getSegmentName() != null)
Terser.set(err, 1, repetition, 1, 1, location.getSegmentName());
if (location.getField() > 0)
Terser.set(err, 1, repetition, 3, 1, Integer.toString(location.getField()));