001package org.hl7.fhir.r4.model.codesystems;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023
024/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, 
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this 
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, 
034     this list of conditions and the following disclaimer in the documentation 
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
049  POSSIBILITY OF SUCH DAMAGE.
050  
051*/
052
053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
054
055
056import org.hl7.fhir.exceptions.FHIRException;
057
058public enum V3EntityHandling {
059
060        /**
061         * Keep at ambient temperature, 22 +/- 2C
062         */
063        AMB, 
064        /**
065         * Critical to keep at body temperature 36-38C
066         */
067        C37, 
068        /**
069         * Critical ambient - must not be refrigerated or frozen.
070         */
071        CAMB, 
072        /**
073         * Critical. Do not expose to atmosphere.  Do not uncap.
074         */
075        CATM, 
076        /**
077         * Critical frozen. Specimen must not be allowed to thaw until immediately prior to testing.
078         */
079        CFRZ, 
080        /**
081         * Critical refrigerated - must not be allowed to freeze or warm until imediately prior to testing.
082         */
083        CREF, 
084        /**
085         * Deep Frozen -16 to -20C.
086         */
087        DFRZ, 
088        /**
089         * Keep in a dry environment
090         */
091        DRY, 
092        /**
093         * Keep frozen below 0 ?C
094         */
095        FRZ, 
096        /**
097         * Container is free of heavy metals, including lead.
098         */
099        MTLF, 
100        /**
101         * Keep in liquid nitrogen
102         */
103        NTR, 
104        /**
105         * Protect from light (eg. Wrap in aluminum foil).
106         */
107        PRTL, 
108        /**
109         * Do not shake
110         */
111        PSA, 
112        /**
113         * Protect against shock
114         */
115        PSO, 
116        /**
117         * Keep at refrigerated temperature:4-8C Accidental warming or freezing is of little consequence.
118         */
119        REF, 
120        /**
121         * Shake thoroughly before using
122         */
123        SBU, 
124        /**
125         * Ultra cold frozen -75 to -85C.  Ultra cold freezer is typically at temperature of dry ice.
126         */
127        UFRZ, 
128        /**
129         * Keep upright, do not turn upside down
130         */
131        UPR, 
132        /**
133         * added to help the parsers
134         */
135        NULL;
136        public static V3EntityHandling fromCode(String codeString) throws FHIRException {
137            if (codeString == null || "".equals(codeString))
138                return null;
139        if ("AMB".equals(codeString))
140          return AMB;
141        if ("C37".equals(codeString))
142          return C37;
143        if ("CAMB".equals(codeString))
144          return CAMB;
145        if ("CATM".equals(codeString))
146          return CATM;
147        if ("CFRZ".equals(codeString))
148          return CFRZ;
149        if ("CREF".equals(codeString))
150          return CREF;
151        if ("DFRZ".equals(codeString))
152          return DFRZ;
153        if ("DRY".equals(codeString))
154          return DRY;
155        if ("FRZ".equals(codeString))
156          return FRZ;
157        if ("MTLF".equals(codeString))
158          return MTLF;
159        if ("NTR".equals(codeString))
160          return NTR;
161        if ("PRTL".equals(codeString))
162          return PRTL;
163        if ("PSA".equals(codeString))
164          return PSA;
165        if ("PSO".equals(codeString))
166          return PSO;
167        if ("REF".equals(codeString))
168          return REF;
169        if ("SBU".equals(codeString))
170          return SBU;
171        if ("UFRZ".equals(codeString))
172          return UFRZ;
173        if ("UPR".equals(codeString))
174          return UPR;
175        throw new FHIRException("Unknown V3EntityHandling code '"+codeString+"'");
176        }
177        public String toCode() {
178          switch (this) {
179            case AMB: return "AMB";
180            case C37: return "C37";
181            case CAMB: return "CAMB";
182            case CATM: return "CATM";
183            case CFRZ: return "CFRZ";
184            case CREF: return "CREF";
185            case DFRZ: return "DFRZ";
186            case DRY: return "DRY";
187            case FRZ: return "FRZ";
188            case MTLF: return "MTLF";
189            case NTR: return "NTR";
190            case PRTL: return "PRTL";
191            case PSA: return "PSA";
192            case PSO: return "PSO";
193            case REF: return "REF";
194            case SBU: return "SBU";
195            case UFRZ: return "UFRZ";
196            case UPR: return "UPR";
197            default: return "?";
198          }
199        }
200        public String getSystem() {
201          return "http://terminology.hl7.org/CodeSystem/v3-EntityHandling";
202        }
203        public String getDefinition() {
204          switch (this) {
205            case AMB: return "Keep at ambient temperature, 22 +/- 2C";
206            case C37: return "Critical to keep at body temperature 36-38C";
207            case CAMB: return "Critical ambient - must not be refrigerated or frozen.";
208            case CATM: return "Critical. Do not expose to atmosphere.  Do not uncap.";
209            case CFRZ: return "Critical frozen. Specimen must not be allowed to thaw until immediately prior to testing.";
210            case CREF: return "Critical refrigerated - must not be allowed to freeze or warm until imediately prior to testing.";
211            case DFRZ: return "Deep Frozen -16 to -20C.";
212            case DRY: return "Keep in a dry environment";
213            case FRZ: return "Keep frozen below 0 ?C";
214            case MTLF: return "Container is free of heavy metals, including lead.";
215            case NTR: return "Keep in liquid nitrogen";
216            case PRTL: return "Protect from light (eg. Wrap in aluminum foil).";
217            case PSA: return "Do not shake";
218            case PSO: return "Protect against shock";
219            case REF: return "Keep at refrigerated temperature:4-8C Accidental warming or freezing is of little consequence.";
220            case SBU: return "Shake thoroughly before using";
221            case UFRZ: return "Ultra cold frozen -75 to -85C.  Ultra cold freezer is typically at temperature of dry ice.";
222            case UPR: return "Keep upright, do not turn upside down";
223            default: return "?";
224          }
225        }
226        public String getDisplay() {
227          switch (this) {
228            case AMB: return "Ambient Temperature";
229            case C37: return "Body Temperature";
230            case CAMB: return "Critical Ambient temperature";
231            case CATM: return "Protect from Air";
232            case CFRZ: return "Critical frozen";
233            case CREF: return "Critical refrigerated temperature";
234            case DFRZ: return "Deep Frozen";
235            case DRY: return "dry";
236            case FRZ: return "frozen";
237            case MTLF: return "Metal Free";
238            case NTR: return "nitrogen";
239            case PRTL: return "Protect from Light";
240            case PSA: return "do not shake";
241            case PSO: return "no shock";
242            case REF: return "Refrigerated temperature";
243            case SBU: return "Shake before use";
244            case UFRZ: return "Ultra frozen";
245            case UPR: return "upright";
246            default: return "?";
247          }
248    }
249
250
251}
252