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 Thu, Jul 23, 2015 16:50-0400 for FHIR v0.5.0 033 034 035public enum ObservationValueabsentreason { 036 037 /** 038 * The value is not known 039 */ 040 UNKNOWN, 041 /** 042 * The source human does not know the value 043 */ 044 ASKED, 045 /** 046 * There is reason to expect (from the workflow) that the value may become known 047 */ 048 TEMP, 049 /** 050 * The workflow didn't lead to this value being known 051 */ 052 NOTASKED, 053 /** 054 * The information is not available due to security, privacy or related reasons 055 */ 056 MASKED, 057 /** 058 * The source system wasn't capable of supporting this element 059 */ 060 UNSUPPORTED, 061 /** 062 * The content of the data is represented in the resource narrative 063 */ 064 ASTEXT, 065 /** 066 * Some system or workflow process error means that the information is not available 067 */ 068 ERROR, 069 /** 070 * added to help the parsers 071 */ 072 NULL; 073 public static ObservationValueabsentreason fromCode(String codeString) throws Exception { 074 if (codeString == null || "".equals(codeString)) 075 return null; 076 if ("unknown".equals(codeString)) 077 return UNKNOWN; 078 if ("asked".equals(codeString)) 079 return ASKED; 080 if ("temp".equals(codeString)) 081 return TEMP; 082 if ("notasked".equals(codeString)) 083 return NOTASKED; 084 if ("masked".equals(codeString)) 085 return MASKED; 086 if ("unsupported".equals(codeString)) 087 return UNSUPPORTED; 088 if ("astext".equals(codeString)) 089 return ASTEXT; 090 if ("error".equals(codeString)) 091 return ERROR; 092 throw new Exception("Unknown ObservationValueabsentreason code '"+codeString+"'"); 093 } 094 public String toCode() { 095 switch (this) { 096 case UNKNOWN: return "unknown"; 097 case ASKED: return "asked"; 098 case TEMP: return "temp"; 099 case NOTASKED: return "notasked"; 100 case MASKED: return "masked"; 101 case UNSUPPORTED: return "unsupported"; 102 case ASTEXT: return "astext"; 103 case ERROR: return "error"; 104 default: return "?"; 105 } 106 } 107 public String getSystem() { 108 return "http://hl7.org/fhir/data-absent-reason"; 109 } 110 public String getDefinition() { 111 switch (this) { 112 case UNKNOWN: return "The value is not known"; 113 case ASKED: return "The source human does not know the value"; 114 case TEMP: return "There is reason to expect (from the workflow) that the value may become known"; 115 case NOTASKED: return "The workflow didn't lead to this value being known"; 116 case MASKED: return "The information is not available due to security, privacy or related reasons"; 117 case UNSUPPORTED: return "The source system wasn't capable of supporting this element"; 118 case ASTEXT: return "The content of the data is represented in the resource narrative"; 119 case ERROR: return "Some system or workflow process error means that the information is not available"; 120 default: return "?"; 121 } 122 } 123 public String getDisplay() { 124 switch (this) { 125 case UNKNOWN: return "Unknown"; 126 case ASKED: return "Asked"; 127 case TEMP: return "Temp"; 128 case NOTASKED: return "Not Asked"; 129 case MASKED: return "Masked"; 130 case UNSUPPORTED: return "Unsupported"; 131 case ASTEXT: return "As Text"; 132 case ERROR: return "Error"; 133 default: return "?"; 134 } 135 } 136 137 138} 139