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 Wed, Nov 11, 2015 10:54-0500 for FHIR v1.0.2 033 034 035public enum ObjectLifecycle { 036 037 /** 038 * Origination / Creation 039 */ 040 _1, 041 /** 042 * Import / Copy from original 043 */ 044 _2, 045 /** 046 * Amendment 047 */ 048 _3, 049 /** 050 * Verification 051 */ 052 _4, 053 /** 054 * Translation 055 */ 056 _5, 057 /** 058 * Access / Use 059 */ 060 _6, 061 /** 062 * De-identification 063 */ 064 _7, 065 /** 066 * Aggregation, summarization, derivation 067 */ 068 _8, 069 /** 070 * Report 071 */ 072 _9, 073 /** 074 * Export / Copy to target 075 */ 076 _10, 077 /** 078 * Disclosure 079 */ 080 _11, 081 /** 082 * Receipt of disclosure 083 */ 084 _12, 085 /** 086 * Archiving 087 */ 088 _13, 089 /** 090 * Logical deletion 091 */ 092 _14, 093 /** 094 * Permanent erasure / Physical destruction 095 */ 096 _15, 097 /** 098 * added to help the parsers 099 */ 100 NULL; 101 public static ObjectLifecycle fromCode(String codeString) throws Exception { 102 if (codeString == null || "".equals(codeString)) 103 return null; 104 if ("1".equals(codeString)) 105 return _1; 106 if ("2".equals(codeString)) 107 return _2; 108 if ("3".equals(codeString)) 109 return _3; 110 if ("4".equals(codeString)) 111 return _4; 112 if ("5".equals(codeString)) 113 return _5; 114 if ("6".equals(codeString)) 115 return _6; 116 if ("7".equals(codeString)) 117 return _7; 118 if ("8".equals(codeString)) 119 return _8; 120 if ("9".equals(codeString)) 121 return _9; 122 if ("10".equals(codeString)) 123 return _10; 124 if ("11".equals(codeString)) 125 return _11; 126 if ("12".equals(codeString)) 127 return _12; 128 if ("13".equals(codeString)) 129 return _13; 130 if ("14".equals(codeString)) 131 return _14; 132 if ("15".equals(codeString)) 133 return _15; 134 throw new Exception("Unknown ObjectLifecycle code '"+codeString+"'"); 135 } 136 public String toCode() { 137 switch (this) { 138 case _1: return "1"; 139 case _2: return "2"; 140 case _3: return "3"; 141 case _4: return "4"; 142 case _5: return "5"; 143 case _6: return "6"; 144 case _7: return "7"; 145 case _8: return "8"; 146 case _9: return "9"; 147 case _10: return "10"; 148 case _11: return "11"; 149 case _12: return "12"; 150 case _13: return "13"; 151 case _14: return "14"; 152 case _15: return "15"; 153 default: return "?"; 154 } 155 } 156 public String getSystem() { 157 return "http://hl7.org/fhir/object-lifecycle"; 158 } 159 public String getDefinition() { 160 switch (this) { 161 case _1: return "Origination / Creation"; 162 case _2: return "Import / Copy from original"; 163 case _3: return "Amendment"; 164 case _4: return "Verification"; 165 case _5: return "Translation"; 166 case _6: return "Access / Use"; 167 case _7: return "De-identification"; 168 case _8: return "Aggregation, summarization, derivation"; 169 case _9: return "Report"; 170 case _10: return "Export / Copy to target"; 171 case _11: return "Disclosure"; 172 case _12: return "Receipt of disclosure"; 173 case _13: return "Archiving"; 174 case _14: return "Logical deletion"; 175 case _15: return "Permanent erasure / Physical destruction"; 176 default: return "?"; 177 } 178 } 179 public String getDisplay() { 180 switch (this) { 181 case _1: return "Origination / Creation"; 182 case _2: return "Import / Copy from original"; 183 case _3: return "Amendment"; 184 case _4: return "Verification"; 185 case _5: return "Translation"; 186 case _6: return "Access / Use"; 187 case _7: return "De-identification"; 188 case _8: return "Aggregation, summarization, derivation"; 189 case _9: return "Report"; 190 case _10: return "Export / Copy to target"; 191 case _11: return "Disclosure"; 192 case _12: return "Receipt of disclosure"; 193 case _13: return "Archiving"; 194 case _14: return "Logical deletion"; 195 case _15: return "Permanent erasure / Physical destruction"; 196 default: return "?"; 197 } 198 } 199 200 201} 202