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, Dec 27, 2018 10:06-0500 for FHIR v4.0.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum MedicationknowledgePackageType {
038
039        /**
040         * null
041         */
042        AMP, 
043        /**
044         * null
045         */
046        BAG, 
047        /**
048         * null
049         */
050        BLSTRPK, 
051        /**
052         * null
053         */
054        BOT, 
055        /**
056         * null
057         */
058        BOX, 
059        /**
060         * null
061         */
062        CAN, 
063        /**
064         * null
065         */
066        CART, 
067        /**
068         * null
069         */
070        DISK, 
071        /**
072         * null
073         */
074        DOSET, 
075        /**
076         * null
077         */
078        JAR, 
079        /**
080         * null
081         */
082        JUG, 
083        /**
084         * null
085         */
086        MINIM, 
087        /**
088         * null
089         */
090        NEBAMP, 
091        /**
092         * null
093         */
094        OVUL, 
095        /**
096         * null
097         */
098        PCH, 
099        /**
100         * null
101         */
102        PKT, 
103        /**
104         * null
105         */
106        SASH, 
107        /**
108         * null
109         */
110        STRIP, 
111        /**
112         * null
113         */
114        TIN, 
115        /**
116         * null
117         */
118        TUB, 
119        /**
120         * null
121         */
122        TUBE, 
123        /**
124         * null
125         */
126        VIAL, 
127        /**
128         * added to help the parsers
129         */
130        NULL;
131        public static MedicationknowledgePackageType fromCode(String codeString) throws FHIRException {
132            if (codeString == null || "".equals(codeString))
133                return null;
134        if ("amp".equals(codeString))
135          return AMP;
136        if ("bag".equals(codeString))
137          return BAG;
138        if ("blstrpk".equals(codeString))
139          return BLSTRPK;
140        if ("bot".equals(codeString))
141          return BOT;
142        if ("box".equals(codeString))
143          return BOX;
144        if ("can".equals(codeString))
145          return CAN;
146        if ("cart".equals(codeString))
147          return CART;
148        if ("disk".equals(codeString))
149          return DISK;
150        if ("doset".equals(codeString))
151          return DOSET;
152        if ("jar".equals(codeString))
153          return JAR;
154        if ("jug".equals(codeString))
155          return JUG;
156        if ("minim".equals(codeString))
157          return MINIM;
158        if ("nebamp".equals(codeString))
159          return NEBAMP;
160        if ("ovul".equals(codeString))
161          return OVUL;
162        if ("pch".equals(codeString))
163          return PCH;
164        if ("pkt".equals(codeString))
165          return PKT;
166        if ("sash".equals(codeString))
167          return SASH;
168        if ("strip".equals(codeString))
169          return STRIP;
170        if ("tin".equals(codeString))
171          return TIN;
172        if ("tub".equals(codeString))
173          return TUB;
174        if ("tube".equals(codeString))
175          return TUBE;
176        if ("vial".equals(codeString))
177          return VIAL;
178        throw new FHIRException("Unknown MedicationknowledgePackageType code '"+codeString+"'");
179        }
180        public String toCode() {
181          switch (this) {
182            case AMP: return "amp";
183            case BAG: return "bag";
184            case BLSTRPK: return "blstrpk";
185            case BOT: return "bot";
186            case BOX: return "box";
187            case CAN: return "can";
188            case CART: return "cart";
189            case DISK: return "disk";
190            case DOSET: return "doset";
191            case JAR: return "jar";
192            case JUG: return "jug";
193            case MINIM: return "minim";
194            case NEBAMP: return "nebamp";
195            case OVUL: return "ovul";
196            case PCH: return "pch";
197            case PKT: return "pkt";
198            case SASH: return "sash";
199            case STRIP: return "strip";
200            case TIN: return "tin";
201            case TUB: return "tub";
202            case TUBE: return "tube";
203            case VIAL: return "vial";
204            default: return "?";
205          }
206        }
207        public String getSystem() {
208          return "http://terminology.hl7.org/CodeSystem/medicationknowledge-package-type";
209        }
210        public String getDefinition() {
211          switch (this) {
212            case AMP: return "";
213            case BAG: return "";
214            case BLSTRPK: return "";
215            case BOT: return "";
216            case BOX: return "";
217            case CAN: return "";
218            case CART: return "";
219            case DISK: return "";
220            case DOSET: return "";
221            case JAR: return "";
222            case JUG: return "";
223            case MINIM: return "";
224            case NEBAMP: return "";
225            case OVUL: return "";
226            case PCH: return "";
227            case PKT: return "";
228            case SASH: return "";
229            case STRIP: return "";
230            case TIN: return "";
231            case TUB: return "";
232            case TUBE: return "";
233            case VIAL: return "";
234            default: return "?";
235          }
236        }
237        public String getDisplay() {
238          switch (this) {
239            case AMP: return "Ampule";
240            case BAG: return "Bag";
241            case BLSTRPK: return "Blister Pack";
242            case BOT: return "Bottle";
243            case BOX: return "Box";
244            case CAN: return "Can";
245            case CART: return "Cartridge";
246            case DISK: return "Disk";
247            case DOSET: return "Dosette";
248            case JAR: return "Jar";
249            case JUG: return "Jug";
250            case MINIM: return "Minim";
251            case NEBAMP: return "Nebule Amp";
252            case OVUL: return "Ovule";
253            case PCH: return "Pouch";
254            case PKT: return "Packet";
255            case SASH: return "Sashet";
256            case STRIP: return "Strip";
257            case TIN: return "Tin";
258            case TUB: return "Tub";
259            case TUBE: return "Tube";
260            case VIAL: return "Vial";
261            default: return "?";
262          }
263    }
264
265
266}
267