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 V3NullFlavor { 036 037 /** 038 * Description:The value is exceptional (missing, omitted, incomplete, improper). No information as to the reason for being an exceptional value is provided. This is the most general exceptional value. It is also the default exceptional value. 039 */ 040 NI, 041 /** 042 * Description:The value as represented in the instance is not a member of the set of permitted data values in the constrained value domain of a variable. 043 */ 044 INV, 045 /** 046 * Description:An actual value may exist, but it must be derived from the provided information (usually an EXPR generic data type extension will be used to convey the derivation expressionexpression . 047 */ 048 DER, 049 /** 050 * Description:The actual value is not a member of the set of permitted data values in the constrained value domain of a variable. (e.g. concept not provided by required code system). 051 052 053 Usage Notes: This flavor and its specializations are most commonly used with the CD datatype and its flavors. However, it may apply to *any* datatype where the constraints of the type are tighter than can be conveyed. For example, a PQ that is for a true measured amount whose units are not supported in UCUM, a need to convey a REAL when the type has been constrained to INT, etc. 054 055 With coded datatypes, this null flavor may only be used if the vocabulary binding has a coding strength of CNE. By definition, all local codes and original text are part of the value set if the coding strength is CWE. 056 */ 057 OTH, 058 /** 059 * Negative infinity of numbers. 060 */ 061 NINF, 062 /** 063 * Positive infinity of numbers. 064 */ 065 PINF, 066 /** 067 * Description: The actual value has not yet been encoded within the approved value domain. 068 069 070 Example: Original text or a local code has been specified but translation or encoding to the approved value set has not yet occurred due to limitations of the sending system. Original text has been captured for a PQ, but not attempt has been made to split the value and unit or to encode the unit in UCUM. 071 072 073 Usage Notes: If it is known that it is not possible to encode the concept, OTH should be used instead. However, use of UNC does not necessarily guarantee the concept will be encodable, only that encoding has not been attempted. 074 075 Data type properties such as original text and translations may be present when this null flavor is included. 076 */ 077 UNC, 078 /** 079 * There is information on this item available but it has not been provided by the sender due to security, privacy or other reasons. There may be an alternate mechanism for gaining access to this information. 080 081 Note: using this null flavor does provide information that may be a breach of confidentiality, even though no detail data is provided. Its primary purpose is for those circumstances where it is necessary to inform the receiver that the information does exist without providing any detail. 082 */ 083 MSK, 084 /** 085 * Known to have no proper value (e.g. last menstrual period for a male). 086 */ 087 NA, 088 /** 089 * Description:A proper value is applicable, but not known. 090 091 092 Usage Notes: This means the actual value is not known. If the only thing that is unknown is how to properly express the value in the necessary constraints (value set, datatype, etc.), then the OTH or UNC flavor should be used. No properties should be included for a datatype with this property unless: 093 094 095 Those properties themselves directly translate to a semantic of "unknown". (E.g. a local code sent as a translation that conveys 'unknown') 096 Those properties further qualify the nature of what is unknown. (E.g. specifying a use code of "H" and a URL prefix of "tel:" to convey that it is the home phone number that is unknown.) 097 */ 098 UNK, 099 /** 100 * Information was sought but not found (e.g. patient was asked but didn't know) 101 */ 102 ASKU, 103 /** 104 * Information is not available at this time but it is expected that it will be available later. 105 */ 106 NAV, 107 /** 108 * This information has not been sought (e.g. patient was not asked) 109 */ 110 NASK, 111 /** 112 * Description:The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material; e.g. 'Add 10mg of ingredient X, 50mg of ingredient Y, and sufficient quantity of water to 100mL.' The null flavor would be used to express the quantity of water. 113 */ 114 QS, 115 /** 116 * The content is greater than zero, but too small to be quantified. 117 */ 118 TRC, 119 /** 120 * Value is not present in a message. This is only defined in messages, never in application data! All values not present in the message must be replaced by the applicable default, or no-information (NI) as the default of all defaults. 121 */ 122 NP, 123 /** 124 * added to help the parsers 125 */ 126 NULL; 127 public static V3NullFlavor fromCode(String codeString) throws Exception { 128 if (codeString == null || "".equals(codeString)) 129 return null; 130 if ("NI".equals(codeString)) 131 return NI; 132 if ("INV".equals(codeString)) 133 return INV; 134 if ("DER".equals(codeString)) 135 return DER; 136 if ("OTH".equals(codeString)) 137 return OTH; 138 if ("NINF".equals(codeString)) 139 return NINF; 140 if ("PINF".equals(codeString)) 141 return PINF; 142 if ("UNC".equals(codeString)) 143 return UNC; 144 if ("MSK".equals(codeString)) 145 return MSK; 146 if ("NA".equals(codeString)) 147 return NA; 148 if ("UNK".equals(codeString)) 149 return UNK; 150 if ("ASKU".equals(codeString)) 151 return ASKU; 152 if ("NAV".equals(codeString)) 153 return NAV; 154 if ("NASK".equals(codeString)) 155 return NASK; 156 if ("QS".equals(codeString)) 157 return QS; 158 if ("TRC".equals(codeString)) 159 return TRC; 160 if ("NP".equals(codeString)) 161 return NP; 162 throw new Exception("Unknown V3NullFlavor code '"+codeString+"'"); 163 } 164 public String toCode() { 165 switch (this) { 166 case NI: return "NI"; 167 case INV: return "INV"; 168 case DER: return "DER"; 169 case OTH: return "OTH"; 170 case NINF: return "NINF"; 171 case PINF: return "PINF"; 172 case UNC: return "UNC"; 173 case MSK: return "MSK"; 174 case NA: return "NA"; 175 case UNK: return "UNK"; 176 case ASKU: return "ASKU"; 177 case NAV: return "NAV"; 178 case NASK: return "NASK"; 179 case QS: return "QS"; 180 case TRC: return "TRC"; 181 case NP: return "NP"; 182 default: return "?"; 183 } 184 } 185 public String getSystem() { 186 return "http://hl7.org/fhir/v3/NullFlavor"; 187 } 188 public String getDefinition() { 189 switch (this) { 190 case NI: return "Description:The value is exceptional (missing, omitted, incomplete, improper). No information as to the reason for being an exceptional value is provided. This is the most general exceptional value. It is also the default exceptional value."; 191 case INV: return "Description:The value as represented in the instance is not a member of the set of permitted data values in the constrained value domain of a variable."; 192 case DER: return "Description:An actual value may exist, but it must be derived from the provided information (usually an EXPR generic data type extension will be used to convey the derivation expressionexpression ."; 193 case OTH: return "Description:The actual value is not a member of the set of permitted data values in the constrained value domain of a variable. (e.g. concept not provided by required code system).\r\n\n \n Usage Notes: This flavor and its specializations are most commonly used with the CD datatype and its flavors. However, it may apply to *any* datatype where the constraints of the type are tighter than can be conveyed. For example, a PQ that is for a true measured amount whose units are not supported in UCUM, a need to convey a REAL when the type has been constrained to INT, etc.\r\n\n With coded datatypes, this null flavor may only be used if the vocabulary binding has a coding strength of CNE. By definition, all local codes and original text are part of the value set if the coding strength is CWE."; 194 case NINF: return "Negative infinity of numbers."; 195 case PINF: return "Positive infinity of numbers."; 196 case UNC: return "Description: The actual value has not yet been encoded within the approved value domain.\r\n\n \n Example: Original text or a local code has been specified but translation or encoding to the approved value set has not yet occurred due to limitations of the sending system. Original text has been captured for a PQ, but not attempt has been made to split the value and unit or to encode the unit in UCUM.\r\n\n \n Usage Notes: If it is known that it is not possible to encode the concept, OTH should be used instead. However, use of UNC does not necessarily guarantee the concept will be encodable, only that encoding has not been attempted.\r\n\n Data type properties such as original text and translations may be present when this null flavor is included."; 197 case MSK: return "There is information on this item available but it has not been provided by the sender due to security, privacy or other reasons. There may be an alternate mechanism for gaining access to this information.\r\n\n Note: using this null flavor does provide information that may be a breach of confidentiality, even though no detail data is provided. Its primary purpose is for those circumstances where it is necessary to inform the receiver that the information does exist without providing any detail."; 198 case NA: return "Known to have no proper value (e.g. last menstrual period for a male)."; 199 case UNK: return "Description:A proper value is applicable, but not known.\r\n\n \n Usage Notes: This means the actual value is not known. If the only thing that is unknown is how to properly express the value in the necessary constraints (value set, datatype, etc.), then the OTH or UNC flavor should be used. No properties should be included for a datatype with this property unless:\r\n\n \n Those properties themselves directly translate to a semantic of \"unknown\". (E.g. a local code sent as a translation that conveys 'unknown')\n Those properties further qualify the nature of what is unknown. (E.g. specifying a use code of \"H\" and a URL prefix of \"tel:\" to convey that it is the home phone number that is unknown.)"; 200 case ASKU: return "Information was sought but not found (e.g. patient was asked but didn't know)"; 201 case NAV: return "Information is not available at this time but it is expected that it will be available later."; 202 case NASK: return "This information has not been sought (e.g. patient was not asked)"; 203 case QS: return "Description:The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material; e.g. 'Add 10mg of ingredient X, 50mg of ingredient Y, and sufficient quantity of water to 100mL.' The null flavor would be used to express the quantity of water."; 204 case TRC: return "The content is greater than zero, but too small to be quantified."; 205 case NP: return "Value is not present in a message. This is only defined in messages, never in application data! All values not present in the message must be replaced by the applicable default, or no-information (NI) as the default of all defaults."; 206 default: return "?"; 207 } 208 } 209 public String getDisplay() { 210 switch (this) { 211 case NI: return "NoInformation"; 212 case INV: return "invalid"; 213 case DER: return "derived"; 214 case OTH: return "other"; 215 case NINF: return "negative infinity"; 216 case PINF: return "positive infinity"; 217 case UNC: return "un-encoded"; 218 case MSK: return "masked"; 219 case NA: return "not applicable"; 220 case UNK: return "unknown"; 221 case ASKU: return "asked but unknown"; 222 case NAV: return "temporarily unavailable"; 223 case NASK: return "not asked"; 224 case QS: return "Sufficient Quantity"; 225 case TRC: return "trace"; 226 case NP: return "not present"; 227 default: return "?"; 228 } 229 } 230 231 232} 233