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 V3ActMoodEnumFactory implements EnumFactory<V3ActMood> { 041 042 public V3ActMood fromCode(String codeString) throws IllegalArgumentException { 043 if (codeString == null || "".equals(codeString)) 044 return null; 045 if ("_ActMoodCompletionTrack".equals(codeString)) 046 return V3ActMood._ACTMOODCOMPLETIONTRACK; 047 if ("_ActMoodPotential".equals(codeString)) 048 return V3ActMood._ACTMOODPOTENTIAL; 049 if ("DEF".equals(codeString)) 050 return V3ActMood.DEF; 051 if ("PERM".equals(codeString)) 052 return V3ActMood.PERM; 053 if ("SLOT".equals(codeString)) 054 return V3ActMood.SLOT; 055 if ("EVN".equals(codeString)) 056 return V3ActMood.EVN; 057 if ("INT".equals(codeString)) 058 return V3ActMood.INT; 059 if ("_ActMoodDesire".equals(codeString)) 060 return V3ActMood._ACTMOODDESIRE; 061 if ("_ActMoodActRequest".equals(codeString)) 062 return V3ActMood._ACTMOODACTREQUEST; 063 if ("ARQ".equals(codeString)) 064 return V3ActMood.ARQ; 065 if ("PERMRQ".equals(codeString)) 066 return V3ActMood.PERMRQ; 067 if ("RQO".equals(codeString)) 068 return V3ActMood.RQO; 069 if ("PRP".equals(codeString)) 070 return V3ActMood.PRP; 071 if ("RMD".equals(codeString)) 072 return V3ActMood.RMD; 073 if ("PRMS".equals(codeString)) 074 return V3ActMood.PRMS; 075 if ("APT".equals(codeString)) 076 return V3ActMood.APT; 077 if ("_ActMoodPredicate".equals(codeString)) 078 return V3ActMood._ACTMOODPREDICATE; 079 if ("CRT".equals(codeString)) 080 return V3ActMood.CRT; 081 if ("EVN.CRT".equals(codeString)) 082 return V3ActMood.EVN_CRT; 083 if ("GOL.CRT".equals(codeString)) 084 return V3ActMood.GOL_CRT; 085 if ("INT.CRT".equals(codeString)) 086 return V3ActMood.INT_CRT; 087 if ("PRMS.CRT".equals(codeString)) 088 return V3ActMood.PRMS_CRT; 089 if ("RQO.CRT".equals(codeString)) 090 return V3ActMood.RQO_CRT; 091 if ("RSK.CRT".equals(codeString)) 092 return V3ActMood.RSK_CRT; 093 if ("EXPEC".equals(codeString)) 094 return V3ActMood.EXPEC; 095 if ("GOL".equals(codeString)) 096 return V3ActMood.GOL; 097 if ("RSK".equals(codeString)) 098 return V3ActMood.RSK; 099 if ("OPT".equals(codeString)) 100 return V3ActMood.OPT; 101 throw new IllegalArgumentException("Unknown V3ActMood code '"+codeString+"'"); 102 } 103 104 public String toCode(V3ActMood code) { 105 if (code == V3ActMood.NULL) 106 return null; 107 if (code == V3ActMood._ACTMOODCOMPLETIONTRACK) 108 return "_ActMoodCompletionTrack"; 109 if (code == V3ActMood._ACTMOODPOTENTIAL) 110 return "_ActMoodPotential"; 111 if (code == V3ActMood.DEF) 112 return "DEF"; 113 if (code == V3ActMood.PERM) 114 return "PERM"; 115 if (code == V3ActMood.SLOT) 116 return "SLOT"; 117 if (code == V3ActMood.EVN) 118 return "EVN"; 119 if (code == V3ActMood.INT) 120 return "INT"; 121 if (code == V3ActMood._ACTMOODDESIRE) 122 return "_ActMoodDesire"; 123 if (code == V3ActMood._ACTMOODACTREQUEST) 124 return "_ActMoodActRequest"; 125 if (code == V3ActMood.ARQ) 126 return "ARQ"; 127 if (code == V3ActMood.PERMRQ) 128 return "PERMRQ"; 129 if (code == V3ActMood.RQO) 130 return "RQO"; 131 if (code == V3ActMood.PRP) 132 return "PRP"; 133 if (code == V3ActMood.RMD) 134 return "RMD"; 135 if (code == V3ActMood.PRMS) 136 return "PRMS"; 137 if (code == V3ActMood.APT) 138 return "APT"; 139 if (code == V3ActMood._ACTMOODPREDICATE) 140 return "_ActMoodPredicate"; 141 if (code == V3ActMood.CRT) 142 return "CRT"; 143 if (code == V3ActMood.EVN_CRT) 144 return "EVN.CRT"; 145 if (code == V3ActMood.GOL_CRT) 146 return "GOL.CRT"; 147 if (code == V3ActMood.INT_CRT) 148 return "INT.CRT"; 149 if (code == V3ActMood.PRMS_CRT) 150 return "PRMS.CRT"; 151 if (code == V3ActMood.RQO_CRT) 152 return "RQO.CRT"; 153 if (code == V3ActMood.RSK_CRT) 154 return "RSK.CRT"; 155 if (code == V3ActMood.EXPEC) 156 return "EXPEC"; 157 if (code == V3ActMood.GOL) 158 return "GOL"; 159 if (code == V3ActMood.RSK) 160 return "RSK"; 161 if (code == V3ActMood.OPT) 162 return "OPT"; 163 return "?"; 164 } 165 166 public String toSystem(V3ActMood code) { 167 return code.getSystem(); 168 } 169 170}