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