001/*- 002 * #%L 003 * Smile CDR - CDR 004 * %% 005 * Copyright (C) 2016 - 2024 Smile CDR, Inc. 006 * %% 007 * All rights reserved. 008 * #L% 009 */ 010package ca.cdr.api.pub.hl7v2.common.abstraction; 011 012import ca.uhn.hl7v2.model.v25.segment.OBX; 013import ca.uhn.hl7v2.model.v25.segment.TXA; 014 015import java.util.ArrayList; 016import java.util.List; 017 018/** 019 * This class represents MDM_T01 and MDM_T02 messages, along with the trigger event, which informs what 020 * the intent of the message is. 021 */ 022public class DocumentManagementMessage implements IDocumentManagementMessage { 023 private TXA myTXA; 024 private List<OBX> myOBXAll; 025 private MdmTrigger myTrigger; 026 027 @Override 028 public TXA getTXA() { 029 return myTXA; 030 } 031 032 @Override 033 public List<OBX> getOBXAll() { 034 if (myOBXAll == null) { 035 myOBXAll = new ArrayList<>(); 036 } 037 return myOBXAll; 038 } 039 040 DocumentManagementMessage addObx(OBX theOBX) { 041 getOBXAll().add(theOBX); 042 return this; 043 } 044 045 DocumentManagementMessage setTXA(TXA theTXA) { 046 myTXA = theTXA; 047 return this; 048 } 049 050 void setTrigger(MdmTrigger theTrigger) { 051 myTrigger = theTrigger; 052 } 053 054 public MdmTrigger getTrigger() { 055 return myTrigger; 056 } 057}