001package org.hl7.fhir.r4.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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 036 037 038import org.hl7.fhir.exceptions.FHIRException; 039 040public enum DataAbsentReason { 041 042 /** 043 * The value is expected to exist but is not known. 044 */ 045 UNKNOWN, 046 /** 047 * The source was asked but does not know the value. 048 */ 049 ASKEDUNKNOWN, 050 /** 051 * There is reason to expect (from the workflow) that the value may become known. 052 */ 053 TEMPUNKNOWN, 054 /** 055 * The workflow didn't lead to this value being known. 056 */ 057 NOTASKED, 058 /** 059 * The source was asked but declined to answer. 060 */ 061 ASKEDDECLINED, 062 /** 063 * The information is not available due to security, privacy or related reasons. 064 */ 065 MASKED, 066 /** 067 * There is no proper value for this element (e.g. last menstrual period for a male). 068 */ 069 NOTAPPLICABLE, 070 /** 071 * The source system wasn't capable of supporting this element. 072 */ 073 UNSUPPORTED, 074 /** 075 * The content of the data is represented in the resource narrative. 076 */ 077 ASTEXT, 078 /** 079 * Some system or workflow process error means that the information is not available. 080 */ 081 ERROR, 082 /** 083 * The numeric value is undefined or unrepresentable due to a floating point processing error. 084 */ 085 NOTANUMBER, 086 /** 087 * The numeric value is excessively low and unrepresentable due to a floating point processing error. 088 */ 089 NEGATIVEINFINITY, 090 /** 091 * The numeric value is excessively high and unrepresentable due to a floating point processing error. 092 */ 093 POSITIVEINFINITY, 094 /** 095 * The value is not available because the observation procedure (test, etc.) was not performed. 096 */ 097 NOTPERFORMED, 098 /** 099 * The value is not permitted in this context (e.g. due to profiles, or the base data types). 100 */ 101 NOTPERMITTED, 102 /** 103 * added to help the parsers 104 */ 105 NULL; 106 public static DataAbsentReason fromCode(String codeString) throws FHIRException { 107 if (codeString == null || "".equals(codeString)) 108 return null; 109 if ("unknown".equals(codeString)) 110 return UNKNOWN; 111 if ("asked-unknown".equals(codeString)) 112 return ASKEDUNKNOWN; 113 if ("temp-unknown".equals(codeString)) 114 return TEMPUNKNOWN; 115 if ("not-asked".equals(codeString)) 116 return NOTASKED; 117 if ("asked-declined".equals(codeString)) 118 return ASKEDDECLINED; 119 if ("masked".equals(codeString)) 120 return MASKED; 121 if ("not-applicable".equals(codeString)) 122 return NOTAPPLICABLE; 123 if ("unsupported".equals(codeString)) 124 return UNSUPPORTED; 125 if ("as-text".equals(codeString)) 126 return ASTEXT; 127 if ("error".equals(codeString)) 128 return ERROR; 129 if ("not-a-number".equals(codeString)) 130 return NOTANUMBER; 131 if ("negative-infinity".equals(codeString)) 132 return NEGATIVEINFINITY; 133 if ("positive-infinity".equals(codeString)) 134 return POSITIVEINFINITY; 135 if ("not-performed".equals(codeString)) 136 return NOTPERFORMED; 137 if ("not-permitted".equals(codeString)) 138 return NOTPERMITTED; 139 throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'"); 140 } 141 public String toCode() { 142 switch (this) { 143 case UNKNOWN: return "unknown"; 144 case ASKEDUNKNOWN: return "asked-unknown"; 145 case TEMPUNKNOWN: return "temp-unknown"; 146 case NOTASKED: return "not-asked"; 147 case ASKEDDECLINED: return "asked-declined"; 148 case MASKED: return "masked"; 149 case NOTAPPLICABLE: return "not-applicable"; 150 case UNSUPPORTED: return "unsupported"; 151 case ASTEXT: return "as-text"; 152 case ERROR: return "error"; 153 case NOTANUMBER: return "not-a-number"; 154 case NEGATIVEINFINITY: return "negative-infinity"; 155 case POSITIVEINFINITY: return "positive-infinity"; 156 case NOTPERFORMED: return "not-performed"; 157 case NOTPERMITTED: return "not-permitted"; 158 case NULL: return null; 159 default: return "?"; 160 } 161 } 162 public String getSystem() { 163 return "http://terminology.hl7.org/CodeSystem/data-absent-reason"; 164 } 165 public String getDefinition() { 166 switch (this) { 167 case UNKNOWN: return "The value is expected to exist but is not known."; 168 case ASKEDUNKNOWN: return "The source was asked but does not know the value."; 169 case TEMPUNKNOWN: return "There is reason to expect (from the workflow) that the value may become known."; 170 case NOTASKED: return "The workflow didn't lead to this value being known."; 171 case ASKEDDECLINED: return "The source was asked but declined to answer."; 172 case MASKED: return "The information is not available due to security, privacy or related reasons."; 173 case NOTAPPLICABLE: return "There is no proper value for this element (e.g. last menstrual period for a male)."; 174 case UNSUPPORTED: return "The source system wasn't capable of supporting this element."; 175 case ASTEXT: return "The content of the data is represented in the resource narrative."; 176 case ERROR: return "Some system or workflow process error means that the information is not available."; 177 case NOTANUMBER: return "The numeric value is undefined or unrepresentable due to a floating point processing error."; 178 case NEGATIVEINFINITY: return "The numeric value is excessively low and unrepresentable due to a floating point processing error."; 179 case POSITIVEINFINITY: return "The numeric value is excessively high and unrepresentable due to a floating point processing error."; 180 case NOTPERFORMED: return "The value is not available because the observation procedure (test, etc.) was not performed."; 181 case NOTPERMITTED: return "The value is not permitted in this context (e.g. due to profiles, or the base data types)."; 182 case NULL: return null; 183 default: return "?"; 184 } 185 } 186 public String getDisplay() { 187 switch (this) { 188 case UNKNOWN: return "Unknown"; 189 case ASKEDUNKNOWN: return "Asked But Unknown"; 190 case TEMPUNKNOWN: return "Temporarily Unknown"; 191 case NOTASKED: return "Not Asked"; 192 case ASKEDDECLINED: return "Asked But Declined"; 193 case MASKED: return "Masked"; 194 case NOTAPPLICABLE: return "Not Applicable"; 195 case UNSUPPORTED: return "Unsupported"; 196 case ASTEXT: return "As Text"; 197 case ERROR: return "Error"; 198 case NOTANUMBER: return "Not a Number (NaN)"; 199 case NEGATIVEINFINITY: return "Negative Infinity (NINF)"; 200 case POSITIVEINFINITY: return "Positive Infinity (PINF)"; 201 case NOTPERFORMED: return "Not Performed"; 202 case NOTPERMITTED: return "Not Permitted"; 203 case NULL: return null; 204 default: return "?"; 205 } 206 } 207 208 209}