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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 033 034import org.hl7.fhir.exceptions.FHIRException; 035 036public enum ActionRelationshipType { 037 038 /** 039 * The action must be performed before the start of the related action. 040 */ 041 BEFORESTART, 042 /** 043 * The action must be performed before the related action. 044 */ 045 BEFORE, 046 /** 047 * The action must be performed before the end of the related action. 048 */ 049 BEFOREEND, 050 /** 051 * The action must be performed concurrent with the start of the related action. 052 */ 053 CONCURRENTWITHSTART, 054 /** 055 * The action must be performed concurrent with the related action. 056 */ 057 CONCURRENT, 058 /** 059 * The action must be performed concurrent with the end of the related action. 060 */ 061 CONCURRENTWITHEND, 062 /** 063 * The action must be performed after the start of the related action. 064 */ 065 AFTERSTART, 066 /** 067 * The action must be performed after the related action. 068 */ 069 AFTER, 070 /** 071 * The action must be performed after the end of the related action. 072 */ 073 AFTEREND, 074 /** 075 * added to help the parsers 076 */ 077 NULL; 078 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 103 public String toCode() { 104 switch (this) { 105 case BEFORESTART: 106 return "before-start"; 107 case BEFORE: 108 return "before"; 109 case BEFOREEND: 110 return "before-end"; 111 case CONCURRENTWITHSTART: 112 return "concurrent-with-start"; 113 case CONCURRENT: 114 return "concurrent"; 115 case CONCURRENTWITHEND: 116 return "concurrent-with-end"; 117 case AFTERSTART: 118 return "after-start"; 119 case AFTER: 120 return "after"; 121 case AFTEREND: 122 return "after-end"; 123 case NULL: 124 return null; 125 default: 126 return "?"; 127 } 128 } 129 130 public String getSystem() { 131 return "http://hl7.org/fhir/action-relationship-type"; 132 } 133 134 public String getDefinition() { 135 switch (this) { 136 case BEFORESTART: 137 return "The action must be performed before the start of the related action."; 138 case BEFORE: 139 return "The action must be performed before the related action."; 140 case BEFOREEND: 141 return "The action must be performed before the end of the related action."; 142 case CONCURRENTWITHSTART: 143 return "The action must be performed concurrent with the start of the related action."; 144 case CONCURRENT: 145 return "The action must be performed concurrent with the related action."; 146 case CONCURRENTWITHEND: 147 return "The action must be performed concurrent with the end of the related action."; 148 case AFTERSTART: 149 return "The action must be performed after the start of the related action."; 150 case AFTER: 151 return "The action must be performed after the related action."; 152 case AFTEREND: 153 return "The action must be performed after the end of the related action."; 154 case NULL: 155 return null; 156 default: 157 return "?"; 158 } 159 } 160 161 public String getDisplay() { 162 switch (this) { 163 case BEFORESTART: 164 return "Before Start"; 165 case BEFORE: 166 return "Before"; 167 case BEFOREEND: 168 return "Before End"; 169 case CONCURRENTWITHSTART: 170 return "Concurrent With Start"; 171 case CONCURRENT: 172 return "Concurrent"; 173 case CONCURRENTWITHEND: 174 return "Concurrent With End"; 175 case AFTERSTART: 176 return "After Start"; 177 case AFTER: 178 return "After"; 179 case AFTEREND: 180 return "After End"; 181 case NULL: 182 return null; 183 default: 184 return "?"; 185 } 186 } 187 188}