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 V3NullFlavor {
058
059        /**
060         * 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.
061         */
062        NI, 
063        /**
064         * 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.
065         */
066        INV, 
067        /**
068         * 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 .
069         */
070        DER, 
071        /**
072         * 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).
073
074                        
075                           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.
076
077                        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.
078         */
079        OTH, 
080        /**
081         * Negative infinity of numbers.
082         */
083        NINF, 
084        /**
085         * Positive infinity of numbers.
086         */
087        PINF, 
088        /**
089         * Description: The actual value has not yet been encoded within the approved value domain.
090
091                        
092                           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.
093
094                        
095                           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.
096
097                        Data type properties such as original text and translations may be present when this null flavor is included.
098         */
099        UNC, 
100        /**
101         * 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.
102
103                        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.
104         */
105        MSK, 
106        /**
107         * Known to have no proper value (e.g., last menstrual period for a male).
108         */
109        NA, 
110        /**
111         * Description:A proper value is applicable, but not known.
112
113                        
114                           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:
115
116                        
117                           Those properties themselves directly translate to a semantic of "unknown".  (E.g. a local code sent as a translation that conveys 'unknown')
118                           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.)
119         */
120        UNK, 
121        /**
122         * Information was sought but not found (e.g., patient was asked but didn't know)
123         */
124        ASKU, 
125        /**
126         * Information is not available at this time but it is expected that it will be available later.
127         */
128        NAV, 
129        /**
130         * This information has not been sought (e.g., patient was not asked)
131         */
132        NASK, 
133        /**
134         * Information is not available at this time (with no expectation regarding whether it will or will not be available in the future).
135         */
136        NAVU, 
137        /**
138         * 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.
139         */
140        QS, 
141        /**
142         * The content is greater than zero, but too small to be quantified.
143         */
144        TRC, 
145        /**
146         * 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.
147         */
148        NP, 
149        /**
150         * added to help the parsers
151         */
152        NULL;
153        public static V3NullFlavor fromCode(String codeString) throws FHIRException {
154            if (codeString == null || "".equals(codeString))
155                return null;
156        if ("NI".equals(codeString))
157          return NI;
158        if ("INV".equals(codeString))
159          return INV;
160        if ("DER".equals(codeString))
161          return DER;
162        if ("OTH".equals(codeString))
163          return OTH;
164        if ("NINF".equals(codeString))
165          return NINF;
166        if ("PINF".equals(codeString))
167          return PINF;
168        if ("UNC".equals(codeString))
169          return UNC;
170        if ("MSK".equals(codeString))
171          return MSK;
172        if ("NA".equals(codeString))
173          return NA;
174        if ("UNK".equals(codeString))
175          return UNK;
176        if ("ASKU".equals(codeString))
177          return ASKU;
178        if ("NAV".equals(codeString))
179          return NAV;
180        if ("NASK".equals(codeString))
181          return NASK;
182        if ("NAVU".equals(codeString))
183          return NAVU;
184        if ("QS".equals(codeString))
185          return QS;
186        if ("TRC".equals(codeString))
187          return TRC;
188        if ("NP".equals(codeString))
189          return NP;
190        throw new FHIRException("Unknown V3NullFlavor code '"+codeString+"'");
191        }
192        public String toCode() {
193          switch (this) {
194            case NI: return "NI";
195            case INV: return "INV";
196            case DER: return "DER";
197            case OTH: return "OTH";
198            case NINF: return "NINF";
199            case PINF: return "PINF";
200            case UNC: return "UNC";
201            case MSK: return "MSK";
202            case NA: return "NA";
203            case UNK: return "UNK";
204            case ASKU: return "ASKU";
205            case NAV: return "NAV";
206            case NASK: return "NASK";
207            case NAVU: return "NAVU";
208            case QS: return "QS";
209            case TRC: return "TRC";
210            case NP: return "NP";
211            default: return "?";
212          }
213        }
214        public String getSystem() {
215          return "http://terminology.hl7.org/CodeSystem/v3-NullFlavor";
216        }
217        public String getDefinition() {
218          switch (this) {
219            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.";
220            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.";
221            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 .";
222            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.";
223            case NINF: return "Negative infinity of numbers.";
224            case PINF: return "Positive infinity of numbers.";
225            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.";
226            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.";
227            case NA: return "Known to have no proper value (e.g., last menstrual period for a male).";
228            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.)";
229            case ASKU: return "Information was sought but not found (e.g., patient was asked but didn't know)";
230            case NAV: return "Information is not available at this time but it is expected that it will be available later.";
231            case NASK: return "This information has not been sought (e.g., patient was not asked)";
232            case NAVU: return "Information is not available at this time (with no expectation regarding whether it will or will not be available in the future).";
233            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.";
234            case TRC: return "The content is greater than zero, but too small to be quantified.";
235            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.";
236            default: return "?";
237          }
238        }
239        public String getDisplay() {
240          switch (this) {
241            case NI: return "NoInformation";
242            case INV: return "invalid";
243            case DER: return "derived";
244            case OTH: return "other";
245            case NINF: return "negative infinity";
246            case PINF: return "positive infinity";
247            case UNC: return "un-encoded";
248            case MSK: return "masked";
249            case NA: return "not applicable";
250            case UNK: return "unknown";
251            case ASKU: return "asked but unknown";
252            case NAV: return "temporarily unavailable";
253            case NASK: return "not asked";
254            case NAVU: return "Not available";
255            case QS: return "Sufficient Quantity";
256            case TRC: return "trace";
257            case NP: return "not present";
258            default: return "?";
259          }
260    }
261
262
263}
264