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            default: return "?";
208          }
209        }
210        public String getSystem() {
211          return "http://terminology.hl7.org/CodeSystem/medicationknowledge-package-type";
212        }
213        public String getDefinition() {
214          switch (this) {
215            case AMP: return "";
216            case BAG: return "";
217            case BLSTRPK: return "";
218            case BOT: return "";
219            case BOX: return "";
220            case CAN: return "";
221            case CART: return "";
222            case DISK: return "";
223            case DOSET: return "";
224            case JAR: return "";
225            case JUG: return "";
226            case MINIM: return "";
227            case NEBAMP: return "";
228            case OVUL: return "";
229            case PCH: return "";
230            case PKT: return "";
231            case SASH: return "";
232            case STRIP: return "";
233            case TIN: return "";
234            case TUB: return "";
235            case TUBE: return "";
236            case VIAL: return "";
237            default: return "?";
238          }
239        }
240        public String getDisplay() {
241          switch (this) {
242            case AMP: return "Ampule";
243            case BAG: return "Bag";
244            case BLSTRPK: return "Blister Pack";
245            case BOT: return "Bottle";
246            case BOX: return "Box";
247            case CAN: return "Can";
248            case CART: return "Cartridge";
249            case DISK: return "Disk";
250            case DOSET: return "Dosette";
251            case JAR: return "Jar";
252            case JUG: return "Jug";
253            case MINIM: return "Minim";
254            case NEBAMP: return "Nebule Amp";
255            case OVUL: return "Ovule";
256            case PCH: return "Pouch";
257            case PKT: return "Packet";
258            case SASH: return "Sashet";
259            case STRIP: return "Strip";
260            case TIN: return "Tin";
261            case TUB: return "Tub";
262            case TUBE: return "Tube";
263            case VIAL: return "Vial";
264            default: return "?";
265          }
266    }
267
268
269}