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