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.List;
016
017public interface IDocumentManagementMessage {
018        TXA getTXA();
019
020        List<OBX> getOBXAll();
021
022        MdmTrigger getTrigger();
023
024        enum MdmTrigger {
025                T02,
026                T04,
027                T08,
028                T10,
029                T11;
030
031                public static MdmTrigger fromCode(String code) {
032                        for (MdmTrigger trigger : MdmTrigger.values()) {
033                                if (trigger.name().equalsIgnoreCase(code)) {
034                                        return trigger;
035                                }
036                        }
037                        throw new IllegalArgumentException("Unknown code: " + code);
038                }
039        }
040}