001package org.hl7.fhir.r4.model.codesystems;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
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/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, 
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this 
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, 
034     this list of conditions and the following disclaimer in the documentation 
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
049  POSSIBILITY OF SUCH DAMAGE.
050  
051*/
052
053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
054
055
056import org.hl7.fhir.r4.model.EnumFactory;
057
058public class V3ActMoodEnumFactory implements EnumFactory<V3ActMood> {
059
060  public V3ActMood fromCode(String codeString) throws IllegalArgumentException {
061    if (codeString == null || "".equals(codeString))
062      return null;
063    if ("_ActMoodCompletionTrack".equals(codeString))
064      return V3ActMood._ACTMOODCOMPLETIONTRACK;
065    if ("_ActMoodPotential".equals(codeString))
066      return V3ActMood._ACTMOODPOTENTIAL;
067    if ("DEF".equals(codeString))
068      return V3ActMood.DEF;
069    if ("PERM".equals(codeString))
070      return V3ActMood.PERM;
071    if ("SLOT".equals(codeString))
072      return V3ActMood.SLOT;
073    if ("EVN".equals(codeString))
074      return V3ActMood.EVN;
075    if ("INT".equals(codeString))
076      return V3ActMood.INT;
077    if ("_ActMoodDesire".equals(codeString))
078      return V3ActMood._ACTMOODDESIRE;
079    if ("_ActMoodActRequest".equals(codeString))
080      return V3ActMood._ACTMOODACTREQUEST;
081    if ("ARQ".equals(codeString))
082      return V3ActMood.ARQ;
083    if ("PERMRQ".equals(codeString))
084      return V3ActMood.PERMRQ;
085    if ("RQO".equals(codeString))
086      return V3ActMood.RQO;
087    if ("PRP".equals(codeString))
088      return V3ActMood.PRP;
089    if ("RMD".equals(codeString))
090      return V3ActMood.RMD;
091    if ("PRMS".equals(codeString))
092      return V3ActMood.PRMS;
093    if ("APT".equals(codeString))
094      return V3ActMood.APT;
095    if ("_ActMoodPredicate".equals(codeString))
096      return V3ActMood._ACTMOODPREDICATE;
097    if ("CRT".equals(codeString))
098      return V3ActMood.CRT;
099    if ("EVN.CRT".equals(codeString))
100      return V3ActMood.EVN_CRT;
101    if ("GOL.CRT".equals(codeString))
102      return V3ActMood.GOL_CRT;
103    if ("INT.CRT".equals(codeString))
104      return V3ActMood.INT_CRT;
105    if ("PRMS.CRT".equals(codeString))
106      return V3ActMood.PRMS_CRT;
107    if ("RQO.CRT".equals(codeString))
108      return V3ActMood.RQO_CRT;
109    if ("RSK.CRT".equals(codeString))
110      return V3ActMood.RSK_CRT;
111    if ("EXPEC".equals(codeString))
112      return V3ActMood.EXPEC;
113    if ("GOL".equals(codeString))
114      return V3ActMood.GOL;
115    if ("RSK".equals(codeString))
116      return V3ActMood.RSK;
117    if ("OPT".equals(codeString))
118      return V3ActMood.OPT;
119    throw new IllegalArgumentException("Unknown V3ActMood code '"+codeString+"'");
120  }
121
122  public String toCode(V3ActMood code) {
123    if (code == V3ActMood._ACTMOODCOMPLETIONTRACK)
124      return "_ActMoodCompletionTrack";
125    if (code == V3ActMood._ACTMOODPOTENTIAL)
126      return "_ActMoodPotential";
127    if (code == V3ActMood.DEF)
128      return "DEF";
129    if (code == V3ActMood.PERM)
130      return "PERM";
131    if (code == V3ActMood.SLOT)
132      return "SLOT";
133    if (code == V3ActMood.EVN)
134      return "EVN";
135    if (code == V3ActMood.INT)
136      return "INT";
137    if (code == V3ActMood._ACTMOODDESIRE)
138      return "_ActMoodDesire";
139    if (code == V3ActMood._ACTMOODACTREQUEST)
140      return "_ActMoodActRequest";
141    if (code == V3ActMood.ARQ)
142      return "ARQ";
143    if (code == V3ActMood.PERMRQ)
144      return "PERMRQ";
145    if (code == V3ActMood.RQO)
146      return "RQO";
147    if (code == V3ActMood.PRP)
148      return "PRP";
149    if (code == V3ActMood.RMD)
150      return "RMD";
151    if (code == V3ActMood.PRMS)
152      return "PRMS";
153    if (code == V3ActMood.APT)
154      return "APT";
155    if (code == V3ActMood._ACTMOODPREDICATE)
156      return "_ActMoodPredicate";
157    if (code == V3ActMood.CRT)
158      return "CRT";
159    if (code == V3ActMood.EVN_CRT)
160      return "EVN.CRT";
161    if (code == V3ActMood.GOL_CRT)
162      return "GOL.CRT";
163    if (code == V3ActMood.INT_CRT)
164      return "INT.CRT";
165    if (code == V3ActMood.PRMS_CRT)
166      return "PRMS.CRT";
167    if (code == V3ActMood.RQO_CRT)
168      return "RQO.CRT";
169    if (code == V3ActMood.RSK_CRT)
170      return "RSK.CRT";
171    if (code == V3ActMood.EXPEC)
172      return "EXPEC";
173    if (code == V3ActMood.GOL)
174      return "GOL";
175    if (code == V3ActMood.RSK)
176      return "RSK";
177    if (code == V3ActMood.OPT)
178      return "OPT";
179    return "?";
180  }
181
182    public String toSystem(V3ActMood code) {
183      return code.getSystem();
184      }
185
186}
187