package org.hl7.fhir.dstu3.model.codesystems; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 import org.hl7.fhir.exceptions.FHIRException; public enum ActionRelationshipType { /** * The action must be performed before the start of the related action */ BEFORESTART, /** * The action must be performed before the related action */ BEFORE, /** * The action must be performed before the end of the related action */ BEFOREEND, /** * The action must be performed concurrent with the start of the related action */ CONCURRENTWITHSTART, /** * The action must be performed concurrent with the related action */ CONCURRENT, /** * The action must be performed concurrent with the end of the related action */ CONCURRENTWITHEND, /** * The action must be performed after the start of the related action */ AFTERSTART, /** * The action must be performed after the related action */ AFTER, /** * The action must be performed after the end of the related action */ AFTEREND, /** * added to help the parsers */ NULL; public static ActionRelationshipType fromCode(String codeString) throws FHIRException { if (codeString == null || "".equals(codeString)) return null; if ("before-start".equals(codeString)) return BEFORESTART; if ("before".equals(codeString)) return BEFORE; if ("before-end".equals(codeString)) return BEFOREEND; if ("concurrent-with-start".equals(codeString)) return CONCURRENTWITHSTART; if ("concurrent".equals(codeString)) return CONCURRENT; if ("concurrent-with-end".equals(codeString)) return CONCURRENTWITHEND; if ("after-start".equals(codeString)) return AFTERSTART; if ("after".equals(codeString)) return AFTER; if ("after-end".equals(codeString)) return AFTEREND; throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); } public String toCode() { switch (this) { case BEFORESTART: return "before-start"; case BEFORE: return "before"; case BEFOREEND: return "before-end"; case CONCURRENTWITHSTART: return "concurrent-with-start"; case CONCURRENT: return "concurrent"; case CONCURRENTWITHEND: return "concurrent-with-end"; case AFTERSTART: return "after-start"; case AFTER: return "after"; case AFTEREND: return "after-end"; default: return "?"; } } public String getSystem() { return "http://hl7.org/fhir/action-relationship-type"; } public String getDefinition() { switch (this) { case BEFORESTART: return "The action must be performed before the start of the related action"; case BEFORE: return "The action must be performed before the related action"; case BEFOREEND: return "The action must be performed before the end of the related action"; case CONCURRENTWITHSTART: return "The action must be performed concurrent with the start of the related action"; case CONCURRENT: return "The action must be performed concurrent with the related action"; case CONCURRENTWITHEND: return "The action must be performed concurrent with the end of the related action"; case AFTERSTART: return "The action must be performed after the start of the related action"; case AFTER: return "The action must be performed after the related action"; case AFTEREND: return "The action must be performed after the end of the related action"; default: return "?"; } } public String getDisplay() { switch (this) { case BEFORESTART: return "Before Start"; case BEFORE: return "Before"; case BEFOREEND: return "Before End"; case CONCURRENTWITHSTART: return "Concurrent With Start"; case CONCURRENT: return "Concurrent"; case CONCURRENTWITHEND: return "Concurrent With End"; case AFTERSTART: return "After Start"; case AFTER: return "After"; case AFTEREND: return "After End"; default: return "?"; } } }