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 V3EntityRisk {
059
060        /**
061         * A danger that can be associated with certain living subjects, including humans.
062         */
063        AGG, 
064        /**
065         * The dangers associated with normal biological materials. I.e. potential risk of unknown infections.  Routine biological materials from living subjects.
066         */
067        BIO, 
068        /**
069         * Material is corrosive and may cause severe injury to skin, mucous membranes and eyes. Avoid any unprotected contact.
070         */
071        COR, 
072        /**
073         * The entity is at risk for escaping from containment or control.
074         */
075        ESC, 
076        /**
077         * Material is highly inflammable and in certain mixtures (with air) may lead to explosions.  Keep away from fire, sparks and excessive heat.
078         */
079        IFL, 
080        /**
081         * Material is an explosive mixture.  Keep away from fire, sparks, and heat.
082         */
083        EXP, 
084        /**
085         * Material known to be infectious with human pathogenic microorganisms.  Those who handle this material must take precautions for their protection.
086         */
087        INF, 
088        /**
089         * Material contains microorganisms that is an environmental hazard.  Must be handled with special care.
090         */
091        BHZ, 
092        /**
093         * Material is solid and sharp (e.g., cannulas).  Dispose in hard container.
094         */
095        INJ, 
096        /**
097         * Material is poisonous to humans and/or animals.  Special care must be taken to avoid incorporation, even of small amounts.
098         */
099        POI, 
100        /**
101         * Material is a source for ionizing radiation and must be handled with special care to avoid injury of those who handle it and to avoid environmental hazards.
102         */
103        RAD, 
104        /**
105         * added to help the parsers
106         */
107        NULL;
108        public static V3EntityRisk fromCode(String codeString) throws FHIRException {
109            if (codeString == null || "".equals(codeString))
110                return null;
111        if ("AGG".equals(codeString))
112          return AGG;
113        if ("BIO".equals(codeString))
114          return BIO;
115        if ("COR".equals(codeString))
116          return COR;
117        if ("ESC".equals(codeString))
118          return ESC;
119        if ("IFL".equals(codeString))
120          return IFL;
121        if ("EXP".equals(codeString))
122          return EXP;
123        if ("INF".equals(codeString))
124          return INF;
125        if ("BHZ".equals(codeString))
126          return BHZ;
127        if ("INJ".equals(codeString))
128          return INJ;
129        if ("POI".equals(codeString))
130          return POI;
131        if ("RAD".equals(codeString))
132          return RAD;
133        throw new FHIRException("Unknown V3EntityRisk code '"+codeString+"'");
134        }
135        public String toCode() {
136          switch (this) {
137            case AGG: return "AGG";
138            case BIO: return "BIO";
139            case COR: return "COR";
140            case ESC: return "ESC";
141            case IFL: return "IFL";
142            case EXP: return "EXP";
143            case INF: return "INF";
144            case BHZ: return "BHZ";
145            case INJ: return "INJ";
146            case POI: return "POI";
147            case RAD: return "RAD";
148            default: return "?";
149          }
150        }
151        public String getSystem() {
152          return "http://terminology.hl7.org/CodeSystem/v3-EntityRisk";
153        }
154        public String getDefinition() {
155          switch (this) {
156            case AGG: return "A danger that can be associated with certain living subjects, including humans.";
157            case BIO: return "The dangers associated with normal biological materials. I.e. potential risk of unknown infections.  Routine biological materials from living subjects.";
158            case COR: return "Material is corrosive and may cause severe injury to skin, mucous membranes and eyes. Avoid any unprotected contact.";
159            case ESC: return "The entity is at risk for escaping from containment or control.";
160            case IFL: return "Material is highly inflammable and in certain mixtures (with air) may lead to explosions.  Keep away from fire, sparks and excessive heat.";
161            case EXP: return "Material is an explosive mixture.  Keep away from fire, sparks, and heat.";
162            case INF: return "Material known to be infectious with human pathogenic microorganisms.  Those who handle this material must take precautions for their protection.";
163            case BHZ: return "Material contains microorganisms that is an environmental hazard.  Must be handled with special care.";
164            case INJ: return "Material is solid and sharp (e.g., cannulas).  Dispose in hard container.";
165            case POI: return "Material is poisonous to humans and/or animals.  Special care must be taken to avoid incorporation, even of small amounts.";
166            case RAD: return "Material is a source for ionizing radiation and must be handled with special care to avoid injury of those who handle it and to avoid environmental hazards.";
167            default: return "?";
168          }
169        }
170        public String getDisplay() {
171          switch (this) {
172            case AGG: return "aggressive";
173            case BIO: return "Biological";
174            case COR: return "Corrosive";
175            case ESC: return "Escape Risk";
176            case IFL: return "inflammable";
177            case EXP: return "explosive";
178            case INF: return "infectious";
179            case BHZ: return "biohazard";
180            case INJ: return "injury hazard";
181            case POI: return "poison";
182            case RAD: return "radioactive";
183            default: return "?";
184          }
185    }
186
187
188}
189