![](/hapi-fhir/images/logos/raccoon-forwards.png)
001package org.hl7.fhir.dstu3.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 Sat, Mar 25, 2017 21:03-0400 for FHIR v3.0.0 036 037 038import org.hl7.fhir.dstu3.model.EnumFactory; 039 040public class V3EntityNamePartQualifierEnumFactory implements EnumFactory<V3EntityNamePartQualifier> { 041 042 public V3EntityNamePartQualifier fromCode(String codeString) throws IllegalArgumentException { 043 if (codeString == null || "".equals(codeString)) 044 return null; 045 if ("_OrganizationNamePartQualifier".equals(codeString)) 046 return V3EntityNamePartQualifier._ORGANIZATIONNAMEPARTQUALIFIER; 047 if ("AC".equals(codeString)) 048 return V3EntityNamePartQualifier.AC; 049 if ("AD".equals(codeString)) 050 return V3EntityNamePartQualifier.AD; 051 if ("BR".equals(codeString)) 052 return V3EntityNamePartQualifier.BR; 053 if ("CL".equals(codeString)) 054 return V3EntityNamePartQualifier.CL; 055 if ("IN".equals(codeString)) 056 return V3EntityNamePartQualifier.IN; 057 if ("LS".equals(codeString)) 058 return V3EntityNamePartQualifier.LS; 059 if ("NB".equals(codeString)) 060 return V3EntityNamePartQualifier.NB; 061 if ("PR".equals(codeString)) 062 return V3EntityNamePartQualifier.PR; 063 if ("SP".equals(codeString)) 064 return V3EntityNamePartQualifier.SP; 065 if ("TITLE".equals(codeString)) 066 return V3EntityNamePartQualifier.TITLE; 067 if ("VV".equals(codeString)) 068 return V3EntityNamePartQualifier.VV; 069 if ("PharmaceuticalEntityNamePartQualifiers".equals(codeString)) 070 return V3EntityNamePartQualifier.PHARMACEUTICALENTITYNAMEPARTQUALIFIERS; 071 if ("CON".equals(codeString)) 072 return V3EntityNamePartQualifier.CON; 073 if ("DEV".equals(codeString)) 074 return V3EntityNamePartQualifier.DEV; 075 if ("FLAV".equals(codeString)) 076 return V3EntityNamePartQualifier.FLAV; 077 if ("FORMUL".equals(codeString)) 078 return V3EntityNamePartQualifier.FORMUL; 079 if ("FRM".equals(codeString)) 080 return V3EntityNamePartQualifier.FRM; 081 if ("INV".equals(codeString)) 082 return V3EntityNamePartQualifier.INV; 083 if ("POPUL".equals(codeString)) 084 return V3EntityNamePartQualifier.POPUL; 085 if ("SCI".equals(codeString)) 086 return V3EntityNamePartQualifier.SCI; 087 if ("STR".equals(codeString)) 088 return V3EntityNamePartQualifier.STR; 089 if ("TIME".equals(codeString)) 090 return V3EntityNamePartQualifier.TIME; 091 if ("TMK".equals(codeString)) 092 return V3EntityNamePartQualifier.TMK; 093 if ("USE".equals(codeString)) 094 return V3EntityNamePartQualifier.USE; 095 if ("_PersonNamePartQualifier".equals(codeString)) 096 return V3EntityNamePartQualifier._PERSONNAMEPARTQUALIFIER; 097 if ("_PersonNamePartAffixTypes".equals(codeString)) 098 return V3EntityNamePartQualifier._PERSONNAMEPARTAFFIXTYPES; 099 if ("_PersonNamePartChangeQualifier".equals(codeString)) 100 return V3EntityNamePartQualifier._PERSONNAMEPARTCHANGEQUALIFIER; 101 if ("_PersonNamePartMiscQualifier".equals(codeString)) 102 return V3EntityNamePartQualifier._PERSONNAMEPARTMISCQUALIFIER; 103 throw new IllegalArgumentException("Unknown V3EntityNamePartQualifier code '"+codeString+"'"); 104 } 105 106 public String toCode(V3EntityNamePartQualifier code) { 107 if (code == V3EntityNamePartQualifier._ORGANIZATIONNAMEPARTQUALIFIER) 108 return "_OrganizationNamePartQualifier"; 109 if (code == V3EntityNamePartQualifier.AC) 110 return "AC"; 111 if (code == V3EntityNamePartQualifier.AD) 112 return "AD"; 113 if (code == V3EntityNamePartQualifier.BR) 114 return "BR"; 115 if (code == V3EntityNamePartQualifier.CL) 116 return "CL"; 117 if (code == V3EntityNamePartQualifier.IN) 118 return "IN"; 119 if (code == V3EntityNamePartQualifier.LS) 120 return "LS"; 121 if (code == V3EntityNamePartQualifier.NB) 122 return "NB"; 123 if (code == V3EntityNamePartQualifier.PR) 124 return "PR"; 125 if (code == V3EntityNamePartQualifier.SP) 126 return "SP"; 127 if (code == V3EntityNamePartQualifier.TITLE) 128 return "TITLE"; 129 if (code == V3EntityNamePartQualifier.VV) 130 return "VV"; 131 if (code == V3EntityNamePartQualifier.PHARMACEUTICALENTITYNAMEPARTQUALIFIERS) 132 return "PharmaceuticalEntityNamePartQualifiers"; 133 if (code == V3EntityNamePartQualifier.CON) 134 return "CON"; 135 if (code == V3EntityNamePartQualifier.DEV) 136 return "DEV"; 137 if (code == V3EntityNamePartQualifier.FLAV) 138 return "FLAV"; 139 if (code == V3EntityNamePartQualifier.FORMUL) 140 return "FORMUL"; 141 if (code == V3EntityNamePartQualifier.FRM) 142 return "FRM"; 143 if (code == V3EntityNamePartQualifier.INV) 144 return "INV"; 145 if (code == V3EntityNamePartQualifier.POPUL) 146 return "POPUL"; 147 if (code == V3EntityNamePartQualifier.SCI) 148 return "SCI"; 149 if (code == V3EntityNamePartQualifier.STR) 150 return "STR"; 151 if (code == V3EntityNamePartQualifier.TIME) 152 return "TIME"; 153 if (code == V3EntityNamePartQualifier.TMK) 154 return "TMK"; 155 if (code == V3EntityNamePartQualifier.USE) 156 return "USE"; 157 if (code == V3EntityNamePartQualifier._PERSONNAMEPARTQUALIFIER) 158 return "_PersonNamePartQualifier"; 159 if (code == V3EntityNamePartQualifier._PERSONNAMEPARTAFFIXTYPES) 160 return "_PersonNamePartAffixTypes"; 161 if (code == V3EntityNamePartQualifier._PERSONNAMEPARTCHANGEQUALIFIER) 162 return "_PersonNamePartChangeQualifier"; 163 if (code == V3EntityNamePartQualifier._PERSONNAMEPARTMISCQUALIFIER) 164 return "_PersonNamePartMiscQualifier"; 165 return "?"; 166 } 167 168 public String toSystem(V3EntityNamePartQualifier code) { 169 return code.getSystem(); 170 } 171 172}