001package org.hl7.fhir.r4.model.codesystems; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum ActionRelationshipType { 038 039 /** 040 * The action must be performed before the start of the related action. 041 */ 042 BEFORESTART, 043 /** 044 * The action must be performed before the related action. 045 */ 046 BEFORE, 047 /** 048 * The action must be performed before the end of the related action. 049 */ 050 BEFOREEND, 051 /** 052 * The action must be performed concurrent with the start of the related action. 053 */ 054 CONCURRENTWITHSTART, 055 /** 056 * The action must be performed concurrent with the related action. 057 */ 058 CONCURRENT, 059 /** 060 * The action must be performed concurrent with the end of the related action. 061 */ 062 CONCURRENTWITHEND, 063 /** 064 * The action must be performed after the start of the related action. 065 */ 066 AFTERSTART, 067 /** 068 * The action must be performed after the related action. 069 */ 070 AFTER, 071 /** 072 * The action must be performed after the end of the related action. 073 */ 074 AFTEREND, 075 /** 076 * added to help the parsers 077 */ 078 NULL; 079 public static ActionRelationshipType fromCode(String codeString) throws FHIRException { 080 if (codeString == null || "".equals(codeString)) 081 return null; 082 if ("before-start".equals(codeString)) 083 return BEFORESTART; 084 if ("before".equals(codeString)) 085 return BEFORE; 086 if ("before-end".equals(codeString)) 087 return BEFOREEND; 088 if ("concurrent-with-start".equals(codeString)) 089 return CONCURRENTWITHSTART; 090 if ("concurrent".equals(codeString)) 091 return CONCURRENT; 092 if ("concurrent-with-end".equals(codeString)) 093 return CONCURRENTWITHEND; 094 if ("after-start".equals(codeString)) 095 return AFTERSTART; 096 if ("after".equals(codeString)) 097 return AFTER; 098 if ("after-end".equals(codeString)) 099 return AFTEREND; 100 throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); 101 } 102 public String toCode() { 103 switch (this) { 104 case BEFORESTART: return "before-start"; 105 case BEFORE: return "before"; 106 case BEFOREEND: return "before-end"; 107 case CONCURRENTWITHSTART: return "concurrent-with-start"; 108 case CONCURRENT: return "concurrent"; 109 case CONCURRENTWITHEND: return "concurrent-with-end"; 110 case AFTERSTART: return "after-start"; 111 case AFTER: return "after"; 112 case AFTEREND: return "after-end"; 113 default: return "?"; 114 } 115 } 116 public String getSystem() { 117 return "http://hl7.org/fhir/action-relationship-type"; 118 } 119 public String getDefinition() { 120 switch (this) { 121 case BEFORESTART: return "The action must be performed before the start of the related action."; 122 case BEFORE: return "The action must be performed before the related action."; 123 case BEFOREEND: return "The action must be performed before the end of the related action."; 124 case CONCURRENTWITHSTART: return "The action must be performed concurrent with the start of the related action."; 125 case CONCURRENT: return "The action must be performed concurrent with the related action."; 126 case CONCURRENTWITHEND: return "The action must be performed concurrent with the end of the related action."; 127 case AFTERSTART: return "The action must be performed after the start of the related action."; 128 case AFTER: return "The action must be performed after the related action."; 129 case AFTEREND: return "The action must be performed after the end of the related action."; 130 default: return "?"; 131 } 132 } 133 public String getDisplay() { 134 switch (this) { 135 case BEFORESTART: return "Before Start"; 136 case BEFORE: return "Before"; 137 case BEFOREEND: return "Before End"; 138 case CONCURRENTWITHSTART: return "Concurrent With Start"; 139 case CONCURRENT: return "Concurrent"; 140 case CONCURRENTWITHEND: return "Concurrent With End"; 141 case AFTERSTART: return "After Start"; 142 case AFTER: return "After"; 143 case AFTEREND: return "After End"; 144 default: return "?"; 145 } 146 } 147 148 149} 150