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