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 GuidanceResponseStatus { 037 038 /** 039 * The request was processed successfully. 040 */ 041 SUCCESS, 042 /** 043 * The request was processed successfully, but more data may result in a more 044 * complete evaluation. 045 */ 046 DATAREQUESTED, 047 /** 048 * The request was processed, but more data is required to complete the 049 * evaluation. 050 */ 051 DATAREQUIRED, 052 /** 053 * The request is currently being processed. 054 */ 055 INPROGRESS, 056 /** 057 * The request was not processed successfully. 058 */ 059 FAILURE, 060 /** 061 * The response was entered in error. 062 */ 063 ENTEREDINERROR, 064 /** 065 * added to help the parsers 066 */ 067 NULL; 068 069 public static GuidanceResponseStatus fromCode(String codeString) throws FHIRException { 070 if (codeString == null || "".equals(codeString)) 071 return null; 072 if ("success".equals(codeString)) 073 return SUCCESS; 074 if ("data-requested".equals(codeString)) 075 return DATAREQUESTED; 076 if ("data-required".equals(codeString)) 077 return DATAREQUIRED; 078 if ("in-progress".equals(codeString)) 079 return INPROGRESS; 080 if ("failure".equals(codeString)) 081 return FAILURE; 082 if ("entered-in-error".equals(codeString)) 083 return ENTEREDINERROR; 084 throw new FHIRException("Unknown GuidanceResponseStatus code '" + codeString + "'"); 085 } 086 087 public String toCode() { 088 switch (this) { 089 case SUCCESS: 090 return "success"; 091 case DATAREQUESTED: 092 return "data-requested"; 093 case DATAREQUIRED: 094 return "data-required"; 095 case INPROGRESS: 096 return "in-progress"; 097 case FAILURE: 098 return "failure"; 099 case ENTEREDINERROR: 100 return "entered-in-error"; 101 case NULL: 102 return null; 103 default: 104 return "?"; 105 } 106 } 107 108 public String getSystem() { 109 return "http://hl7.org/fhir/guidance-response-status"; 110 } 111 112 public String getDefinition() { 113 switch (this) { 114 case SUCCESS: 115 return "The request was processed successfully."; 116 case DATAREQUESTED: 117 return "The request was processed successfully, but more data may result in a more complete evaluation."; 118 case DATAREQUIRED: 119 return "The request was processed, but more data is required to complete the evaluation."; 120 case INPROGRESS: 121 return "The request is currently being processed."; 122 case FAILURE: 123 return "The request was not processed successfully."; 124 case ENTEREDINERROR: 125 return "The response was entered in error."; 126 case NULL: 127 return null; 128 default: 129 return "?"; 130 } 131 } 132 133 public String getDisplay() { 134 switch (this) { 135 case SUCCESS: 136 return "Success"; 137 case DATAREQUESTED: 138 return "Data Requested"; 139 case DATAREQUIRED: 140 return "Data Required"; 141 case INPROGRESS: 142 return "In Progress"; 143 case FAILURE: 144 return "Failure"; 145 case ENTEREDINERROR: 146 return "Entered In Error"; 147 case NULL: 148 return null; 149 default: 150 return "?"; 151 } 152 } 153 154}