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, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum FhirVersions {
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         * Current Development build
113         */
114        _3_5_0, 
115        /**
116         * added to help the parsers
117         */
118        NULL;
119        public static FhirVersions fromCode(String codeString) throws FHIRException {
120            if (codeString == null || "".equals(codeString))
121                return null;
122        if ("0.01".equals(codeString))
123          return _0_01;
124        if ("0.05".equals(codeString))
125          return _0_05;
126        if ("0.06".equals(codeString))
127          return _0_06;
128        if ("0.11".equals(codeString))
129          return _0_11;
130        if ("0.0.80".equals(codeString))
131          return _0_0_80;
132        if ("0.0.81".equals(codeString))
133          return _0_0_81;
134        if ("0.0.82".equals(codeString))
135          return _0_0_82;
136        if ("0.4.0".equals(codeString))
137          return _0_4_0;
138        if ("0.5.0".equals(codeString))
139          return _0_5_0;
140        if ("1.0.0".equals(codeString))
141          return _1_0_0;
142        if ("1.0.1".equals(codeString))
143          return _1_0_1;
144        if ("1.0.2".equals(codeString))
145          return _1_0_2;
146        if ("1.1.0".equals(codeString))
147          return _1_1_0;
148        if ("1.4.0".equals(codeString))
149          return _1_4_0;
150        if ("1.6.0".equals(codeString))
151          return _1_6_0;
152        if ("1.8.0".equals(codeString))
153          return _1_8_0;
154        if ("3.0.0".equals(codeString))
155          return _3_0_0;
156        if ("3.0.1".equals(codeString))
157          return _3_0_1;
158        if ("3.5.0".equals(codeString))
159          return _3_5_0;
160        throw new FHIRException("Unknown FhirVersions code '"+codeString+"'");
161        }
162        public String toCode() {
163          switch (this) {
164            case _0_01: return "0.01";
165            case _0_05: return "0.05";
166            case _0_06: return "0.06";
167            case _0_11: return "0.11";
168            case _0_0_80: return "0.0.80";
169            case _0_0_81: return "0.0.81";
170            case _0_0_82: return "0.0.82";
171            case _0_4_0: return "0.4.0";
172            case _0_5_0: return "0.5.0";
173            case _1_0_0: return "1.0.0";
174            case _1_0_1: return "1.0.1";
175            case _1_0_2: return "1.0.2";
176            case _1_1_0: return "1.1.0";
177            case _1_4_0: return "1.4.0";
178            case _1_6_0: return "1.6.0";
179            case _1_8_0: return "1.8.0";
180            case _3_0_0: return "3.0.0";
181            case _3_0_1: return "3.0.1";
182            case _3_5_0: return "3.5.0";
183            default: return "?";
184          }
185        }
186        public String getSystem() {
187          return "http://terminology.hl7.org/CodeSystem/fhir-versions";
188        }
189        public String getDefinition() {
190          switch (this) {
191            case _0_01: return "Oldest archived version of FHIR";
192            case _0_05: return "1st Draft for Comment (Sept 2012 Ballot)";
193            case _0_06: return "2nd Draft for Comment (January 2013 Ballot)";
194            case _0_11: return "DSTU 1 Ballot version";
195            case _0_0_80: return "DSTU 1 Official version";
196            case _0_0_81: return "DSTU 1 Official version Technical Errata #1";
197            case _0_0_82: return "DSTU 1 Official version Technical Errata #2";
198            case _0_4_0: return "Draft For Comment (January 2015 Ballot)";
199            case _0_5_0: return "DSTU 2 Ballot version (May 2015 Ballot)";
200            case _1_0_0: return "DSTU 2 QA Preview + CQIF Ballot (Sep 2015)";
201            case _1_0_1: return "DSTU 2 (Official version)";
202            case _1_0_2: return "DSTU 2 (Official version) with 1 technical errata";
203            case _1_1_0: return "GAO Ballot + draft changes to main FHIR standard";
204            case _1_4_0: return "CQF on FHIR Ballot + Connectathon 12 (Montreal)";
205            case _1_6_0: return "FHIR STU3 Ballot + Connectathon 13 (Baltimore)";
206            case _1_8_0: return "FHIR STU3 Candidate + Connectathon 14 (San Antonio)";
207            case _3_0_0: return "FHIR Release 3 (STU)";
208            case _3_0_1: return "FHIR Release 3 (STU) with 1 technical errata";
209            case _3_5_0: return "Current Development build";
210            default: return "?";
211          }
212        }
213        public String getDisplay() {
214          switch (this) {
215            case _0_01: return "0.01";
216            case _0_05: return "0.05";
217            case _0_06: return "0.06";
218            case _0_11: return "0.11";
219            case _0_0_80: return "0.0.80";
220            case _0_0_81: return "0.0.81";
221            case _0_0_82: return "0.0.82";
222            case _0_4_0: return "0.4.0";
223            case _0_5_0: return "0.5.0";
224            case _1_0_0: return "1.0.0";
225            case _1_0_1: return "1.0.1";
226            case _1_0_2: return "1.0.2";
227            case _1_1_0: return "1.1.0";
228            case _1_4_0: return "1.4.0";
229            case _1_6_0: return "1.6.0";
230            case _1_8_0: return "1.8.0";
231            case _3_0_0: return "3.0.0";
232            case _3_0_1: return "3.0.1";
233            case _3_5_0: return "3.5.0";
234            default: return "?";
235          }
236    }
237
238
239}
240