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.r4.model.EnumFactory; 035 036public class V3GTSAbbreviationEnumFactory implements EnumFactory<V3GTSAbbreviation> { 037 038 public V3GTSAbbreviation fromCode(String codeString) throws IllegalArgumentException { 039 if (codeString == null || "".equals(codeString)) 040 return null; 041 if ("AM".equals(codeString)) 042 return V3GTSAbbreviation.AM; 043 if ("BED".equals(codeString)) 044 return V3GTSAbbreviation.BED; 045 if ("BID".equals(codeString)) 046 return V3GTSAbbreviation.BID; 047 if ("JB".equals(codeString)) 048 return V3GTSAbbreviation.JB; 049 if ("JE".equals(codeString)) 050 return V3GTSAbbreviation.JE; 051 if ("JH".equals(codeString)) 052 return V3GTSAbbreviation.JH; 053 if ("_GTSAbbreviationHolidaysChristianRoman".equals(codeString)) 054 return V3GTSAbbreviation._GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN; 055 if ("JHCHREAS".equals(codeString)) 056 return V3GTSAbbreviation.JHCHREAS; 057 if ("JHCHRGFR".equals(codeString)) 058 return V3GTSAbbreviation.JHCHRGFR; 059 if ("JHCHRNEW".equals(codeString)) 060 return V3GTSAbbreviation.JHCHRNEW; 061 if ("JHCHRPEN".equals(codeString)) 062 return V3GTSAbbreviation.JHCHRPEN; 063 if ("JHCHRXME".equals(codeString)) 064 return V3GTSAbbreviation.JHCHRXME; 065 if ("JHCHRXMS".equals(codeString)) 066 return V3GTSAbbreviation.JHCHRXMS; 067 if ("JHNNL".equals(codeString)) 068 return V3GTSAbbreviation.JHNNL; 069 if ("JHNNLLD".equals(codeString)) 070 return V3GTSAbbreviation.JHNNLLD; 071 if ("JHNNLQD".equals(codeString)) 072 return V3GTSAbbreviation.JHNNLQD; 073 if ("JHNNLSK".equals(codeString)) 074 return V3GTSAbbreviation.JHNNLSK; 075 if ("JHNUS".equals(codeString)) 076 return V3GTSAbbreviation.JHNUS; 077 if ("JHNUSCLM".equals(codeString)) 078 return V3GTSAbbreviation.JHNUSCLM; 079 if ("JHNUSIND".equals(codeString)) 080 return V3GTSAbbreviation.JHNUSIND; 081 if ("JHNUSIND1".equals(codeString)) 082 return V3GTSAbbreviation.JHNUSIND1; 083 if ("JHNUSIND5".equals(codeString)) 084 return V3GTSAbbreviation.JHNUSIND5; 085 if ("JHNUSLBR".equals(codeString)) 086 return V3GTSAbbreviation.JHNUSLBR; 087 if ("JHNUSMEM".equals(codeString)) 088 return V3GTSAbbreviation.JHNUSMEM; 089 if ("JHNUSMEM5".equals(codeString)) 090 return V3GTSAbbreviation.JHNUSMEM5; 091 if ("JHNUSMEM6".equals(codeString)) 092 return V3GTSAbbreviation.JHNUSMEM6; 093 if ("JHNUSMLK".equals(codeString)) 094 return V3GTSAbbreviation.JHNUSMLK; 095 if ("JHNUSPRE".equals(codeString)) 096 return V3GTSAbbreviation.JHNUSPRE; 097 if ("JHNUSTKS".equals(codeString)) 098 return V3GTSAbbreviation.JHNUSTKS; 099 if ("JHNUSTKS5".equals(codeString)) 100 return V3GTSAbbreviation.JHNUSTKS5; 101 if ("JHNUSVET".equals(codeString)) 102 return V3GTSAbbreviation.JHNUSVET; 103 if ("MO".equals(codeString)) 104 return V3GTSAbbreviation.MO; 105 if ("PM".equals(codeString)) 106 return V3GTSAbbreviation.PM; 107 if ("Q1H".equals(codeString)) 108 return V3GTSAbbreviation.Q1H; 109 if ("Q2H".equals(codeString)) 110 return V3GTSAbbreviation.Q2H; 111 if ("Q3H".equals(codeString)) 112 return V3GTSAbbreviation.Q3H; 113 if ("Q4H".equals(codeString)) 114 return V3GTSAbbreviation.Q4H; 115 if ("Q6H".equals(codeString)) 116 return V3GTSAbbreviation.Q6H; 117 if ("Q8H".equals(codeString)) 118 return V3GTSAbbreviation.Q8H; 119 if ("QD".equals(codeString)) 120 return V3GTSAbbreviation.QD; 121 if ("QID".equals(codeString)) 122 return V3GTSAbbreviation.QID; 123 if ("QOD".equals(codeString)) 124 return V3GTSAbbreviation.QOD; 125 if ("TID".equals(codeString)) 126 return V3GTSAbbreviation.TID; 127 if ("WK".equals(codeString)) 128 return V3GTSAbbreviation.WK; 129 throw new IllegalArgumentException("Unknown V3GTSAbbreviation code '" + codeString + "'"); 130 } 131 132 public String toCode(V3GTSAbbreviation code) { 133 if (code == V3GTSAbbreviation.NULL) 134 return null; 135 if (code == V3GTSAbbreviation.AM) 136 return "AM"; 137 if (code == V3GTSAbbreviation.BED) 138 return "BED"; 139 if (code == V3GTSAbbreviation.BID) 140 return "BID"; 141 if (code == V3GTSAbbreviation.JB) 142 return "JB"; 143 if (code == V3GTSAbbreviation.JE) 144 return "JE"; 145 if (code == V3GTSAbbreviation.JH) 146 return "JH"; 147 if (code == V3GTSAbbreviation._GTSABBREVIATIONHOLIDAYSCHRISTIANROMAN) 148 return "_GTSAbbreviationHolidaysChristianRoman"; 149 if (code == V3GTSAbbreviation.JHCHREAS) 150 return "JHCHREAS"; 151 if (code == V3GTSAbbreviation.JHCHRGFR) 152 return "JHCHRGFR"; 153 if (code == V3GTSAbbreviation.JHCHRNEW) 154 return "JHCHRNEW"; 155 if (code == V3GTSAbbreviation.JHCHRPEN) 156 return "JHCHRPEN"; 157 if (code == V3GTSAbbreviation.JHCHRXME) 158 return "JHCHRXME"; 159 if (code == V3GTSAbbreviation.JHCHRXMS) 160 return "JHCHRXMS"; 161 if (code == V3GTSAbbreviation.JHNNL) 162 return "JHNNL"; 163 if (code == V3GTSAbbreviation.JHNNLLD) 164 return "JHNNLLD"; 165 if (code == V3GTSAbbreviation.JHNNLQD) 166 return "JHNNLQD"; 167 if (code == V3GTSAbbreviation.JHNNLSK) 168 return "JHNNLSK"; 169 if (code == V3GTSAbbreviation.JHNUS) 170 return "JHNUS"; 171 if (code == V3GTSAbbreviation.JHNUSCLM) 172 return "JHNUSCLM"; 173 if (code == V3GTSAbbreviation.JHNUSIND) 174 return "JHNUSIND"; 175 if (code == V3GTSAbbreviation.JHNUSIND1) 176 return "JHNUSIND1"; 177 if (code == V3GTSAbbreviation.JHNUSIND5) 178 return "JHNUSIND5"; 179 if (code == V3GTSAbbreviation.JHNUSLBR) 180 return "JHNUSLBR"; 181 if (code == V3GTSAbbreviation.JHNUSMEM) 182 return "JHNUSMEM"; 183 if (code == V3GTSAbbreviation.JHNUSMEM5) 184 return "JHNUSMEM5"; 185 if (code == V3GTSAbbreviation.JHNUSMEM6) 186 return "JHNUSMEM6"; 187 if (code == V3GTSAbbreviation.JHNUSMLK) 188 return "JHNUSMLK"; 189 if (code == V3GTSAbbreviation.JHNUSPRE) 190 return "JHNUSPRE"; 191 if (code == V3GTSAbbreviation.JHNUSTKS) 192 return "JHNUSTKS"; 193 if (code == V3GTSAbbreviation.JHNUSTKS5) 194 return "JHNUSTKS5"; 195 if (code == V3GTSAbbreviation.JHNUSVET) 196 return "JHNUSVET"; 197 if (code == V3GTSAbbreviation.MO) 198 return "MO"; 199 if (code == V3GTSAbbreviation.PM) 200 return "PM"; 201 if (code == V3GTSAbbreviation.Q1H) 202 return "Q1H"; 203 if (code == V3GTSAbbreviation.Q2H) 204 return "Q2H"; 205 if (code == V3GTSAbbreviation.Q3H) 206 return "Q3H"; 207 if (code == V3GTSAbbreviation.Q4H) 208 return "Q4H"; 209 if (code == V3GTSAbbreviation.Q6H) 210 return "Q6H"; 211 if (code == V3GTSAbbreviation.Q8H) 212 return "Q8H"; 213 if (code == V3GTSAbbreviation.QD) 214 return "QD"; 215 if (code == V3GTSAbbreviation.QID) 216 return "QID"; 217 if (code == V3GTSAbbreviation.QOD) 218 return "QOD"; 219 if (code == V3GTSAbbreviation.TID) 220 return "TID"; 221 if (code == V3GTSAbbreviation.WK) 222 return "WK"; 223 return "?"; 224 } 225 226 public String toSystem(V3GTSAbbreviation code) { 227 return code.getSystem(); 228 } 229 230}