001package org.hl7.fhir.r4.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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.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            default: return "?";
369          }
370        }
371        public String getSystem() {
372          return "http://terminology.hl7.org/CodeSystem/v3-hl7Realm";
373        }
374        public String getDefinition() {
375          switch (this) {
376            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.";
377            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.";
378            case AR: return "Description: Realm code for use of Argentina";
379            case AT: return "Description: Realm code for use of Austria";
380            case AU: return "Description: Realm code for use of Australia";
381            case BR: return "Description: Realm code for use of Brazil";
382            case CA: return "Description: Realm code for use of Canada";
383            case CH: return "Description: Realm code for use of Switzerland";
384            case CL: return "Description: Realm code for use of Chile";
385            case CN: return "Description: Realm code for use of China";
386            case CO: return "Description: Realm code for use of Localized Version";
387            case CZ: return "Description: Realm code for use of Czech Republic";
388            case DE: return "Description: Realm code for use of Germany";
389            case DK: return "Description: Realm code for use of Denmark";
390            case ES: return "Description: Realm code for use of Spain";
391            case FI: return "Description: Realm code for use of Finland";
392            case FR: return "Description: Realm code for use of France";
393            case GR: return "Description: Realm code for use of Greece";
394            case HR: return "Description: Realm code for use of Croatia";
395            case IE: return "Description: Realm code for use of Ireland";
396            case IN: return "Description: Realm code for use of India";
397            case IT: return "Description: Realm code for use of Italy";
398            case JP: return "Description: Realm code for use of Japan";
399            case KR: return "Description: Realm code for use of Korea";
400            case LT: return "Description: Realm code for use of Lithuania";
401            case MX: return "Description: Realm code for use of Mexico";
402            case NL: return "Description: Realm code for use of The Netherlands";
403            case NZ: return "Description: Realm code for use of New Zealand";
404            case RO: return "Description: Realm code for use of Romania";
405            case RU: return "Description: Realm code for use of Russian Federation";
406            case SE: return "Description: Realm code for use of Sweden";
407            case SG: return "Description: Realm code for use of Localized Version";
408            case SOA: return "Description: Realm code for use of Southern Africa";
409            case TR: return "Description: Realm code for use of Turkey";
410            case TW: return "Description: Realm code for use of Taiwan";
411            case UK: return "Description: Realm code for use of United Kingdom";
412            case US: return "Description: Realm code for use of United States of America";
413            case UV: return "Description: Realm code for use of Universal realm or context, used in every instance";
414            case UY: return "Description: Realm code for use of Uruguay";
415            case C1: return "Description: Realm code for use of Unclassified Realm";
416            case GB: return "Description: Realm code for use of Great Britain";
417            case R1: return "Description: Realm code for use of Representative Realm";
418            case X1: return "Description: Realm code for use of Example Realm";
419            case NAMESPACEREALMS: return "Description: Codes that can be used in the \"realm\" portion of HL7 v3 artifact identifiers.";
420            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.";
421            default: return "?";
422          }
423        }
424        public String getDisplay() {
425          switch (this) {
426            case BINDINGREALMS: return "binding realms";
427            case AFFILIATEREALMS: return "Affiliate Realms";
428            case AR: return "Argentina";
429            case AT: return "Austria";
430            case AU: return "Australia";
431            case BR: return "Brazil";
432            case CA: return "Canada";
433            case CH: return "Switzerland";
434            case CL: return "Chile";
435            case CN: return "China";
436            case CO: return "Columbia";
437            case CZ: return "Czech Republic";
438            case DE: return "Germany";
439            case DK: return "Denmark";
440            case ES: return "Spain";
441            case FI: return "Finland";
442            case FR: return "France";
443            case GR: return "Greece";
444            case HR: return "Croatia";
445            case IE: return "Ireland";
446            case IN: return "India";
447            case IT: return "Italy";
448            case JP: return "Japan";
449            case KR: return "Korea";
450            case LT: return "Lithuania";
451            case MX: return "Mexico";
452            case NL: return "The Netherlands";
453            case NZ: return "New Zealand";
454            case RO: return "Romania";
455            case RU: return "Russian Federation";
456            case SE: return "Sweden";
457            case SG: return "Singapore";
458            case SOA: return "Southern Africa";
459            case TR: return "Turkey";
460            case TW: return "Taiwan";
461            case UK: return "United Kingdom";
462            case US: return "United States of America";
463            case UV: return "Universal";
464            case UY: return "Uruguay";
465            case C1: return "Unclassified Realm";
466            case GB: return "Great Britain";
467            case R1: return "Representative Realm";
468            case X1: return "Example Realm";
469            case NAMESPACEREALMS: return "namespace realms";
470            case ZZ: return "Localized Version";
471            default: return "?";
472          }
473    }
474
475
476}