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