001package org.hl7.fhir.r4.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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
033
034import org.hl7.fhir.exceptions.FHIRException;
035
036public enum V3AcknowledgementDetailType {
037
038  /**
039   * Definition:An issue which has prevented, or will prevent (unless a management
040   * is provided for the issue by the sender), the successful processing of an
041   * interaction. Response interactions which include an issue which is an Error
042   * are a 'rejection', indicating that the request was not successfully
043   * 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
051   * successful processing of the request. Information issues cannot be overridden
052   * by specifying a management.
053   * 
054   * 
055   * Example: A Patient's coverage will expire in 5 days.
056   */
057  I,
058  /**
059   * Definition: The message relates to an issue which cannot prevent the
060   * successful processing of a request, but which could result in the processing
061   * not having the ideal or intended effect. Managing a warning issue is not
062   * required for successful processing, but will suppress the warning from being
063   * raised.
064   * 
065   * 
066   * Example:
067   * 
068   * 
069   * Unexpected additional repetitions of phone number have been ignored.
070   */
071  W,
072  /**
073   * null
074   */
075  ERR,
076  /**
077   * null
078   */
079  INFO,
080  /**
081   * null
082   */
083  WARN,
084  /**
085   * added to help the parsers
086   */
087  NULL;
088
089  public static V3AcknowledgementDetailType fromCode(String codeString) throws FHIRException {
090    if (codeString == null || "".equals(codeString))
091      return null;
092    if ("E".equals(codeString))
093      return E;
094    if ("I".equals(codeString))
095      return I;
096    if ("W".equals(codeString))
097      return W;
098    if ("ERR".equals(codeString))
099      return ERR;
100    if ("INFO".equals(codeString))
101      return INFO;
102    if ("WARN".equals(codeString))
103      return WARN;
104    throw new FHIRException("Unknown V3AcknowledgementDetailType code '" + codeString + "'");
105  }
106
107  public String toCode() {
108    switch (this) {
109    case E:
110      return "E";
111    case I:
112      return "I";
113    case W:
114      return "W";
115    case ERR:
116      return "ERR";
117    case INFO:
118      return "INFO";
119    case WARN:
120      return "WARN";
121    case NULL:
122      return null;
123    default:
124      return "?";
125    }
126  }
127
128  public String getSystem() {
129    return "http://terminology.hl7.org/CodeSystem/v3-AcknowledgementDetailType";
130  }
131
132  public String getDefinition() {
133    switch (this) {
134    case E:
135      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.";
136    case I:
137      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.";
138    case W:
139      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.";
140    case ERR:
141      return "";
142    case INFO:
143      return "";
144    case WARN:
145      return "";
146    case NULL:
147      return null;
148    default:
149      return "?";
150    }
151  }
152
153  public String getDisplay() {
154    switch (this) {
155    case E:
156      return "Error";
157    case I:
158      return "Information";
159    case W:
160      return "Warning";
161    case ERR:
162      return "ERR";
163    case INFO:
164      return "INFO";
165    case WARN:
166      return "WARN";
167    case NULL:
168      return null;
169    default:
170      return "?";
171    }
172  }
173
174}