001package org.hl7.fhir.dstu3.model.codesystems;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Sat, Mar 25, 2017 21:03-0400 for FHIR v3.0.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum V3Ethnicity {
041
042        /**
043         * Hispanic or Latino
044         */
045        _21352, 
046        /**
047         * Spaniard
048         */
049        _21378, 
050        /**
051         * Andalusian
052         */
053        _21386, 
054        /**
055         * Asturian
056         */
057        _21394, 
058        /**
059         * Castillian
060         */
061        _21402, 
062        /**
063         * Catalonian
064         */
065        _21410, 
066        /**
067         * Belearic Islander
068         */
069        _21428, 
070        /**
071         * Gallego
072         */
073        _21436, 
074        /**
075         * Valencian
076         */
077        _21444, 
078        /**
079         * Canarian
080         */
081        _21451, 
082        /**
083         * Spanish Basque
084         */
085        _21469, 
086        /**
087         * Mexican
088         */
089        _21485, 
090        /**
091         * Mexican American
092         */
093        _21493, 
094        /**
095         * Mexicano
096         */
097        _21501, 
098        /**
099         * Chicano
100         */
101        _21519, 
102        /**
103         * La Raza
104         */
105        _21527, 
106        /**
107         * Mexican American Indian
108         */
109        _21535, 
110        /**
111         * Central American
112         */
113        _21550, 
114        /**
115         * Costa Rican
116         */
117        _21568, 
118        /**
119         * Guatemalan
120         */
121        _21576, 
122        /**
123         * Honduran
124         */
125        _21584, 
126        /**
127         * Nicaraguan
128         */
129        _21592, 
130        /**
131         * Panamanian
132         */
133        _21600, 
134        /**
135         * Salvadoran
136         */
137        _21618, 
138        /**
139         * Central American Indian
140         */
141        _21626, 
142        /**
143         * Canal Zone
144         */
145        _21634, 
146        /**
147         * South American
148         */
149        _21659, 
150        /**
151         * Argentinean
152         */
153        _21667, 
154        /**
155         * Bolivian
156         */
157        _21675, 
158        /**
159         * Chilean
160         */
161        _21683, 
162        /**
163         * Colombian
164         */
165        _21691, 
166        /**
167         * Ecuadorian
168         */
169        _21709, 
170        /**
171         * Paraguayan
172         */
173        _21717, 
174        /**
175         * Peruvian
176         */
177        _21725, 
178        /**
179         * Uruguayan
180         */
181        _21733, 
182        /**
183         * Venezuelan
184         */
185        _21741, 
186        /**
187         * South American Indian
188         */
189        _21758, 
190        /**
191         * Criollo
192         */
193        _21766, 
194        /**
195         * Latin American
196         */
197        _21782, 
198        /**
199         * Puerto Rican
200         */
201        _21808, 
202        /**
203         * Cuban
204         */
205        _21824, 
206        /**
207         * Dominican
208         */
209        _21840, 
210        /**
211         * Note that this term remains in the table for completeness, even though within HL7, the notion of "not otherwise coded" term is deprecated.
212         */
213        _21865, 
214        /**
215         * added to help the parsers
216         */
217        NULL;
218        public static V3Ethnicity fromCode(String codeString) throws FHIRException {
219            if (codeString == null || "".equals(codeString))
220                return null;
221        if ("2135-2".equals(codeString))
222          return _21352;
223        if ("2137-8".equals(codeString))
224          return _21378;
225        if ("2138-6".equals(codeString))
226          return _21386;
227        if ("2139-4".equals(codeString))
228          return _21394;
229        if ("2140-2".equals(codeString))
230          return _21402;
231        if ("2141-0".equals(codeString))
232          return _21410;
233        if ("2142-8".equals(codeString))
234          return _21428;
235        if ("2143-6".equals(codeString))
236          return _21436;
237        if ("2144-4".equals(codeString))
238          return _21444;
239        if ("2145-1".equals(codeString))
240          return _21451;
241        if ("2146-9".equals(codeString))
242          return _21469;
243        if ("2148-5".equals(codeString))
244          return _21485;
245        if ("2149-3".equals(codeString))
246          return _21493;
247        if ("2150-1".equals(codeString))
248          return _21501;
249        if ("2151-9".equals(codeString))
250          return _21519;
251        if ("2152-7".equals(codeString))
252          return _21527;
253        if ("2153-5".equals(codeString))
254          return _21535;
255        if ("2155-0".equals(codeString))
256          return _21550;
257        if ("2156-8".equals(codeString))
258          return _21568;
259        if ("2157-6".equals(codeString))
260          return _21576;
261        if ("2158-4".equals(codeString))
262          return _21584;
263        if ("2159-2".equals(codeString))
264          return _21592;
265        if ("2160-0".equals(codeString))
266          return _21600;
267        if ("2161-8".equals(codeString))
268          return _21618;
269        if ("2162-6".equals(codeString))
270          return _21626;
271        if ("2163-4".equals(codeString))
272          return _21634;
273        if ("2165-9".equals(codeString))
274          return _21659;
275        if ("2166-7".equals(codeString))
276          return _21667;
277        if ("2167-5".equals(codeString))
278          return _21675;
279        if ("2168-3".equals(codeString))
280          return _21683;
281        if ("2169-1".equals(codeString))
282          return _21691;
283        if ("2170-9".equals(codeString))
284          return _21709;
285        if ("2171-7".equals(codeString))
286          return _21717;
287        if ("2172-5".equals(codeString))
288          return _21725;
289        if ("2173-3".equals(codeString))
290          return _21733;
291        if ("2174-1".equals(codeString))
292          return _21741;
293        if ("2175-8".equals(codeString))
294          return _21758;
295        if ("2176-6".equals(codeString))
296          return _21766;
297        if ("2178-2".equals(codeString))
298          return _21782;
299        if ("2180-8".equals(codeString))
300          return _21808;
301        if ("2182-4".equals(codeString))
302          return _21824;
303        if ("2184-0".equals(codeString))
304          return _21840;
305        if ("2186-5".equals(codeString))
306          return _21865;
307        throw new FHIRException("Unknown V3Ethnicity code '"+codeString+"'");
308        }
309        public String toCode() {
310          switch (this) {
311            case _21352: return "2135-2";
312            case _21378: return "2137-8";
313            case _21386: return "2138-6";
314            case _21394: return "2139-4";
315            case _21402: return "2140-2";
316            case _21410: return "2141-0";
317            case _21428: return "2142-8";
318            case _21436: return "2143-6";
319            case _21444: return "2144-4";
320            case _21451: return "2145-1";
321            case _21469: return "2146-9";
322            case _21485: return "2148-5";
323            case _21493: return "2149-3";
324            case _21501: return "2150-1";
325            case _21519: return "2151-9";
326            case _21527: return "2152-7";
327            case _21535: return "2153-5";
328            case _21550: return "2155-0";
329            case _21568: return "2156-8";
330            case _21576: return "2157-6";
331            case _21584: return "2158-4";
332            case _21592: return "2159-2";
333            case _21600: return "2160-0";
334            case _21618: return "2161-8";
335            case _21626: return "2162-6";
336            case _21634: return "2163-4";
337            case _21659: return "2165-9";
338            case _21667: return "2166-7";
339            case _21675: return "2167-5";
340            case _21683: return "2168-3";
341            case _21691: return "2169-1";
342            case _21709: return "2170-9";
343            case _21717: return "2171-7";
344            case _21725: return "2172-5";
345            case _21733: return "2173-3";
346            case _21741: return "2174-1";
347            case _21758: return "2175-8";
348            case _21766: return "2176-6";
349            case _21782: return "2178-2";
350            case _21808: return "2180-8";
351            case _21824: return "2182-4";
352            case _21840: return "2184-0";
353            case _21865: return "2186-5";
354            case NULL: return null;
355            default: return "?";
356          }
357        }
358        public String getSystem() {
359          return "http://hl7.org/fhir/v3/Ethnicity";
360        }
361        public String getDefinition() {
362          switch (this) {
363            case _21352: return "Hispanic or Latino";
364            case _21378: return "Spaniard";
365            case _21386: return "Andalusian";
366            case _21394: return "Asturian";
367            case _21402: return "Castillian";
368            case _21410: return "Catalonian";
369            case _21428: return "Belearic Islander";
370            case _21436: return "Gallego";
371            case _21444: return "Valencian";
372            case _21451: return "Canarian";
373            case _21469: return "Spanish Basque";
374            case _21485: return "Mexican";
375            case _21493: return "Mexican American";
376            case _21501: return "Mexicano";
377            case _21519: return "Chicano";
378            case _21527: return "La Raza";
379            case _21535: return "Mexican American Indian";
380            case _21550: return "Central American";
381            case _21568: return "Costa Rican";
382            case _21576: return "Guatemalan";
383            case _21584: return "Honduran";
384            case _21592: return "Nicaraguan";
385            case _21600: return "Panamanian";
386            case _21618: return "Salvadoran";
387            case _21626: return "Central American Indian";
388            case _21634: return "Canal Zone";
389            case _21659: return "South American";
390            case _21667: return "Argentinean";
391            case _21675: return "Bolivian";
392            case _21683: return "Chilean";
393            case _21691: return "Colombian";
394            case _21709: return "Ecuadorian";
395            case _21717: return "Paraguayan";
396            case _21725: return "Peruvian";
397            case _21733: return "Uruguayan";
398            case _21741: return "Venezuelan";
399            case _21758: return "South American Indian";
400            case _21766: return "Criollo";
401            case _21782: return "Latin American";
402            case _21808: return "Puerto Rican";
403            case _21824: return "Cuban";
404            case _21840: return "Dominican";
405            case _21865: return "Note that this term remains in the table for completeness, even though within HL7, the notion of \"not otherwise coded\" term is deprecated.";
406            case NULL: return null;
407            default: return "?";
408          }
409        }
410        public String getDisplay() {
411          switch (this) {
412            case _21352: return "Hispanic or Latino";
413            case _21378: return "Spaniard";
414            case _21386: return "Andalusian";
415            case _21394: return "Asturian";
416            case _21402: return "Castillian";
417            case _21410: return "Catalonian";
418            case _21428: return "Belearic Islander";
419            case _21436: return "Gallego";
420            case _21444: return "Valencian";
421            case _21451: return "Canarian";
422            case _21469: return "Spanish Basque";
423            case _21485: return "Mexican";
424            case _21493: return "Mexican American";
425            case _21501: return "Mexicano";
426            case _21519: return "Chicano";
427            case _21527: return "La Raza";
428            case _21535: return "Mexican American Indian";
429            case _21550: return "Central American";
430            case _21568: return "Costa Rican";
431            case _21576: return "Guatemalan";
432            case _21584: return "Honduran";
433            case _21592: return "Nicaraguan";
434            case _21600: return "Panamanian";
435            case _21618: return "Salvadoran";
436            case _21626: return "Central American Indian";
437            case _21634: return "Canal Zone";
438            case _21659: return "South American";
439            case _21667: return "Argentinean";
440            case _21675: return "Bolivian";
441            case _21683: return "Chilean";
442            case _21691: return "Colombian";
443            case _21709: return "Ecuadorian";
444            case _21717: return "Paraguayan";
445            case _21725: return "Peruvian";
446            case _21733: return "Uruguayan";
447            case _21741: return "Venezuelan";
448            case _21758: return "South American Indian";
449            case _21766: return "Criollo";
450            case _21782: return "Latin American";
451            case _21808: return "Puerto Rican";
452            case _21824: return "Cuban";
453            case _21840: return "Dominican";
454            case _21865: return "Not Hispanic or Latino";
455            case NULL: return null;
456            default: return "?";
457          }
458    }
459
460
461}