001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.exceptions.FHIRException; 056 057public enum FHIRVersion { 058 059 /** 060 * Oldest archived version of FHIR. 061 */ 062 _0_01, 063 /** 064 * 1st Draft for Comment (Sept 2012 Ballot). 065 */ 066 _0_05, 067 /** 068 * 2nd Draft for Comment (January 2013 Ballot). 069 */ 070 _0_06, 071 /** 072 * DSTU 1 Ballot version. 073 */ 074 _0_11, 075 /** 076 * DSTU 1 Official version. 077 */ 078 _0_0_80, 079 /** 080 * DSTU 1 Official version Technical Errata #1. 081 */ 082 _0_0_81, 083 /** 084 * DSTU 1 Official version Technical Errata #2. 085 */ 086 _0_0_82, 087 /** 088 * Draft For Comment (January 2015 Ballot). 089 */ 090 _0_4_0, 091 /** 092 * DSTU 2 Ballot version (May 2015 Ballot). 093 */ 094 _0_5_0, 095 /** 096 * DSTU 2 QA Preview + CQIF Ballot (Sep 2015). 097 */ 098 _1_0_0, 099 /** 100 * DSTU 2 (Official version). 101 */ 102 _1_0_1, 103 /** 104 * DSTU 2 (Official version) with 1 technical errata. 105 */ 106 _1_0_2, 107 /** 108 * GAO Ballot + draft changes to main FHIR standard. 109 */ 110 _1_1_0, 111 /** 112 * CQF on FHIR Ballot + Connectathon 12 (Montreal). 113 */ 114 _1_4_0, 115 /** 116 * FHIR STU3 Ballot + Connectathon 13 (Baltimore). 117 */ 118 _1_6_0, 119 /** 120 * FHIR STU3 Candidate + Connectathon 14 (San Antonio). 121 */ 122 _1_8_0, 123 /** 124 * FHIR Release 3 (STU). 125 */ 126 _3_0_0, 127 /** 128 * FHIR Release 3 (STU) with 1 technical errata. 129 */ 130 _3_0_1, 131 /** 132 * R4 Ballot #1. 133 */ 134 _3_3_0, 135 /** 136 * R4 Ballot #2. 137 */ 138 _3_5_0, 139 /** 140 * FHIR Release 4 (Normative + STU). 141 */ 142 _4_0_0, 143 /** 144 * Current build after R4. 145 */ 146 _4_1_0, 147 /** 148 * added to help the parsers 149 */ 150 NULL; 151 public static FHIRVersion fromCode(String codeString) throws FHIRException { 152 if (codeString == null || "".equals(codeString)) 153 return null; 154 if ("0.01".equals(codeString)) 155 return _0_01; 156 if ("0.05".equals(codeString)) 157 return _0_05; 158 if ("0.06".equals(codeString)) 159 return _0_06; 160 if ("0.11".equals(codeString)) 161 return _0_11; 162 if ("0.0.80".equals(codeString)) 163 return _0_0_80; 164 if ("0.0.81".equals(codeString)) 165 return _0_0_81; 166 if ("0.0.82".equals(codeString)) 167 return _0_0_82; 168 if ("0.4.0".equals(codeString)) 169 return _0_4_0; 170 if ("0.5.0".equals(codeString)) 171 return _0_5_0; 172 if ("1.0.0".equals(codeString)) 173 return _1_0_0; 174 if ("1.0.1".equals(codeString)) 175 return _1_0_1; 176 if ("1.0.2".equals(codeString)) 177 return _1_0_2; 178 if ("1.1.0".equals(codeString)) 179 return _1_1_0; 180 if ("1.4.0".equals(codeString)) 181 return _1_4_0; 182 if ("1.6.0".equals(codeString)) 183 return _1_6_0; 184 if ("1.8.0".equals(codeString)) 185 return _1_8_0; 186 if ("3.0.0".equals(codeString)) 187 return _3_0_0; 188 if ("3.0.1".equals(codeString)) 189 return _3_0_1; 190 if ("3.3.0".equals(codeString)) 191 return _3_3_0; 192 if ("3.5.0".equals(codeString)) 193 return _3_5_0; 194 if ("4.0.0".equals(codeString)) 195 return _4_0_0; 196 if ("4.1.0".equals(codeString)) 197 return _4_1_0; 198 throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'"); 199 } 200 public String toCode() { 201 switch (this) { 202 case _0_01: return "0.01"; 203 case _0_05: return "0.05"; 204 case _0_06: return "0.06"; 205 case _0_11: return "0.11"; 206 case _0_0_80: return "0.0.80"; 207 case _0_0_81: return "0.0.81"; 208 case _0_0_82: return "0.0.82"; 209 case _0_4_0: return "0.4.0"; 210 case _0_5_0: return "0.5.0"; 211 case _1_0_0: return "1.0.0"; 212 case _1_0_1: return "1.0.1"; 213 case _1_0_2: return "1.0.2"; 214 case _1_1_0: return "1.1.0"; 215 case _1_4_0: return "1.4.0"; 216 case _1_6_0: return "1.6.0"; 217 case _1_8_0: return "1.8.0"; 218 case _3_0_0: return "3.0.0"; 219 case _3_0_1: return "3.0.1"; 220 case _3_3_0: return "3.3.0"; 221 case _3_5_0: return "3.5.0"; 222 case _4_0_0: return "4.0.0"; 223 case _4_1_0: return "4.1.0"; 224 default: return "?"; 225 } 226 } 227 public String getSystem() { 228 return "http://hl7.org/fhir/FHIR-version"; 229 } 230 public String getDefinition() { 231 switch (this) { 232 case _0_01: return "Oldest archived version of FHIR."; 233 case _0_05: return "1st Draft for Comment (Sept 2012 Ballot)."; 234 case _0_06: return "2nd Draft for Comment (January 2013 Ballot)."; 235 case _0_11: return "DSTU 1 Ballot version."; 236 case _0_0_80: return "DSTU 1 Official version."; 237 case _0_0_81: return "DSTU 1 Official version Technical Errata #1."; 238 case _0_0_82: return "DSTU 1 Official version Technical Errata #2."; 239 case _0_4_0: return "Draft For Comment (January 2015 Ballot)."; 240 case _0_5_0: return "DSTU 2 Ballot version (May 2015 Ballot)."; 241 case _1_0_0: return "DSTU 2 QA Preview + CQIF Ballot (Sep 2015)."; 242 case _1_0_1: return "DSTU 2 (Official version)."; 243 case _1_0_2: return "DSTU 2 (Official version) with 1 technical errata."; 244 case _1_1_0: return "GAO Ballot + draft changes to main FHIR standard."; 245 case _1_4_0: return "CQF on FHIR Ballot + Connectathon 12 (Montreal)."; 246 case _1_6_0: return "FHIR STU3 Ballot + Connectathon 13 (Baltimore)."; 247 case _1_8_0: return "FHIR STU3 Candidate + Connectathon 14 (San Antonio)."; 248 case _3_0_0: return "FHIR Release 3 (STU)."; 249 case _3_0_1: return "FHIR Release 3 (STU) with 1 technical errata."; 250 case _3_3_0: return "R4 Ballot #1."; 251 case _3_5_0: return "R4 Ballot #2."; 252 case _4_0_0: return "FHIR Release 4 (Normative + STU)."; 253 case _4_1_0: return "Current build after R4."; 254 default: return "?"; 255 } 256 } 257 public String getDisplay() { 258 switch (this) { 259 case _0_01: return "0.01"; 260 case _0_05: return "0.05"; 261 case _0_06: return "0.06"; 262 case _0_11: return "0.11"; 263 case _0_0_80: return "0.0.80"; 264 case _0_0_81: return "0.0.81"; 265 case _0_0_82: return "0.0.82"; 266 case _0_4_0: return "0.4.0"; 267 case _0_5_0: return "0.5.0"; 268 case _1_0_0: return "1.0.0"; 269 case _1_0_1: return "1.0.1"; 270 case _1_0_2: return "1.0.2"; 271 case _1_1_0: return "1.1.0"; 272 case _1_4_0: return "1.4.0"; 273 case _1_6_0: return "1.6.0"; 274 case _1_8_0: return "1.8.0"; 275 case _3_0_0: return "3.0.0"; 276 case _3_0_1: return "3.0.1"; 277 case _3_3_0: return "3.3.0"; 278 case _3_5_0: return "3.5.0"; 279 case _4_0_0: return "4.0.0"; 280 case _4_1_0: return "4.1.0"; 281 default: return "?"; 282 } 283 } 284 285 286} 287