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