001package org.hl7.fhir.instance.model.valuesets; 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, Nov 11, 2015 10:54-0500 for FHIR v1.0.2 033 034 035public enum V3AcknowledgementDetailType { 036 037 /** 038 * 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. 039 040 041 Example:Unable to find specified patient. 042 */ 043 E, 044 /** 045 * 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. 046 047 048 Example: A Patient's coverage will expire in 5 days. 049 */ 050 I, 051 /** 052 * 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. 053 054 055 Example: 056 057 058 Unexpected additional repetitions of phone number have been ignored. 059 */ 060 W, 061 /** 062 * null 063 */ 064 ERR, 065 /** 066 * null 067 */ 068 INFO, 069 /** 070 * null 071 */ 072 WARN, 073 /** 074 * added to help the parsers 075 */ 076 NULL; 077 public static V3AcknowledgementDetailType fromCode(String codeString) throws Exception { 078 if (codeString == null || "".equals(codeString)) 079 return null; 080 if ("E".equals(codeString)) 081 return E; 082 if ("I".equals(codeString)) 083 return I; 084 if ("W".equals(codeString)) 085 return W; 086 if ("ERR".equals(codeString)) 087 return ERR; 088 if ("INFO".equals(codeString)) 089 return INFO; 090 if ("WARN".equals(codeString)) 091 return WARN; 092 throw new Exception("Unknown V3AcknowledgementDetailType code '"+codeString+"'"); 093 } 094 public String toCode() { 095 switch (this) { 096 case E: return "E"; 097 case I: return "I"; 098 case W: return "W"; 099 case ERR: return "ERR"; 100 case INFO: return "INFO"; 101 case WARN: return "WARN"; 102 default: return "?"; 103 } 104 } 105 public String getSystem() { 106 return "http://hl7.org/fhir/v3/AcknowledgementDetailType"; 107 } 108 public String getDefinition() { 109 switch (this) { 110 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."; 111 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."; 112 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."; 113 case ERR: return ""; 114 case INFO: return ""; 115 case WARN: return ""; 116 default: return "?"; 117 } 118 } 119 public String getDisplay() { 120 switch (this) { 121 case E: return "Error"; 122 case I: return "Information"; 123 case W: return "Warning"; 124 case ERR: return "ERR"; 125 case INFO: return "INFO"; 126 case WARN: return "WARN"; 127 default: return "?"; 128 } 129 } 130 131 132} 133