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            default: return "?";
159          }
160        }
161        public String getSystem() {
162          return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
163        }
164        public String getDefinition() {
165          switch (this) {
166            case UNKNOWN: return "The value is expected to exist but is not known.";
167            case ASKEDUNKNOWN: return "The source was asked but does not know the value.";
168            case TEMPUNKNOWN: return "There is reason to expect (from the workflow) that the value may become known.";
169            case NOTASKED: return "The workflow didn't lead to this value being known.";
170            case ASKEDDECLINED: return "The source was asked but declined to answer.";
171            case MASKED: return "The information is not available due to security, privacy or related reasons.";
172            case NOTAPPLICABLE: return "There is no proper value for this element (e.g. last menstrual period for a male).";
173            case UNSUPPORTED: return "The source system wasn't capable of supporting this element.";
174            case ASTEXT: return "The content of the data is represented in the resource narrative.";
175            case ERROR: return "Some system or workflow process error means that the information is not available.";
176            case NOTANUMBER: return "The numeric value is undefined or unrepresentable due to a floating point processing error.";
177            case NEGATIVEINFINITY: return "The numeric value is excessively low and unrepresentable due to a floating point processing error.";
178            case POSITIVEINFINITY: return "The numeric value is excessively high and unrepresentable due to a floating point processing error.";
179            case NOTPERFORMED: return "The value is not available because the observation procedure (test, etc.) was not performed.";
180            case NOTPERMITTED: return "The value is not permitted in this context (e.g. due to profiles, or the base data types).";
181            default: return "?";
182          }
183        }
184        public String getDisplay() {
185          switch (this) {
186            case UNKNOWN: return "Unknown";
187            case ASKEDUNKNOWN: return "Asked But Unknown";
188            case TEMPUNKNOWN: return "Temporarily Unknown";
189            case NOTASKED: return "Not Asked";
190            case ASKEDDECLINED: return "Asked But Declined";
191            case MASKED: return "Masked";
192            case NOTAPPLICABLE: return "Not Applicable";
193            case UNSUPPORTED: return "Unsupported";
194            case ASTEXT: return "As Text";
195            case ERROR: return "Error";
196            case NOTANUMBER: return "Not a Number (NaN)";
197            case NEGATIVEINFINITY: return "Negative Infinity (NINF)";
198            case POSITIVEINFINITY: return "Positive Infinity (PINF)";
199            case NOTPERFORMED: return "Not Performed";
200            case NOTPERMITTED: return "Not Permitted";
201            default: return "?";
202          }
203    }
204
205
206}