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 FHIRVersion { 041 042 /** 043 * Oldest archived version of FHIR. 044 */ 045 _0_01, 046 /** 047 * 1st Draft for Comment (Sept 2012 Ballot). 048 */ 049 _0_05, 050 /** 051 * 2nd Draft for Comment (January 2013 Ballot). 052 */ 053 _0_06, 054 /** 055 * DSTU 1 Ballot version. 056 */ 057 _0_11, 058 /** 059 * DSTU 1 Official version. 060 */ 061 _0_0_80, 062 /** 063 * DSTU 1 Official version Technical Errata #1. 064 */ 065 _0_0_81, 066 /** 067 * DSTU 1 Official version Technical Errata #2. 068 */ 069 _0_0_82, 070 /** 071 * Draft For Comment (January 2015 Ballot). 072 */ 073 _0_4_0, 074 /** 075 * DSTU 2 Ballot version (May 2015 Ballot). 076 */ 077 _0_5_0, 078 /** 079 * DSTU 2 QA Preview + CQIF Ballot (Sep 2015). 080 */ 081 _1_0_0, 082 /** 083 * DSTU 2 (Official version). 084 */ 085 _1_0_1, 086 /** 087 * DSTU 2 (Official version) with 1 technical errata. 088 */ 089 _1_0_2, 090 /** 091 * GAO Ballot + draft changes to main FHIR standard. 092 */ 093 _1_1_0, 094 /** 095 * CQF on FHIR Ballot + Connectathon 12 (Montreal). 096 */ 097 _1_4_0, 098 /** 099 * FHIR STU3 Ballot + Connectathon 13 (Baltimore). 100 */ 101 _1_6_0, 102 /** 103 * FHIR STU3 Candidate + Connectathon 14 (San Antonio). 104 */ 105 _1_8_0, 106 /** 107 * FHIR Release 3 (STU). 108 */ 109 _3_0_0, 110 /** 111 * FHIR Release 3 (STU) with 1 technical errata. 112 */ 113 _3_0_1, 114 /** 115 * R4 Ballot #1. 116 */ 117 _3_3_0, 118 /** 119 * R4 Ballot #2. 120 */ 121 _3_5_0, 122 /** 123 * FHIR Release 4 (Normative + STU). 124 */ 125 _4_0_0, 126 /** 127 * added to help the parsers 128 */ 129 NULL; 130 public static FHIRVersion fromCode(String codeString) throws FHIRException { 131 if (codeString == null || "".equals(codeString)) 132 return null; 133 if ("0.01".equals(codeString)) 134 return _0_01; 135 if ("0.05".equals(codeString)) 136 return _0_05; 137 if ("0.06".equals(codeString)) 138 return _0_06; 139 if ("0.11".equals(codeString)) 140 return _0_11; 141 if ("0.0.80".equals(codeString)) 142 return _0_0_80; 143 if ("0.0.81".equals(codeString)) 144 return _0_0_81; 145 if ("0.0.82".equals(codeString)) 146 return _0_0_82; 147 if ("0.4.0".equals(codeString)) 148 return _0_4_0; 149 if ("0.5.0".equals(codeString)) 150 return _0_5_0; 151 if ("1.0.0".equals(codeString)) 152 return _1_0_0; 153 if ("1.0.1".equals(codeString)) 154 return _1_0_1; 155 if ("1.0.2".equals(codeString)) 156 return _1_0_2; 157 if ("1.1.0".equals(codeString)) 158 return _1_1_0; 159 if ("1.4.0".equals(codeString)) 160 return _1_4_0; 161 if ("1.6.0".equals(codeString)) 162 return _1_6_0; 163 if ("1.8.0".equals(codeString)) 164 return _1_8_0; 165 if ("3.0.0".equals(codeString)) 166 return _3_0_0; 167 if ("3.0.1".equals(codeString)) 168 return _3_0_1; 169 if ("3.3.0".equals(codeString)) 170 return _3_3_0; 171 if ("3.5.0".equals(codeString)) 172 return _3_5_0; 173 if ("4.0.0".equals(codeString)) 174 return _4_0_0; 175 throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'"); 176 } 177 public String toCode() { 178 switch (this) { 179 case _0_01: return "0.01"; 180 case _0_05: return "0.05"; 181 case _0_06: return "0.06"; 182 case _0_11: return "0.11"; 183 case _0_0_80: return "0.0.80"; 184 case _0_0_81: return "0.0.81"; 185 case _0_0_82: return "0.0.82"; 186 case _0_4_0: return "0.4.0"; 187 case _0_5_0: return "0.5.0"; 188 case _1_0_0: return "1.0.0"; 189 case _1_0_1: return "1.0.1"; 190 case _1_0_2: return "1.0.2"; 191 case _1_1_0: return "1.1.0"; 192 case _1_4_0: return "1.4.0"; 193 case _1_6_0: return "1.6.0"; 194 case _1_8_0: return "1.8.0"; 195 case _3_0_0: return "3.0.0"; 196 case _3_0_1: return "3.0.1"; 197 case _3_3_0: return "3.3.0"; 198 case _3_5_0: return "3.5.0"; 199 case _4_0_0: return "4.0.0"; 200 case NULL: return null; 201 default: return "?"; 202 } 203 } 204 public String getSystem() { 205 return "http://hl7.org/fhir/FHIR-version"; 206 } 207 public String getDefinition() { 208 switch (this) { 209 case _0_01: return "Oldest archived version of FHIR."; 210 case _0_05: return "1st Draft for Comment (Sept 2012 Ballot)."; 211 case _0_06: return "2nd Draft for Comment (January 2013 Ballot)."; 212 case _0_11: return "DSTU 1 Ballot version."; 213 case _0_0_80: return "DSTU 1 Official version."; 214 case _0_0_81: return "DSTU 1 Official version Technical Errata #1."; 215 case _0_0_82: return "DSTU 1 Official version Technical Errata #2."; 216 case _0_4_0: return "Draft For Comment (January 2015 Ballot)."; 217 case _0_5_0: return "DSTU 2 Ballot version (May 2015 Ballot)."; 218 case _1_0_0: return "DSTU 2 QA Preview + CQIF Ballot (Sep 2015)."; 219 case _1_0_1: return "DSTU 2 (Official version)."; 220 case _1_0_2: return "DSTU 2 (Official version) with 1 technical errata."; 221 case _1_1_0: return "GAO Ballot + draft changes to main FHIR standard."; 222 case _1_4_0: return "CQF on FHIR Ballot + Connectathon 12 (Montreal)."; 223 case _1_6_0: return "FHIR STU3 Ballot + Connectathon 13 (Baltimore)."; 224 case _1_8_0: return "FHIR STU3 Candidate + Connectathon 14 (San Antonio)."; 225 case _3_0_0: return "FHIR Release 3 (STU)."; 226 case _3_0_1: return "FHIR Release 3 (STU) with 1 technical errata."; 227 case _3_3_0: return "R4 Ballot #1."; 228 case _3_5_0: return "R4 Ballot #2."; 229 case _4_0_0: return "FHIR Release 4 (Normative + STU)."; 230 case NULL: return null; 231 default: return "?"; 232 } 233 } 234 public String getDisplay() { 235 switch (this) { 236 case _0_01: return "0.01"; 237 case _0_05: return "0.05"; 238 case _0_06: return "0.06"; 239 case _0_11: return "0.11"; 240 case _0_0_80: return "0.0.80"; 241 case _0_0_81: return "0.0.81"; 242 case _0_0_82: return "0.0.82"; 243 case _0_4_0: return "0.4.0"; 244 case _0_5_0: return "0.5.0"; 245 case _1_0_0: return "1.0.0"; 246 case _1_0_1: return "1.0.1"; 247 case _1_0_2: return "1.0.2"; 248 case _1_1_0: return "1.1.0"; 249 case _1_4_0: return "1.4.0"; 250 case _1_6_0: return "1.6.0"; 251 case _1_8_0: return "1.8.0"; 252 case _3_0_0: return "3.0.0"; 253 case _3_0_1: return "3.0.1"; 254 case _3_3_0: return "3.3.0"; 255 case _3_5_0: return "3.5.0"; 256 case _4_0_0: return "4.0.0"; 257 case NULL: return null; 258 default: return "?"; 259 } 260 } 261 262 263}