![](/hapi-fhir/images/logos/raccoon-forwards.png)
001package org.hl7.fhir.r4.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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 033 034import org.hl7.fhir.exceptions.FHIRException; 035 036public enum OrganizationRole { 037 038 /** 039 * null 040 */ 041 PROVIDER, 042 /** 043 * An organization such as a public health agency, community/social services 044 * provider, etc. 045 */ 046 AGENCY, 047 /** 048 * An organization providing research-related services such as conducting 049 * research, recruiting research participants, analyzing data, etc. 050 */ 051 RESEARCH, 052 /** 053 * An organization providing reimbursement, payment, or related services 054 */ 055 PAYER, 056 /** 057 * An organization providing diagnostic testing/laboratory services 058 */ 059 DIAGNOSTICS, 060 /** 061 * An organization that provides medical supplies (e.g. medical devices, 062 * equipment, pharmaceutical products, etc.) 063 */ 064 SUPPLIER, 065 /** 066 * An organization that facilitates electronic clinical data exchange between 067 * entities 068 */ 069 HIE_HIO, 070 /** 071 * A type of non-ownership relationship between entities (encompasses 072 * partnerships, collaboration, joint ventures, etc.) 073 */ 074 MEMBER, 075 /** 076 * added to help the parsers 077 */ 078 NULL; 079 080 public static OrganizationRole fromCode(String codeString) throws FHIRException { 081 if (codeString == null || "".equals(codeString)) 082 return null; 083 if ("provider".equals(codeString)) 084 return PROVIDER; 085 if ("agency".equals(codeString)) 086 return AGENCY; 087 if ("research".equals(codeString)) 088 return RESEARCH; 089 if ("payer".equals(codeString)) 090 return PAYER; 091 if ("diagnostics".equals(codeString)) 092 return DIAGNOSTICS; 093 if ("supplier".equals(codeString)) 094 return SUPPLIER; 095 if ("HIE/HIO".equals(codeString)) 096 return HIE_HIO; 097 if ("member".equals(codeString)) 098 return MEMBER; 099 throw new FHIRException("Unknown OrganizationRole code '" + codeString + "'"); 100 } 101 102 public String toCode() { 103 switch (this) { 104 case PROVIDER: 105 return "provider"; 106 case AGENCY: 107 return "agency"; 108 case RESEARCH: 109 return "research"; 110 case PAYER: 111 return "payer"; 112 case DIAGNOSTICS: 113 return "diagnostics"; 114 case SUPPLIER: 115 return "supplier"; 116 case HIE_HIO: 117 return "HIE/HIO"; 118 case MEMBER: 119 return "member"; 120 case NULL: 121 return null; 122 default: 123 return "?"; 124 } 125 } 126 127 public String getSystem() { 128 return "http://hl7.org/fhir/organization-role"; 129 } 130 131 public String getDefinition() { 132 switch (this) { 133 case PROVIDER: 134 return ""; 135 case AGENCY: 136 return "An organization such as a public health agency, community/social services provider, etc."; 137 case RESEARCH: 138 return "An organization providing research-related services such as conducting research, recruiting research participants, analyzing data, etc."; 139 case PAYER: 140 return "An organization providing reimbursement, payment, or related services"; 141 case DIAGNOSTICS: 142 return "An organization providing diagnostic testing/laboratory services"; 143 case SUPPLIER: 144 return "An organization that provides medical supplies (e.g. medical devices, equipment, pharmaceutical products, etc.)"; 145 case HIE_HIO: 146 return "An organization that facilitates electronic clinical data exchange between entities"; 147 case MEMBER: 148 return "A type of non-ownership relationship between entities (encompasses partnerships, collaboration, joint ventures, etc.)"; 149 case NULL: 150 return null; 151 default: 152 return "?"; 153 } 154 } 155 156 public String getDisplay() { 157 switch (this) { 158 case PROVIDER: 159 return "Provider"; 160 case AGENCY: 161 return "Agency"; 162 case RESEARCH: 163 return "Research"; 164 case PAYER: 165 return "Payer"; 166 case DIAGNOSTICS: 167 return "Diagnostics"; 168 case SUPPLIER: 169 return "Supplier"; 170 case HIE_HIO: 171 return "HIE/HIO"; 172 case MEMBER: 173 return "Member"; 174 case NULL: 175 return null; 176 default: 177 return "?"; 178 } 179 } 180 181}