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