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