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 Wed, Jan 10, 2018 14:53-0500 for FHIR v3.2.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum SupervisoryLevel {
038
039        /**
040         * US Military Enlisted paygrade E-1
041         */
042        E1, 
043        /**
044         * US Military Enlisted paygrade E-2
045         */
046        E2, 
047        /**
048         * US Military Enlisted paygrade E-3
049         */
050        E3, 
051        /**
052         * US Military Enlisted paygrade E-4
053         */
054        E4, 
055        /**
056         * US Military Enlisted paygrade E-5
057         */
058        E5, 
059        /**
060         * US Military Enlisted paygrade E-6
061         */
062        E6, 
063        /**
064         * US Military Enlisted paygrade E-7
065         */
066        E7, 
067        /**
068         * US Military Enlisted paygrade E-8
069         */
070        E8, 
071        /**
072         * US Military Enlisted paygrade E-9
073         */
074        E9, 
075        /**
076         * US Military Commissioned Officer paygrade O-1
077         */
078        O1, 
079        /**
080         * US Military Commissioned Officer paygrade O-2
081         */
082        O2, 
083        /**
084         * US Military Commissioned Officer paygrade  O-3
085         */
086        O3, 
087        /**
088         * US Military Commissioned Officer paygrade O-4
089         */
090        O4, 
091        /**
092         * US Military Commissioned Officer paygrade O-5
093         */
094        O5, 
095        /**
096         * US Military Commissioned Officer paygrade O-6
097         */
098        O6, 
099        /**
100         * US Military Commissioned Officer paygrade O-7
101         */
102        O7, 
103        /**
104         * US Military Commissioned Officer paygrade O-8
105         */
106        O8, 
107        /**
108         * US Military Commissioned Officer paygrade O-9
109         */
110        O9, 
111        /**
112         * US Military Commissioned Officer paygrade O-10
113         */
114        O10, 
115        /**
116         * Warrant Officer paygrade W-1
117         */
118        W1, 
119        /**
120         * Warrant Officer paygrade W-2
121         */
122        W2, 
123        /**
124         * Warrant Officer paygrade W-3
125         */
126        W3, 
127        /**
128         * Warrant Officer paygrade W-4
129         */
130        W4, 
131        /**
132         * Warrant Officer paygrade W-5
133         */
134        W5, 
135        /**
136         * oversees work and provides direction, does not have hiring/firing or budget authority; synonym: foreman.
137         */
138        C3, 
139        /**
140         * added to help the parsers
141         */
142        NULL;
143        public static SupervisoryLevel fromCode(String codeString) throws FHIRException {
144            if (codeString == null || "".equals(codeString))
145                return null;
146        if ("E-1".equals(codeString))
147          return E1;
148        if ("E-2".equals(codeString))
149          return E2;
150        if ("E-3".equals(codeString))
151          return E3;
152        if ("E-4".equals(codeString))
153          return E4;
154        if ("E-5".equals(codeString))
155          return E5;
156        if ("E-6".equals(codeString))
157          return E6;
158        if ("E-7".equals(codeString))
159          return E7;
160        if ("E-8".equals(codeString))
161          return E8;
162        if ("E-9".equals(codeString))
163          return E9;
164        if ("O-1".equals(codeString))
165          return O1;
166        if ("O-2".equals(codeString))
167          return O2;
168        if ("O-3".equals(codeString))
169          return O3;
170        if ("O-4".equals(codeString))
171          return O4;
172        if ("O-5".equals(codeString))
173          return O5;
174        if ("O-6".equals(codeString))
175          return O6;
176        if ("O-7".equals(codeString))
177          return O7;
178        if ("O-8".equals(codeString))
179          return O8;
180        if ("O-9".equals(codeString))
181          return O9;
182        if ("O-10".equals(codeString))
183          return O10;
184        if ("W-1".equals(codeString))
185          return W1;
186        if ("W-2".equals(codeString))
187          return W2;
188        if ("W-3".equals(codeString))
189          return W3;
190        if ("W-4".equals(codeString))
191          return W4;
192        if ("W-5".equals(codeString))
193          return W5;
194        if ("C-3".equals(codeString))
195          return C3;
196        throw new FHIRException("Unknown SupervisoryLevel code '"+codeString+"'");
197        }
198        public String toCode() {
199          switch (this) {
200            case E1: return "E-1";
201            case E2: return "E-2";
202            case E3: return "E-3";
203            case E4: return "E-4";
204            case E5: return "E-5";
205            case E6: return "E-6";
206            case E7: return "E-7";
207            case E8: return "E-8";
208            case E9: return "E-9";
209            case O1: return "O-1";
210            case O2: return "O-2";
211            case O3: return "O-3";
212            case O4: return "O-4";
213            case O5: return "O-5";
214            case O6: return "O-6";
215            case O7: return "O-7";
216            case O8: return "O-8";
217            case O9: return "O-9";
218            case O10: return "O-10";
219            case W1: return "W-1";
220            case W2: return "W-2";
221            case W3: return "W-3";
222            case W4: return "W-4";
223            case W5: return "W-5";
224            case C3: return "C-3";
225            default: return "?";
226          }
227        }
228        public String getSystem() {
229          return "http://hl7.org/fhir/supervisory-level";
230        }
231        public String getDefinition() {
232          switch (this) {
233            case E1: return "US Military Enlisted paygrade E-1";
234            case E2: return "US Military Enlisted paygrade E-2";
235            case E3: return "US Military Enlisted paygrade E-3";
236            case E4: return "US Military Enlisted paygrade E-4";
237            case E5: return "US Military Enlisted paygrade E-5";
238            case E6: return "US Military Enlisted paygrade E-6";
239            case E7: return "US Military Enlisted paygrade E-7";
240            case E8: return "US Military Enlisted paygrade E-8";
241            case E9: return "US Military Enlisted paygrade E-9";
242            case O1: return "US Military Commissioned Officer paygrade O-1";
243            case O2: return "US Military Commissioned Officer paygrade O-2";
244            case O3: return "US Military Commissioned Officer paygrade  O-3";
245            case O4: return "US Military Commissioned Officer paygrade O-4";
246            case O5: return "US Military Commissioned Officer paygrade O-5";
247            case O6: return "US Military Commissioned Officer paygrade O-6";
248            case O7: return "US Military Commissioned Officer paygrade O-7";
249            case O8: return "US Military Commissioned Officer paygrade O-8";
250            case O9: return "US Military Commissioned Officer paygrade O-9";
251            case O10: return "US Military Commissioned Officer paygrade O-10";
252            case W1: return "Warrant Officer paygrade W-1";
253            case W2: return "Warrant Officer paygrade W-2";
254            case W3: return "Warrant Officer paygrade W-3";
255            case W4: return "Warrant Officer paygrade W-4";
256            case W5: return "Warrant Officer paygrade W-5";
257            case C3: return "oversees work and provides direction, does not have hiring/firing or budget authority; synonym: foreman.";
258            default: return "?";
259          }
260        }
261        public String getDisplay() {
262          switch (this) {
263            case E1: return "E-1 - Enlisted Military Personnel 1";
264            case E2: return "E-2 - Enlisted Military Personnel 2";
265            case E3: return "E-3 - Enlisted Military Personnel 3";
266            case E4: return "E-4 - Enlisted Military Personnel 4";
267            case E5: return "E-5 - Enlisted Military Personnel 5";
268            case E6: return "E-6 - Enlisted Military Personnel 6";
269            case E7: return "E-7 - Enlisted Military Personnel 7";
270            case E8: return "E-8 - Enlisted Military Personnel 8";
271            case E9: return "E-9 - Enlisted Military Personnel 9";
272            case O1: return "O-1 - Commissioned Officer 1";
273            case O2: return "O-2 - Commissioned Officer 2";
274            case O3: return "O-3 - Commissioned Officer 3";
275            case O4: return "O-4 - Commissioned Officer 4";
276            case O5: return "O-5 - Commissioned Officer 5";
277            case O6: return "O-6 - Commissioned Officer 6";
278            case O7: return "O-7 - Commissioned Officer 7";
279            case O8: return "O-8 - Commissioned Officer 8";
280            case O9: return "O-9 - Commissioned Officer 9";
281            case O10: return "O-10 - Commissioned Officer 10";
282            case W1: return "W-1 - Warrant Officer 1";
283            case W2: return "W-2 - Warrant Officer 2";
284            case W3: return "W-3 - Warrant Officer 3";
285            case W4: return "W-4 - Warrant Officer 4";
286            case W5: return "W-5 - Warrant Officer 5";
287            case C3: return "C-3 - 1st Line Supervisor";
288            default: return "?";
289          }
290    }
291
292
293}
294