001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.r5.model.EnumFactory; 056 057public class ContractSignerTypeEnumFactory implements EnumFactory<ContractSignerType> { 058 059 public ContractSignerType fromCode(String codeString) throws IllegalArgumentException { 060 if (codeString == null || "".equals(codeString)) 061 return null; 062 if ("AMENDER".equals(codeString)) 063 return ContractSignerType.AMENDER; 064 if ("AUTHN".equals(codeString)) 065 return ContractSignerType.AUTHN; 066 if ("AUT".equals(codeString)) 067 return ContractSignerType.AUT; 068 if ("AFFL".equals(codeString)) 069 return ContractSignerType.AFFL; 070 if ("AGNT".equals(codeString)) 071 return ContractSignerType.AGNT; 072 if ("ASSIGNED".equals(codeString)) 073 return ContractSignerType.ASSIGNED; 074 if ("CIT".equals(codeString)) 075 return ContractSignerType.CIT; 076 if ("CLAIMANT".equals(codeString)) 077 return ContractSignerType.CLAIMANT; 078 if ("COAUTH".equals(codeString)) 079 return ContractSignerType.COAUTH; 080 if ("CONSENTER".equals(codeString)) 081 return ContractSignerType.CONSENTER; 082 if ("CONSWIT".equals(codeString)) 083 return ContractSignerType.CONSWIT; 084 if ("CONT".equals(codeString)) 085 return ContractSignerType.CONT; 086 if ("COPART".equals(codeString)) 087 return ContractSignerType.COPART; 088 if ("COVPTY".equals(codeString)) 089 return ContractSignerType.COVPTY; 090 if ("DELEGATEE".equals(codeString)) 091 return ContractSignerType.DELEGATEE; 092 if ("delegator".equals(codeString)) 093 return ContractSignerType.DELEGATOR; 094 if ("DEPEND".equals(codeString)) 095 return ContractSignerType.DEPEND; 096 if ("DPOWATT".equals(codeString)) 097 return ContractSignerType.DPOWATT; 098 if ("EMGCON".equals(codeString)) 099 return ContractSignerType.EMGCON; 100 if ("EVTWIT".equals(codeString)) 101 return ContractSignerType.EVTWIT; 102 if ("EXCEST".equals(codeString)) 103 return ContractSignerType.EXCEST; 104 if ("GRANTEE".equals(codeString)) 105 return ContractSignerType.GRANTEE; 106 if ("GRANTOR".equals(codeString)) 107 return ContractSignerType.GRANTOR; 108 if ("GUAR".equals(codeString)) 109 return ContractSignerType.GUAR; 110 if ("GUARD".equals(codeString)) 111 return ContractSignerType.GUARD; 112 if ("GUADLTM".equals(codeString)) 113 return ContractSignerType.GUADLTM; 114 if ("INF".equals(codeString)) 115 return ContractSignerType.INF; 116 if ("INTPRT".equals(codeString)) 117 return ContractSignerType.INTPRT; 118 if ("INSBJ".equals(codeString)) 119 return ContractSignerType.INSBJ; 120 if ("HPOWATT".equals(codeString)) 121 return ContractSignerType.HPOWATT; 122 if ("HPROV".equals(codeString)) 123 return ContractSignerType.HPROV; 124 if ("LEGAUTHN".equals(codeString)) 125 return ContractSignerType.LEGAUTHN; 126 if ("NMDINS".equals(codeString)) 127 return ContractSignerType.NMDINS; 128 if ("NOK".equals(codeString)) 129 return ContractSignerType.NOK; 130 if ("NOTARY".equals(codeString)) 131 return ContractSignerType.NOTARY; 132 if ("PAT".equals(codeString)) 133 return ContractSignerType.PAT; 134 if ("POWATT".equals(codeString)) 135 return ContractSignerType.POWATT; 136 if ("PRIMAUTH".equals(codeString)) 137 return ContractSignerType.PRIMAUTH; 138 if ("PRIRECIP".equals(codeString)) 139 return ContractSignerType.PRIRECIP; 140 if ("RECIP".equals(codeString)) 141 return ContractSignerType.RECIP; 142 if ("RESPRSN".equals(codeString)) 143 return ContractSignerType.RESPRSN; 144 if ("REVIEWER".equals(codeString)) 145 return ContractSignerType.REVIEWER; 146 if ("TRANS".equals(codeString)) 147 return ContractSignerType.TRANS; 148 if ("SOURCE".equals(codeString)) 149 return ContractSignerType.SOURCE; 150 if ("SPOWATT".equals(codeString)) 151 return ContractSignerType.SPOWATT; 152 if ("VALID".equals(codeString)) 153 return ContractSignerType.VALID; 154 if ("VERF".equals(codeString)) 155 return ContractSignerType.VERF; 156 if ("WIT".equals(codeString)) 157 return ContractSignerType.WIT; 158 throw new IllegalArgumentException("Unknown ContractSignerType code '"+codeString+"'"); 159 } 160 161 public String toCode(ContractSignerType code) { 162 if (code == ContractSignerType.AMENDER) 163 return "AMENDER"; 164 if (code == ContractSignerType.AUTHN) 165 return "AUTHN"; 166 if (code == ContractSignerType.AUT) 167 return "AUT"; 168 if (code == ContractSignerType.AFFL) 169 return "AFFL"; 170 if (code == ContractSignerType.AGNT) 171 return "AGNT"; 172 if (code == ContractSignerType.ASSIGNED) 173 return "ASSIGNED"; 174 if (code == ContractSignerType.CIT) 175 return "CIT"; 176 if (code == ContractSignerType.CLAIMANT) 177 return "CLAIMANT"; 178 if (code == ContractSignerType.COAUTH) 179 return "COAUTH"; 180 if (code == ContractSignerType.CONSENTER) 181 return "CONSENTER"; 182 if (code == ContractSignerType.CONSWIT) 183 return "CONSWIT"; 184 if (code == ContractSignerType.CONT) 185 return "CONT"; 186 if (code == ContractSignerType.COPART) 187 return "COPART"; 188 if (code == ContractSignerType.COVPTY) 189 return "COVPTY"; 190 if (code == ContractSignerType.DELEGATEE) 191 return "DELEGATEE"; 192 if (code == ContractSignerType.DELEGATOR) 193 return "delegator"; 194 if (code == ContractSignerType.DEPEND) 195 return "DEPEND"; 196 if (code == ContractSignerType.DPOWATT) 197 return "DPOWATT"; 198 if (code == ContractSignerType.EMGCON) 199 return "EMGCON"; 200 if (code == ContractSignerType.EVTWIT) 201 return "EVTWIT"; 202 if (code == ContractSignerType.EXCEST) 203 return "EXCEST"; 204 if (code == ContractSignerType.GRANTEE) 205 return "GRANTEE"; 206 if (code == ContractSignerType.GRANTOR) 207 return "GRANTOR"; 208 if (code == ContractSignerType.GUAR) 209 return "GUAR"; 210 if (code == ContractSignerType.GUARD) 211 return "GUARD"; 212 if (code == ContractSignerType.GUADLTM) 213 return "GUADLTM"; 214 if (code == ContractSignerType.INF) 215 return "INF"; 216 if (code == ContractSignerType.INTPRT) 217 return "INTPRT"; 218 if (code == ContractSignerType.INSBJ) 219 return "INSBJ"; 220 if (code == ContractSignerType.HPOWATT) 221 return "HPOWATT"; 222 if (code == ContractSignerType.HPROV) 223 return "HPROV"; 224 if (code == ContractSignerType.LEGAUTHN) 225 return "LEGAUTHN"; 226 if (code == ContractSignerType.NMDINS) 227 return "NMDINS"; 228 if (code == ContractSignerType.NOK) 229 return "NOK"; 230 if (code == ContractSignerType.NOTARY) 231 return "NOTARY"; 232 if (code == ContractSignerType.PAT) 233 return "PAT"; 234 if (code == ContractSignerType.POWATT) 235 return "POWATT"; 236 if (code == ContractSignerType.PRIMAUTH) 237 return "PRIMAUTH"; 238 if (code == ContractSignerType.PRIRECIP) 239 return "PRIRECIP"; 240 if (code == ContractSignerType.RECIP) 241 return "RECIP"; 242 if (code == ContractSignerType.RESPRSN) 243 return "RESPRSN"; 244 if (code == ContractSignerType.REVIEWER) 245 return "REVIEWER"; 246 if (code == ContractSignerType.TRANS) 247 return "TRANS"; 248 if (code == ContractSignerType.SOURCE) 249 return "SOURCE"; 250 if (code == ContractSignerType.SPOWATT) 251 return "SPOWATT"; 252 if (code == ContractSignerType.VALID) 253 return "VALID"; 254 if (code == ContractSignerType.VERF) 255 return "VERF"; 256 if (code == ContractSignerType.WIT) 257 return "WIT"; 258 return "?"; 259 } 260 261 public String toSystem(ContractSignerType code) { 262 return code.getSystem(); 263 } 264 265} 266