001package org.hl7.fhir.dstu3.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 Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum DataAbsentReason { 038 039 /** 040 * The value is not known. 041 */ 042 UNKNOWN, 043 /** 044 * The source human does not know the value. 045 */ 046 ASKED, 047 /** 048 * There is reason to expect (from the workflow) that the value may become known. 049 */ 050 TEMP, 051 /** 052 * The workflow didn't lead to this value being known. 053 */ 054 NOTASKED, 055 /** 056 * The information is not available due to security, privacy or related reasons. 057 */ 058 MASKED, 059 /** 060 * The source system wasn't capable of supporting this element. 061 */ 062 UNSUPPORTED, 063 /** 064 * The content of the data is represented in the resource narrative. 065 */ 066 ASTEXT, 067 /** 068 * Some system or workflow process error means that the information is not available. 069 */ 070 ERROR, 071 /** 072 * NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value. 073 */ 074 NAN, 075 /** 076 * The value is not available because the observation procedure (test, etc.) was not performed. 077 */ 078 NOTPERFORMED, 079 /** 080 * added to help the parsers 081 */ 082 NULL; 083 public static DataAbsentReason fromCode(String codeString) throws FHIRException { 084 if (codeString == null || "".equals(codeString)) 085 return null; 086 if ("unknown".equals(codeString)) 087 return UNKNOWN; 088 if ("asked".equals(codeString)) 089 return ASKED; 090 if ("temp".equals(codeString)) 091 return TEMP; 092 if ("not-asked".equals(codeString)) 093 return NOTASKED; 094 if ("masked".equals(codeString)) 095 return MASKED; 096 if ("unsupported".equals(codeString)) 097 return UNSUPPORTED; 098 if ("astext".equals(codeString)) 099 return ASTEXT; 100 if ("error".equals(codeString)) 101 return ERROR; 102 if ("NaN".equals(codeString)) 103 return NAN; 104 if ("not-performed".equals(codeString)) 105 return NOTPERFORMED; 106 throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'"); 107 } 108 public String toCode() { 109 switch (this) { 110 case UNKNOWN: return "unknown"; 111 case ASKED: return "asked"; 112 case TEMP: return "temp"; 113 case NOTASKED: return "not-asked"; 114 case MASKED: return "masked"; 115 case UNSUPPORTED: return "unsupported"; 116 case ASTEXT: return "astext"; 117 case ERROR: return "error"; 118 case NAN: return "NaN"; 119 case NOTPERFORMED: return "not-performed"; 120 default: return "?"; 121 } 122 } 123 public String getSystem() { 124 return "http://hl7.org/fhir/data-absent-reason"; 125 } 126 public String getDefinition() { 127 switch (this) { 128 case UNKNOWN: return "The value is not known."; 129 case ASKED: return "The source human does not know the value."; 130 case TEMP: return "There is reason to expect (from the workflow) that the value may become known."; 131 case NOTASKED: return "The workflow didn't lead to this value being known."; 132 case MASKED: return "The information is not available due to security, privacy or related reasons."; 133 case UNSUPPORTED: return "The source system wasn't capable of supporting this element."; 134 case ASTEXT: return "The content of the data is represented in the resource narrative."; 135 case ERROR: return "Some system or workflow process error means that the information is not available."; 136 case NAN: return "NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value."; 137 case NOTPERFORMED: return "The value is not available because the observation procedure (test, etc.) was not performed."; 138 default: return "?"; 139 } 140 } 141 public String getDisplay() { 142 switch (this) { 143 case UNKNOWN: return "Unknown"; 144 case ASKED: return "Asked"; 145 case TEMP: return "Temp"; 146 case NOTASKED: return "Not Asked"; 147 case MASKED: return "Masked"; 148 case UNSUPPORTED: return "Unsupported"; 149 case ASTEXT: return "As Text"; 150 case ERROR: return "Error"; 151 case NAN: return "Not a Number"; 152 case NOTPERFORMED: return "Not Performed"; 153 default: return "?"; 154 } 155 } 156 157 158} 159