001package org.hl7.fhir.dstu3.model.codesystems;
002
003/*-
004 * #%L
005 * org.hl7.fhir.dstu3
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 Thu, Feb 9, 2017 08:03-0500 for FHIR v1.9.0
054
055
056import org.hl7.fhir.exceptions.FHIRException;
057
058public enum DeviceSafety {
059
060        /**
061         * Indicates that the device or packaging contains natural rubber that contacts humans
062         */
063        CONTAINSLATEX, 
064        /**
065         * Indicates that natural rubber latex was not used as materials in the manufacture of the medical product and container and the device labeling contains this information.
066         */
067        LATEXFREE, 
068        /**
069         * Indicates that whether the device or packaging contains natural rubber that contacts humans is not indicated on the label Not all medical products that are NOT made with natural rubber latex will be marked
070         */
071        LATEXUNKNOWN, 
072        /**
073         * The device, when used in the MRI environment, has been demonstrated to present no additional risk to the patient or other individual, but may affect the quality of the diagnostic information. The MRI conditions in which the device was tested should be specified in conjunction with the term MR safe since a device which is safe under one set of conditions may not be found to be so under more extreme MRI conditions.
074         */
075        MRSAFE, 
076        /**
077         * An item that is known to pose hazards in all MRI environments. MR Unsafe items include magnetic items such as a pair of ferromagnetic scissors.
078         */
079        MRUNSAFE, 
080        /**
081         * An item that has been demonstrated to pose no known hazards in a specified MRI environment with specified conditions of use. Field conditions that define the MRI environment include, for instance, static magnetic field or specific absorption rate (SAR).
082         */
083        MRCONDITIONAL, 
084        /**
085         * Labeling does not contain MRI Safety information
086         */
087        MRUNKNOWN, 
088        /**
089         * added to help the parsers
090         */
091        NULL;
092        public static DeviceSafety fromCode(String codeString) throws FHIRException {
093            if (codeString == null || "".equals(codeString))
094                return null;
095        if ("contains-latex".equals(codeString))
096          return CONTAINSLATEX;
097        if ("latex-free".equals(codeString))
098          return LATEXFREE;
099        if ("latex-unknown".equals(codeString))
100          return LATEXUNKNOWN;
101        if ("mr-safe".equals(codeString))
102          return MRSAFE;
103        if ("mr-unsafe".equals(codeString))
104          return MRUNSAFE;
105        if ("mr-conditional".equals(codeString))
106          return MRCONDITIONAL;
107        if ("mr-unknown".equals(codeString))
108          return MRUNKNOWN;
109        throw new FHIRException("Unknown DeviceSafety code '"+codeString+"'");
110        }
111        public String toCode() {
112          switch (this) {
113            case CONTAINSLATEX: return "contains-latex";
114            case LATEXFREE: return "latex-free";
115            case LATEXUNKNOWN: return "latex-unknown";
116            case MRSAFE: return "mr-safe";
117            case MRUNSAFE: return "mr-unsafe";
118            case MRCONDITIONAL: return "mr-conditional";
119            case MRUNKNOWN: return "mr-unknown";
120            default: return "?";
121          }
122        }
123        public String getSystem() {
124          return "http://hl7.org/fhir/device-safety";
125        }
126        public String getDefinition() {
127          switch (this) {
128            case CONTAINSLATEX: return "Indicates that the device or packaging contains natural rubber that contacts humans";
129            case LATEXFREE: return "Indicates that natural rubber latex was not used as materials in the manufacture of the medical product and container and the device labeling contains this information.";
130            case LATEXUNKNOWN: return "Indicates that whether the device or packaging contains natural rubber that contacts humans is not indicated on the label Not all medical products that are NOT made with natural rubber latex will be marked";
131            case MRSAFE: return "The device, when used in the MRI environment, has been demonstrated to present no additional risk to the patient or other individual, but may affect the quality of the diagnostic information. The MRI conditions in which the device was tested should be specified in conjunction with the term MR safe since a device which is safe under one set of conditions may not be found to be so under more extreme MRI conditions.";
132            case MRUNSAFE: return "An item that is known to pose hazards in all MRI environments. MR Unsafe items include magnetic items such as a pair of ferromagnetic scissors.";
133            case MRCONDITIONAL: return "An item that has been demonstrated to pose no known hazards in a specified MRI environment with specified conditions of use. Field conditions that define the MRI environment include, for instance, static magnetic field or specific absorption rate (SAR).";
134            case MRUNKNOWN: return "Labeling does not contain MRI Safety information";
135            default: return "?";
136          }
137        }
138        public String getDisplay() {
139          switch (this) {
140            case CONTAINSLATEX: return "Contains Latex";
141            case LATEXFREE: return "Latex Free";
142            case LATEXUNKNOWN: return "Latex Unknown";
143            case MRSAFE: return "MR Safe";
144            case MRUNSAFE: return "MR Unsafe";
145            case MRCONDITIONAL: return "MR Conditional";
146            case MRUNKNOWN: return "MR Unknown";
147            default: return "?";
148          }
149    }
150
151
152}
153