001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.exceptions.FHIRException; 056 057public enum MedicationknowledgePackageType { 058 059 /** 060 * null 061 */ 062 AMP, 063 /** 064 * null 065 */ 066 BAG, 067 /** 068 * null 069 */ 070 BLSTRPK, 071 /** 072 * null 073 */ 074 BOT, 075 /** 076 * null 077 */ 078 BOX, 079 /** 080 * null 081 */ 082 CAN, 083 /** 084 * null 085 */ 086 CART, 087 /** 088 * null 089 */ 090 DISK, 091 /** 092 * null 093 */ 094 DOSET, 095 /** 096 * null 097 */ 098 JAR, 099 /** 100 * null 101 */ 102 JUG, 103 /** 104 * null 105 */ 106 MINIM, 107 /** 108 * null 109 */ 110 NEBAMP, 111 /** 112 * null 113 */ 114 OVUL, 115 /** 116 * null 117 */ 118 PCH, 119 /** 120 * null 121 */ 122 PKT, 123 /** 124 * null 125 */ 126 SASH, 127 /** 128 * null 129 */ 130 STRIP, 131 /** 132 * null 133 */ 134 TIN, 135 /** 136 * null 137 */ 138 TUB, 139 /** 140 * null 141 */ 142 TUBE, 143 /** 144 * null 145 */ 146 VIAL, 147 /** 148 * added to help the parsers 149 */ 150 NULL; 151 public static MedicationknowledgePackageType fromCode(String codeString) throws FHIRException { 152 if (codeString == null || "".equals(codeString)) 153 return null; 154 if ("amp".equals(codeString)) 155 return AMP; 156 if ("bag".equals(codeString)) 157 return BAG; 158 if ("blstrpk".equals(codeString)) 159 return BLSTRPK; 160 if ("bot".equals(codeString)) 161 return BOT; 162 if ("box".equals(codeString)) 163 return BOX; 164 if ("can".equals(codeString)) 165 return CAN; 166 if ("cart".equals(codeString)) 167 return CART; 168 if ("disk".equals(codeString)) 169 return DISK; 170 if ("doset".equals(codeString)) 171 return DOSET; 172 if ("jar".equals(codeString)) 173 return JAR; 174 if ("jug".equals(codeString)) 175 return JUG; 176 if ("minim".equals(codeString)) 177 return MINIM; 178 if ("nebamp".equals(codeString)) 179 return NEBAMP; 180 if ("ovul".equals(codeString)) 181 return OVUL; 182 if ("pch".equals(codeString)) 183 return PCH; 184 if ("pkt".equals(codeString)) 185 return PKT; 186 if ("sash".equals(codeString)) 187 return SASH; 188 if ("strip".equals(codeString)) 189 return STRIP; 190 if ("tin".equals(codeString)) 191 return TIN; 192 if ("tub".equals(codeString)) 193 return TUB; 194 if ("tube".equals(codeString)) 195 return TUBE; 196 if ("vial".equals(codeString)) 197 return VIAL; 198 throw new FHIRException("Unknown MedicationknowledgePackageType code '"+codeString+"'"); 199 } 200 public String toCode() { 201 switch (this) { 202 case AMP: return "amp"; 203 case BAG: return "bag"; 204 case BLSTRPK: return "blstrpk"; 205 case BOT: return "bot"; 206 case BOX: return "box"; 207 case CAN: return "can"; 208 case CART: return "cart"; 209 case DISK: return "disk"; 210 case DOSET: return "doset"; 211 case JAR: return "jar"; 212 case JUG: return "jug"; 213 case MINIM: return "minim"; 214 case NEBAMP: return "nebamp"; 215 case OVUL: return "ovul"; 216 case PCH: return "pch"; 217 case PKT: return "pkt"; 218 case SASH: return "sash"; 219 case STRIP: return "strip"; 220 case TIN: return "tin"; 221 case TUB: return "tub"; 222 case TUBE: return "tube"; 223 case VIAL: return "vial"; 224 default: return "?"; 225 } 226 } 227 public String getSystem() { 228 return "http://terminology.hl7.org/CodeSystem/medicationknowledge-package-type"; 229 } 230 public String getDefinition() { 231 switch (this) { 232 case AMP: return ""; 233 case BAG: return ""; 234 case BLSTRPK: return ""; 235 case BOT: return ""; 236 case BOX: return ""; 237 case CAN: return ""; 238 case CART: return ""; 239 case DISK: return ""; 240 case DOSET: return ""; 241 case JAR: return ""; 242 case JUG: return ""; 243 case MINIM: return ""; 244 case NEBAMP: return ""; 245 case OVUL: return ""; 246 case PCH: return ""; 247 case PKT: return ""; 248 case SASH: return ""; 249 case STRIP: return ""; 250 case TIN: return ""; 251 case TUB: return ""; 252 case TUBE: return ""; 253 case VIAL: return ""; 254 default: return "?"; 255 } 256 } 257 public String getDisplay() { 258 switch (this) { 259 case AMP: return "Ampule"; 260 case BAG: return "Bag"; 261 case BLSTRPK: return "Blister Pack"; 262 case BOT: return "Bottle"; 263 case BOX: return "Box"; 264 case CAN: return "Can"; 265 case CART: return "Cartridge"; 266 case DISK: return "Disk"; 267 case DOSET: return "Dosette"; 268 case JAR: return "Jar"; 269 case JUG: return "Jug"; 270 case MINIM: return "Minim"; 271 case NEBAMP: return "Nebule Amp"; 272 case OVUL: return "Ovule"; 273 case PCH: return "Pouch"; 274 case PKT: return "Packet"; 275 case SASH: return "Sashet"; 276 case STRIP: return "Strip"; 277 case TIN: return "Tin"; 278 case TUB: return "Tub"; 279 case TUBE: return "Tube"; 280 case VIAL: return "Vial"; 281 default: return "?"; 282 } 283 } 284 285 286} 287