001package org.hl7.fhir.dstu3.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 Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum OrganizationType {
038
039        /**
040         * An organization that provides healthcare services.
041         */
042        PROV, 
043        /**
044         * A department or ward within a hospital (Generally is not applicable to top level organizations)
045         */
046        DEPT, 
047        /**
048         * An organizational team is usually a grouping of practitioners that perform a specific function within an organization (which could be a top level organization, or a department).
049         */
050        TEAM, 
051        /**
052         * A political body, often used when including organization records for government bodies such as a Federal Government, State or Local Government.
053         */
054        GOVT, 
055        /**
056         * A company that provides insurance to its subscribers that may include healthcare related policies.
057         */
058        INS, 
059        /**
060         * An educational institution that provides education or research facilities.
061         */
062        EDU, 
063        /**
064         * An organization that is identified as a part of a religious institution.
065         */
066        RELI, 
067        /**
068         * An organization that is identified as a Pharmaceutical/Clinical Research Sponsor.
069         */
070        CRS, 
071        /**
072         * An un-incorporated community group.
073         */
074        CG, 
075        /**
076         * An organization that is a registered business or corporation but not identified by other types.
077         */
078        BUS, 
079        /**
080         * Other type of organization not already specified.
081         */
082        OTHER, 
083        /**
084         * added to help the parsers
085         */
086        NULL;
087        public static OrganizationType fromCode(String codeString) throws FHIRException {
088            if (codeString == null || "".equals(codeString))
089                return null;
090        if ("prov".equals(codeString))
091          return PROV;
092        if ("dept".equals(codeString))
093          return DEPT;
094        if ("team".equals(codeString))
095          return TEAM;
096        if ("govt".equals(codeString))
097          return GOVT;
098        if ("ins".equals(codeString))
099          return INS;
100        if ("edu".equals(codeString))
101          return EDU;
102        if ("reli".equals(codeString))
103          return RELI;
104        if ("crs".equals(codeString))
105          return CRS;
106        if ("cg".equals(codeString))
107          return CG;
108        if ("bus".equals(codeString))
109          return BUS;
110        if ("other".equals(codeString))
111          return OTHER;
112        throw new FHIRException("Unknown OrganizationType code '"+codeString+"'");
113        }
114        public String toCode() {
115          switch (this) {
116            case PROV: return "prov";
117            case DEPT: return "dept";
118            case TEAM: return "team";
119            case GOVT: return "govt";
120            case INS: return "ins";
121            case EDU: return "edu";
122            case RELI: return "reli";
123            case CRS: return "crs";
124            case CG: return "cg";
125            case BUS: return "bus";
126            case OTHER: return "other";
127            default: return "?";
128          }
129        }
130        public String getSystem() {
131          return "http://hl7.org/fhir/organization-type";
132        }
133        public String getDefinition() {
134          switch (this) {
135            case PROV: return "An organization that provides healthcare services.";
136            case DEPT: return "A department or ward within a hospital (Generally is not applicable to top level organizations)";
137            case TEAM: return "An organizational team is usually a grouping of practitioners that perform a specific function within an organization (which could be a top level organization, or a department).";
138            case GOVT: return "A political body, often used when including organization records for government bodies such as a Federal Government, State or Local Government.";
139            case INS: return "A company that provides insurance to its subscribers that may include healthcare related policies.";
140            case EDU: return "An educational institution that provides education or research facilities.";
141            case RELI: return "An organization that is identified as a part of a religious institution.";
142            case CRS: return "An organization that is identified as a Pharmaceutical/Clinical Research Sponsor.";
143            case CG: return "An un-incorporated community group.";
144            case BUS: return "An organization that is a registered business or corporation but not identified by other types.";
145            case OTHER: return "Other type of organization not already specified.";
146            default: return "?";
147          }
148        }
149        public String getDisplay() {
150          switch (this) {
151            case PROV: return "Healthcare Provider";
152            case DEPT: return "Hospital Department";
153            case TEAM: return "Organizational team";
154            case GOVT: return "Government";
155            case INS: return "Insurance Company";
156            case EDU: return "Educational Institute";
157            case RELI: return "Religious Institution";
158            case CRS: return "Clinical Research Sponsor";
159            case CG: return "Community Group";
160            case BUS: return "Non-Healthcare Business or Corporation";
161            case OTHER: return "Other";
162            default: return "?";
163          }
164    }
165
166
167}
168