001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.exceptions.FHIRException; 056 057public enum DataAbsentReason { 058 059 /** 060 * The value is expected to exist but is not known. 061 */ 062 UNKNOWN, 063 /** 064 * The source was asked but does not know the value. 065 */ 066 ASKEDUNKNOWN, 067 /** 068 * There is reason to expect (from the workflow) that the value may become known. 069 */ 070 TEMPUNKNOWN, 071 /** 072 * The workflow didn't lead to this value being known. 073 */ 074 NOTASKED, 075 /** 076 * The source was asked but declined to answer. 077 */ 078 ASKEDDECLINED, 079 /** 080 * The information is not available due to security, privacy or related reasons. 081 */ 082 MASKED, 083 /** 084 * There is no proper value for this element (e.g. last menstrual period for a male). 085 */ 086 NOTAPPLICABLE, 087 /** 088 * The source system wasn't capable of supporting this element. 089 */ 090 UNSUPPORTED, 091 /** 092 * The content of the data is represented in the resource narrative. 093 */ 094 ASTEXT, 095 /** 096 * Some system or workflow process error means that the information is not available. 097 */ 098 ERROR, 099 /** 100 * The numeric value is undefined or unrepresentable due to a floating point processing error. 101 */ 102 NOTANUMBER, 103 /** 104 * The numeric value is excessively low and unrepresentable due to a floating point processing error. 105 */ 106 NEGATIVEINFINITY, 107 /** 108 * The numeric value is excessively high and unrepresentable due to a floating point processing error. 109 */ 110 POSITIVEINFINITY, 111 /** 112 * The value is not available because the observation procedure (test, etc.) was not performed. 113 */ 114 NOTPERFORMED, 115 /** 116 * The value is not permitted in this context (e.g. due to profiles, or the base data types). 117 */ 118 NOTPERMITTED, 119 /** 120 * added to help the parsers 121 */ 122 NULL; 123 public static DataAbsentReason fromCode(String codeString) throws FHIRException { 124 if (codeString == null || "".equals(codeString)) 125 return null; 126 if ("unknown".equals(codeString)) 127 return UNKNOWN; 128 if ("asked-unknown".equals(codeString)) 129 return ASKEDUNKNOWN; 130 if ("temp-unknown".equals(codeString)) 131 return TEMPUNKNOWN; 132 if ("not-asked".equals(codeString)) 133 return NOTASKED; 134 if ("asked-declined".equals(codeString)) 135 return ASKEDDECLINED; 136 if ("masked".equals(codeString)) 137 return MASKED; 138 if ("not-applicable".equals(codeString)) 139 return NOTAPPLICABLE; 140 if ("unsupported".equals(codeString)) 141 return UNSUPPORTED; 142 if ("as-text".equals(codeString)) 143 return ASTEXT; 144 if ("error".equals(codeString)) 145 return ERROR; 146 if ("not-a-number".equals(codeString)) 147 return NOTANUMBER; 148 if ("negative-infinity".equals(codeString)) 149 return NEGATIVEINFINITY; 150 if ("positive-infinity".equals(codeString)) 151 return POSITIVEINFINITY; 152 if ("not-performed".equals(codeString)) 153 return NOTPERFORMED; 154 if ("not-permitted".equals(codeString)) 155 return NOTPERMITTED; 156 throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'"); 157 } 158 public String toCode() { 159 switch (this) { 160 case UNKNOWN: return "unknown"; 161 case ASKEDUNKNOWN: return "asked-unknown"; 162 case TEMPUNKNOWN: return "temp-unknown"; 163 case NOTASKED: return "not-asked"; 164 case ASKEDDECLINED: return "asked-declined"; 165 case MASKED: return "masked"; 166 case NOTAPPLICABLE: return "not-applicable"; 167 case UNSUPPORTED: return "unsupported"; 168 case ASTEXT: return "as-text"; 169 case ERROR: return "error"; 170 case NOTANUMBER: return "not-a-number"; 171 case NEGATIVEINFINITY: return "negative-infinity"; 172 case POSITIVEINFINITY: return "positive-infinity"; 173 case NOTPERFORMED: return "not-performed"; 174 case NOTPERMITTED: return "not-permitted"; 175 default: return "?"; 176 } 177 } 178 public String getSystem() { 179 return "http://terminology.hl7.org/CodeSystem/data-absent-reason"; 180 } 181 public String getDefinition() { 182 switch (this) { 183 case UNKNOWN: return "The value is expected to exist but is not known."; 184 case ASKEDUNKNOWN: return "The source was asked but does not know the value."; 185 case TEMPUNKNOWN: return "There is reason to expect (from the workflow) that the value may become known."; 186 case NOTASKED: return "The workflow didn't lead to this value being known."; 187 case ASKEDDECLINED: return "The source was asked but declined to answer."; 188 case MASKED: return "The information is not available due to security, privacy or related reasons."; 189 case NOTAPPLICABLE: return "There is no proper value for this element (e.g. last menstrual period for a male)."; 190 case UNSUPPORTED: return "The source system wasn't capable of supporting this element."; 191 case ASTEXT: return "The content of the data is represented in the resource narrative."; 192 case ERROR: return "Some system or workflow process error means that the information is not available."; 193 case NOTANUMBER: return "The numeric value is undefined or unrepresentable due to a floating point processing error."; 194 case NEGATIVEINFINITY: return "The numeric value is excessively low and unrepresentable due to a floating point processing error."; 195 case POSITIVEINFINITY: return "The numeric value is excessively high and unrepresentable due to a floating point processing error."; 196 case NOTPERFORMED: return "The value is not available because the observation procedure (test, etc.) was not performed."; 197 case NOTPERMITTED: return "The value is not permitted in this context (e.g. due to profiles, or the base data types)."; 198 default: return "?"; 199 } 200 } 201 public String getDisplay() { 202 switch (this) { 203 case UNKNOWN: return "Unknown"; 204 case ASKEDUNKNOWN: return "Asked But Unknown"; 205 case TEMPUNKNOWN: return "Temporarily Unknown"; 206 case NOTASKED: return "Not Asked"; 207 case ASKEDDECLINED: return "Asked But Declined"; 208 case MASKED: return "Masked"; 209 case NOTAPPLICABLE: return "Not Applicable"; 210 case UNSUPPORTED: return "Unsupported"; 211 case ASTEXT: return "As Text"; 212 case ERROR: return "Error"; 213 case NOTANUMBER: return "Not a Number (NaN)"; 214 case NEGATIVEINFINITY: return "Negative Infinity (NINF)"; 215 case POSITIVEINFINITY: return "Positive Infinity (PINF)"; 216 case NOTPERFORMED: return "Not Performed"; 217 case NOTPERMITTED: return "Not Permitted"; 218 default: return "?"; 219 } 220 } 221 222 223} 224