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 V3AcknowledgementDetailType {
041
042        /**
043         * Definition:An issue which has prevented, or will prevent (unless a management is provided for the issue by the sender), the successful processing of an interaction.  Response interactions which include an issue which is an Error are a 'rejection', indicating that the request was not successfully processed. 
044
045                        
046                           Example:Unable to find specified patient.
047         */
048        E, 
049        /**
050         * Definition: The message relates to an issue which has no bearing on the successful processing of the request.  Information issues cannot be overridden by specifying a management.
051
052                        
053                           Example: A Patient's coverage will expire in 5 days.
054         */
055        I, 
056        /**
057         * Definition: The message relates to an issue which cannot prevent the successful processing of a request, but which could result in the processing not having the ideal or intended effect.  Managing a warning issue is not required for successful processing, but will suppress the warning from being raised. 
058
059                        
060                           Example:
061                        
062
063                        Unexpected additional repetitions of phone number have been ignored.
064         */
065        W, 
066        /**
067         * null
068         */
069        ERR, 
070        /**
071         * null
072         */
073        INFO, 
074        /**
075         * null
076         */
077        WARN, 
078        /**
079         * added to help the parsers
080         */
081        NULL;
082        public static V3AcknowledgementDetailType fromCode(String codeString) throws FHIRException {
083            if (codeString == null || "".equals(codeString))
084                return null;
085        if ("E".equals(codeString))
086          return E;
087        if ("I".equals(codeString))
088          return I;
089        if ("W".equals(codeString))
090          return W;
091        if ("ERR".equals(codeString))
092          return ERR;
093        if ("INFO".equals(codeString))
094          return INFO;
095        if ("WARN".equals(codeString))
096          return WARN;
097        throw new FHIRException("Unknown V3AcknowledgementDetailType code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case E: return "E";
102            case I: return "I";
103            case W: return "W";
104            case ERR: return "ERR";
105            case INFO: return "INFO";
106            case WARN: return "WARN";
107            case NULL: return null;
108            default: return "?";
109          }
110        }
111        public String getSystem() {
112          return "http://hl7.org/fhir/v3/AcknowledgementDetailType";
113        }
114        public String getDefinition() {
115          switch (this) {
116            case E: return "Definition:An issue which has prevented, or will prevent (unless a management is provided for the issue by the sender), the successful processing of an interaction.  Response interactions which include an issue which is an Error are a 'rejection', indicating that the request was not successfully processed. \r\n\n                        \n                           Example:Unable to find specified patient.";
117            case I: return "Definition: The message relates to an issue which has no bearing on the successful processing of the request.  Information issues cannot be overridden by specifying a management.\r\n\n                        \n                           Example: A Patient's coverage will expire in 5 days.";
118            case W: return "Definition: The message relates to an issue which cannot prevent the successful processing of a request, but which could result in the processing not having the ideal or intended effect.  Managing a warning issue is not required for successful processing, but will suppress the warning from being raised. \r\n\n                        \n                           Example:\n                        \r\n\n                        Unexpected additional repetitions of phone number have been ignored.";
119            case ERR: return "";
120            case INFO: return "";
121            case WARN: return "";
122            case NULL: return null;
123            default: return "?";
124          }
125        }
126        public String getDisplay() {
127          switch (this) {
128            case E: return "Error";
129            case I: return "Information";
130            case W: return "Warning";
131            case ERR: return "ERR";
132            case INFO: return "INFO";
133            case WARN: return "WARN";
134            case NULL: return null;
135            default: return "?";
136          }
137    }
138
139
140}