001package org.hl7.fhir.dstu3.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, Feb 9, 2017 08:03-0500 for FHIR v1.9.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum DeviceSafety {
038
039        /**
040         * Indicates that the device or packaging contains natural rubber that contacts humans
041         */
042        CONTAINSLATEX, 
043        /**
044         * 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.
045         */
046        LATEXFREE, 
047        /**
048         * 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
049         */
050        LATEXUNKNOWN, 
051        /**
052         * 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.
053         */
054        MRSAFE, 
055        /**
056         * 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.
057         */
058        MRUNSAFE, 
059        /**
060         * 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).
061         */
062        MRCONDITIONAL, 
063        /**
064         * Labeling does not contain MRI Safety information
065         */
066        MRUNKNOWN, 
067        /**
068         * added to help the parsers
069         */
070        NULL;
071        public static DeviceSafety fromCode(String codeString) throws FHIRException {
072            if (codeString == null || "".equals(codeString))
073                return null;
074        if ("contains-latex".equals(codeString))
075          return CONTAINSLATEX;
076        if ("latex-free".equals(codeString))
077          return LATEXFREE;
078        if ("latex-unknown".equals(codeString))
079          return LATEXUNKNOWN;
080        if ("mr-safe".equals(codeString))
081          return MRSAFE;
082        if ("mr-unsafe".equals(codeString))
083          return MRUNSAFE;
084        if ("mr-conditional".equals(codeString))
085          return MRCONDITIONAL;
086        if ("mr-unknown".equals(codeString))
087          return MRUNKNOWN;
088        throw new FHIRException("Unknown DeviceSafety code '"+codeString+"'");
089        }
090        public String toCode() {
091          switch (this) {
092            case CONTAINSLATEX: return "contains-latex";
093            case LATEXFREE: return "latex-free";
094            case LATEXUNKNOWN: return "latex-unknown";
095            case MRSAFE: return "mr-safe";
096            case MRUNSAFE: return "mr-unsafe";
097            case MRCONDITIONAL: return "mr-conditional";
098            case MRUNKNOWN: return "mr-unknown";
099            default: return "?";
100          }
101        }
102        public String getSystem() {
103          return "http://hl7.org/fhir/device-safety";
104        }
105        public String getDefinition() {
106          switch (this) {
107            case CONTAINSLATEX: return "Indicates that the device or packaging contains natural rubber that contacts humans";
108            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.";
109            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";
110            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.";
111            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.";
112            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).";
113            case MRUNKNOWN: return "Labeling does not contain MRI Safety information";
114            default: return "?";
115          }
116        }
117        public String getDisplay() {
118          switch (this) {
119            case CONTAINSLATEX: return "Contains Latex";
120            case LATEXFREE: return "Latex Free";
121            case LATEXUNKNOWN: return "Latex Unknown";
122            case MRSAFE: return "MR Safe";
123            case MRUNSAFE: return "MR Unsafe";
124            case MRCONDITIONAL: return "MR Conditional";
125            case MRUNKNOWN: return "MR Unknown";
126            default: return "?";
127          }
128    }
129
130
131}
132