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