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 V3Hl7Realm {
041
042        /**
043         * Description: Concepts that can be used as Binding Realms when creating Binding Statements.  These codes are permitted to appear in the InfrastructureRoot.realmCode attribute.
044         */
045        BINDINGREALMS, 
046        /**
047         * Description: Realm codes for official HL7 organizational bodies.  This includes both the HL7 International organization as well as all recognized international affiliates (past and present).  These groups have the ability to bind vocabulary and develop artifacts.  As well, they have the ability to have "ownership" over other binding realms and namespace realms via the owningAffiliate property of those other realm codes.
048         */
049        AFFILIATEREALMS, 
050        /**
051         * Description: Realm code for use of Argentina
052         */
053        AR, 
054        /**
055         * Description: Realm code for use of Austria
056         */
057        AT, 
058        /**
059         * Description: Realm code for use of Australia
060         */
061        AU, 
062        /**
063         * Description: Realm code for use of Brazil
064         */
065        BR, 
066        /**
067         * Description: Realm code for use of Canada
068         */
069        CA, 
070        /**
071         * Description: Realm code for use of Switzerland
072         */
073        CH, 
074        /**
075         * Description: Realm code for use of Chile
076         */
077        CL, 
078        /**
079         * Description: Realm code for use of China
080         */
081        CN, 
082        /**
083         * Description: Realm code for use of Localized Version
084         */
085        CO, 
086        /**
087         * Description: Realm code for use of Czech Republic
088         */
089        CZ, 
090        /**
091         * Description: Realm code for use of Germany
092         */
093        DE, 
094        /**
095         * Description: Realm code for use of Denmark
096         */
097        DK, 
098        /**
099         * Description: Realm code for use of Spain
100         */
101        ES, 
102        /**
103         * Description: Realm code for use of Finland
104         */
105        FI, 
106        /**
107         * Description: Realm code for use of France
108         */
109        FR, 
110        /**
111         * Description: Realm code for use of Greece
112         */
113        GR, 
114        /**
115         * Description: Realm code for use of Croatia
116         */
117        HR, 
118        /**
119         * Description: Realm code for use of Ireland
120         */
121        IE, 
122        /**
123         * Description: Realm code for use of India
124         */
125        IN, 
126        /**
127         * Description: Realm code for use of Italy
128         */
129        IT, 
130        /**
131         * Description: Realm code for use of Japan
132         */
133        JP, 
134        /**
135         * Description: Realm code for use of Korea
136         */
137        KR, 
138        /**
139         * Description: Realm code for use of Lithuania
140         */
141        LT, 
142        /**
143         * Description: Realm code for use of Mexico
144         */
145        MX, 
146        /**
147         * Description: Realm code for use of The Netherlands
148         */
149        NL, 
150        /**
151         * Description: Realm code for use of New Zealand
152         */
153        NZ, 
154        /**
155         * Description: Realm code for use of Romania
156         */
157        RO, 
158        /**
159         * Description: Realm code for use of Russian Federation
160         */
161        RU, 
162        /**
163         * Description: Realm code for use of Sweden
164         */
165        SE, 
166        /**
167         * Description: Realm code for use of Localized Version
168         */
169        SG, 
170        /**
171         * Description: Realm code for use of Southern Africa
172         */
173        SOA, 
174        /**
175         * Description: Realm code for use of Turkey
176         */
177        TR, 
178        /**
179         * Description: Realm code for use of Taiwan
180         */
181        TW, 
182        /**
183         * Description: Realm code for use of United Kingdom
184         */
185        UK, 
186        /**
187         * Description: Realm code for use of United States of America
188         */
189        US, 
190        /**
191         * Description: Realm code for use of Universal realm or context, used in every instance
192         */
193        UV, 
194        /**
195         * Description: Realm code for use of Uruguay
196         */
197        UY, 
198        /**
199         * Description: Realm code for use of Unclassified Realm
200         */
201        C1, 
202        /**
203         * Description: Realm code for use of Great Britain
204         */
205        GB, 
206        /**
207         * Description: Realm code for use of Representative Realm
208         */
209        R1, 
210        /**
211         * Description: Realm code for use of Example Realm
212         */
213        X1, 
214        /**
215         * Description: Codes that can be used in the "realm" portion of HL7 v3 artifact identifiers.
216         */
217        NAMESPACEREALMS, 
218        /**
219         * Description: An artifact created for local use only.  This realm namespace has no owning affiliate.  Its use is uncontrolled, i.e. anyone can create artifacts using this realm namespace.  Because of this, there is a significant likelihood of artifact identifier collisions.  Implementers are encouraged to register their artifacts under an affiliate owned and controlled namespace to avoid such collision problems where possible.
220         */
221        ZZ, 
222        /**
223         * added to help the parsers
224         */
225        NULL;
226        public static V3Hl7Realm fromCode(String codeString) throws FHIRException {
227            if (codeString == null || "".equals(codeString))
228                return null;
229        if ("BindingRealms".equals(codeString))
230          return BINDINGREALMS;
231        if ("AffiliateRealms".equals(codeString))
232          return AFFILIATEREALMS;
233        if ("AR".equals(codeString))
234          return AR;
235        if ("AT".equals(codeString))
236          return AT;
237        if ("AU".equals(codeString))
238          return AU;
239        if ("BR".equals(codeString))
240          return BR;
241        if ("CA".equals(codeString))
242          return CA;
243        if ("CH".equals(codeString))
244          return CH;
245        if ("CL".equals(codeString))
246          return CL;
247        if ("CN".equals(codeString))
248          return CN;
249        if ("CO".equals(codeString))
250          return CO;
251        if ("CZ".equals(codeString))
252          return CZ;
253        if ("DE".equals(codeString))
254          return DE;
255        if ("DK".equals(codeString))
256          return DK;
257        if ("ES".equals(codeString))
258          return ES;
259        if ("FI".equals(codeString))
260          return FI;
261        if ("FR".equals(codeString))
262          return FR;
263        if ("GR".equals(codeString))
264          return GR;
265        if ("HR".equals(codeString))
266          return HR;
267        if ("IE".equals(codeString))
268          return IE;
269        if ("IN".equals(codeString))
270          return IN;
271        if ("IT".equals(codeString))
272          return IT;
273        if ("JP".equals(codeString))
274          return JP;
275        if ("KR".equals(codeString))
276          return KR;
277        if ("LT".equals(codeString))
278          return LT;
279        if ("MX".equals(codeString))
280          return MX;
281        if ("NL".equals(codeString))
282          return NL;
283        if ("NZ".equals(codeString))
284          return NZ;
285        if ("RO".equals(codeString))
286          return RO;
287        if ("RU".equals(codeString))
288          return RU;
289        if ("SE".equals(codeString))
290          return SE;
291        if ("SG".equals(codeString))
292          return SG;
293        if ("SOA".equals(codeString))
294          return SOA;
295        if ("TR".equals(codeString))
296          return TR;
297        if ("TW".equals(codeString))
298          return TW;
299        if ("UK".equals(codeString))
300          return UK;
301        if ("US".equals(codeString))
302          return US;
303        if ("UV".equals(codeString))
304          return UV;
305        if ("UY".equals(codeString))
306          return UY;
307        if ("C1".equals(codeString))
308          return C1;
309        if ("GB".equals(codeString))
310          return GB;
311        if ("R1".equals(codeString))
312          return R1;
313        if ("X1".equals(codeString))
314          return X1;
315        if ("NamespaceRealms".equals(codeString))
316          return NAMESPACEREALMS;
317        if ("ZZ".equals(codeString))
318          return ZZ;
319        throw new FHIRException("Unknown V3Hl7Realm code '"+codeString+"'");
320        }
321        public String toCode() {
322          switch (this) {
323            case BINDINGREALMS: return "BindingRealms";
324            case AFFILIATEREALMS: return "AffiliateRealms";
325            case AR: return "AR";
326            case AT: return "AT";
327            case AU: return "AU";
328            case BR: return "BR";
329            case CA: return "CA";
330            case CH: return "CH";
331            case CL: return "CL";
332            case CN: return "CN";
333            case CO: return "CO";
334            case CZ: return "CZ";
335            case DE: return "DE";
336            case DK: return "DK";
337            case ES: return "ES";
338            case FI: return "FI";
339            case FR: return "FR";
340            case GR: return "GR";
341            case HR: return "HR";
342            case IE: return "IE";
343            case IN: return "IN";
344            case IT: return "IT";
345            case JP: return "JP";
346            case KR: return "KR";
347            case LT: return "LT";
348            case MX: return "MX";
349            case NL: return "NL";
350            case NZ: return "NZ";
351            case RO: return "RO";
352            case RU: return "RU";
353            case SE: return "SE";
354            case SG: return "SG";
355            case SOA: return "SOA";
356            case TR: return "TR";
357            case TW: return "TW";
358            case UK: return "UK";
359            case US: return "US";
360            case UV: return "UV";
361            case UY: return "UY";
362            case C1: return "C1";
363            case GB: return "GB";
364            case R1: return "R1";
365            case X1: return "X1";
366            case NAMESPACEREALMS: return "NamespaceRealms";
367            case ZZ: return "ZZ";
368            case NULL: return null;
369            default: return "?";
370          }
371        }
372        public String getSystem() {
373          return "http://hl7.org/fhir/v3/hl7Realm";
374        }
375        public String getDefinition() {
376          switch (this) {
377            case BINDINGREALMS: return "Description: Concepts that can be used as Binding Realms when creating Binding Statements.  These codes are permitted to appear in the InfrastructureRoot.realmCode attribute.";
378            case AFFILIATEREALMS: return "Description: Realm codes for official HL7 organizational bodies.  This includes both the HL7 International organization as well as all recognized international affiliates (past and present).  These groups have the ability to bind vocabulary and develop artifacts.  As well, they have the ability to have \"ownership\" over other binding realms and namespace realms via the owningAffiliate property of those other realm codes.";
379            case AR: return "Description: Realm code for use of Argentina";
380            case AT: return "Description: Realm code for use of Austria";
381            case AU: return "Description: Realm code for use of Australia";
382            case BR: return "Description: Realm code for use of Brazil";
383            case CA: return "Description: Realm code for use of Canada";
384            case CH: return "Description: Realm code for use of Switzerland";
385            case CL: return "Description: Realm code for use of Chile";
386            case CN: return "Description: Realm code for use of China";
387            case CO: return "Description: Realm code for use of Localized Version";
388            case CZ: return "Description: Realm code for use of Czech Republic";
389            case DE: return "Description: Realm code for use of Germany";
390            case DK: return "Description: Realm code for use of Denmark";
391            case ES: return "Description: Realm code for use of Spain";
392            case FI: return "Description: Realm code for use of Finland";
393            case FR: return "Description: Realm code for use of France";
394            case GR: return "Description: Realm code for use of Greece";
395            case HR: return "Description: Realm code for use of Croatia";
396            case IE: return "Description: Realm code for use of Ireland";
397            case IN: return "Description: Realm code for use of India";
398            case IT: return "Description: Realm code for use of Italy";
399            case JP: return "Description: Realm code for use of Japan";
400            case KR: return "Description: Realm code for use of Korea";
401            case LT: return "Description: Realm code for use of Lithuania";
402            case MX: return "Description: Realm code for use of Mexico";
403            case NL: return "Description: Realm code for use of The Netherlands";
404            case NZ: return "Description: Realm code for use of New Zealand";
405            case RO: return "Description: Realm code for use of Romania";
406            case RU: return "Description: Realm code for use of Russian Federation";
407            case SE: return "Description: Realm code for use of Sweden";
408            case SG: return "Description: Realm code for use of Localized Version";
409            case SOA: return "Description: Realm code for use of Southern Africa";
410            case TR: return "Description: Realm code for use of Turkey";
411            case TW: return "Description: Realm code for use of Taiwan";
412            case UK: return "Description: Realm code for use of United Kingdom";
413            case US: return "Description: Realm code for use of United States of America";
414            case UV: return "Description: Realm code for use of Universal realm or context, used in every instance";
415            case UY: return "Description: Realm code for use of Uruguay";
416            case C1: return "Description: Realm code for use of Unclassified Realm";
417            case GB: return "Description: Realm code for use of Great Britain";
418            case R1: return "Description: Realm code for use of Representative Realm";
419            case X1: return "Description: Realm code for use of Example Realm";
420            case NAMESPACEREALMS: return "Description: Codes that can be used in the \"realm\" portion of HL7 v3 artifact identifiers.";
421            case ZZ: return "Description: An artifact created for local use only.  This realm namespace has no owning affiliate.  Its use is uncontrolled, i.e. anyone can create artifacts using this realm namespace.  Because of this, there is a significant likelihood of artifact identifier collisions.  Implementers are encouraged to register their artifacts under an affiliate owned and controlled namespace to avoid such collision problems where possible.";
422            case NULL: return null;
423            default: return "?";
424          }
425        }
426        public String getDisplay() {
427          switch (this) {
428            case BINDINGREALMS: return "binding realms";
429            case AFFILIATEREALMS: return "Affiliate Realms";
430            case AR: return "Argentina";
431            case AT: return "Austria";
432            case AU: return "Australia";
433            case BR: return "Brazil";
434            case CA: return "Canada";
435            case CH: return "Switzerland";
436            case CL: return "Chile";
437            case CN: return "China";
438            case CO: return "Columbia";
439            case CZ: return "Czech Republic";
440            case DE: return "Germany";
441            case DK: return "Denmark";
442            case ES: return "Spain";
443            case FI: return "Finland";
444            case FR: return "France";
445            case GR: return "Greece";
446            case HR: return "Croatia";
447            case IE: return "Ireland";
448            case IN: return "India";
449            case IT: return "Italy";
450            case JP: return "Japan";
451            case KR: return "Korea";
452            case LT: return "Lithuania";
453            case MX: return "Mexico";
454            case NL: return "The Netherlands";
455            case NZ: return "New Zealand";
456            case RO: return "Romania";
457            case RU: return "Russian Federation";
458            case SE: return "Sweden";
459            case SG: return "Singapore";
460            case SOA: return "Southern Africa";
461            case TR: return "Turkey";
462            case TW: return "Taiwan";
463            case UK: return "United Kingdom";
464            case US: return "United States of America";
465            case UV: return "Universal";
466            case UY: return "Uruguay";
467            case C1: return "Unclassified Realm";
468            case GB: return "Great Britain";
469            case R1: return "Representative Realm";
470            case X1: return "Example Realm";
471            case NAMESPACEREALMS: return "namespace realms";
472            case ZZ: return "Localized Version";
473            case NULL: return null;
474            default: return "?";
475          }
476    }
477
478
479}