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