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 V3EntityHandling {
038
039        /**
040         * Keep at ambient temperature, 22 +/- 2C
041         */
042        AMB, 
043        /**
044         * Critical to keep at body temperature 36-38C
045         */
046        C37, 
047        /**
048         * Critical ambient - must not be refrigerated or frozen.
049         */
050        CAMB, 
051        /**
052         * Critical. Do not expose to atmosphere.  Do not uncap.
053         */
054        CATM, 
055        /**
056         * Critical frozen. Specimen must not be allowed to thaw until immediately prior to testing.
057         */
058        CFRZ, 
059        /**
060         * Critical refrigerated - must not be allowed to freeze or warm until imediately prior to testing.
061         */
062        CREF, 
063        /**
064         * Deep Frozen -16 to -20C.
065         */
066        DFRZ, 
067        /**
068         * Keep in a dry environment
069         */
070        DRY, 
071        /**
072         * Keep frozen below 0 ?C
073         */
074        FRZ, 
075        /**
076         * Container is free of heavy metals, including lead.
077         */
078        MTLF, 
079        /**
080         * Keep in liquid nitrogen
081         */
082        NTR, 
083        /**
084         * Protect from light (eg. Wrap in aluminum foil).
085         */
086        PRTL, 
087        /**
088         * Do not shake
089         */
090        PSA, 
091        /**
092         * Protect against shock
093         */
094        PSO, 
095        /**
096         * Keep at refrigerated temperature:4-8C Accidental warming or freezing is of little consequence.
097         */
098        REF, 
099        /**
100         * Shake thoroughly before using
101         */
102        SBU, 
103        /**
104         * Ultra cold frozen -75 to -85C.  Ultra cold freezer is typically at temperature of dry ice.
105         */
106        UFRZ, 
107        /**
108         * Keep upright, do not turn upside down
109         */
110        UPR, 
111        /**
112         * added to help the parsers
113         */
114        NULL;
115        public static V3EntityHandling fromCode(String codeString) throws FHIRException {
116            if (codeString == null || "".equals(codeString))
117                return null;
118        if ("AMB".equals(codeString))
119          return AMB;
120        if ("C37".equals(codeString))
121          return C37;
122        if ("CAMB".equals(codeString))
123          return CAMB;
124        if ("CATM".equals(codeString))
125          return CATM;
126        if ("CFRZ".equals(codeString))
127          return CFRZ;
128        if ("CREF".equals(codeString))
129          return CREF;
130        if ("DFRZ".equals(codeString))
131          return DFRZ;
132        if ("DRY".equals(codeString))
133          return DRY;
134        if ("FRZ".equals(codeString))
135          return FRZ;
136        if ("MTLF".equals(codeString))
137          return MTLF;
138        if ("NTR".equals(codeString))
139          return NTR;
140        if ("PRTL".equals(codeString))
141          return PRTL;
142        if ("PSA".equals(codeString))
143          return PSA;
144        if ("PSO".equals(codeString))
145          return PSO;
146        if ("REF".equals(codeString))
147          return REF;
148        if ("SBU".equals(codeString))
149          return SBU;
150        if ("UFRZ".equals(codeString))
151          return UFRZ;
152        if ("UPR".equals(codeString))
153          return UPR;
154        throw new FHIRException("Unknown V3EntityHandling code '"+codeString+"'");
155        }
156        public String toCode() {
157          switch (this) {
158            case AMB: return "AMB";
159            case C37: return "C37";
160            case CAMB: return "CAMB";
161            case CATM: return "CATM";
162            case CFRZ: return "CFRZ";
163            case CREF: return "CREF";
164            case DFRZ: return "DFRZ";
165            case DRY: return "DRY";
166            case FRZ: return "FRZ";
167            case MTLF: return "MTLF";
168            case NTR: return "NTR";
169            case PRTL: return "PRTL";
170            case PSA: return "PSA";
171            case PSO: return "PSO";
172            case REF: return "REF";
173            case SBU: return "SBU";
174            case UFRZ: return "UFRZ";
175            case UPR: return "UPR";
176            default: return "?";
177          }
178        }
179        public String getSystem() {
180          return "http://terminology.hl7.org/CodeSystem/v3-EntityHandling";
181        }
182        public String getDefinition() {
183          switch (this) {
184            case AMB: return "Keep at ambient temperature, 22 +/- 2C";
185            case C37: return "Critical to keep at body temperature 36-38C";
186            case CAMB: return "Critical ambient - must not be refrigerated or frozen.";
187            case CATM: return "Critical. Do not expose to atmosphere.  Do not uncap.";
188            case CFRZ: return "Critical frozen. Specimen must not be allowed to thaw until immediately prior to testing.";
189            case CREF: return "Critical refrigerated - must not be allowed to freeze or warm until imediately prior to testing.";
190            case DFRZ: return "Deep Frozen -16 to -20C.";
191            case DRY: return "Keep in a dry environment";
192            case FRZ: return "Keep frozen below 0 ?C";
193            case MTLF: return "Container is free of heavy metals, including lead.";
194            case NTR: return "Keep in liquid nitrogen";
195            case PRTL: return "Protect from light (eg. Wrap in aluminum foil).";
196            case PSA: return "Do not shake";
197            case PSO: return "Protect against shock";
198            case REF: return "Keep at refrigerated temperature:4-8C Accidental warming or freezing is of little consequence.";
199            case SBU: return "Shake thoroughly before using";
200            case UFRZ: return "Ultra cold frozen -75 to -85C.  Ultra cold freezer is typically at temperature of dry ice.";
201            case UPR: return "Keep upright, do not turn upside down";
202            default: return "?";
203          }
204        }
205        public String getDisplay() {
206          switch (this) {
207            case AMB: return "Ambient Temperature";
208            case C37: return "Body Temperature";
209            case CAMB: return "Critical Ambient temperature";
210            case CATM: return "Protect from Air";
211            case CFRZ: return "Critical frozen";
212            case CREF: return "Critical refrigerated temperature";
213            case DFRZ: return "Deep Frozen";
214            case DRY: return "dry";
215            case FRZ: return "frozen";
216            case MTLF: return "Metal Free";
217            case NTR: return "nitrogen";
218            case PRTL: return "Protect from Light";
219            case PSA: return "do not shake";
220            case PSO: return "no shock";
221            case REF: return "Refrigerated temperature";
222            case SBU: return "Shake before use";
223            case UFRZ: return "Ultra frozen";
224            case UPR: return "upright";
225            default: return "?";
226          }
227    }
228
229
230}
231