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 V3HL7StandardVersionCodeEnumFactory implements EnumFactory<V3HL7StandardVersionCode> { 037 038 public V3HL7StandardVersionCode fromCode(String codeString) throws IllegalArgumentException { 039 if (codeString == null || "".equals(codeString)) 040 return null; 041 if ("Ballot2008Jan".equals(codeString)) 042 return V3HL7StandardVersionCode.BALLOT2008JAN; 043 if ("Ballot2008May".equals(codeString)) 044 return V3HL7StandardVersionCode.BALLOT2008MAY; 045 if ("Ballot2008Sep".equals(codeString)) 046 return V3HL7StandardVersionCode.BALLOT2008SEP; 047 if ("Ballot2009Jan".equals(codeString)) 048 return V3HL7StandardVersionCode.BALLOT2009JAN; 049 if ("Ballot2009May".equals(codeString)) 050 return V3HL7StandardVersionCode.BALLOT2009MAY; 051 if ("Ballot2009Sep".equals(codeString)) 052 return V3HL7StandardVersionCode.BALLOT2009SEP; 053 if ("Ballot2010Jan".equals(codeString)) 054 return V3HL7StandardVersionCode.BALLOT2010JAN; 055 if ("Ballot2010May".equals(codeString)) 056 return V3HL7StandardVersionCode.BALLOT2010MAY; 057 if ("Ballot2010Sep".equals(codeString)) 058 return V3HL7StandardVersionCode.BALLOT2010SEP; 059 if ("Ballot2011Jan".equals(codeString)) 060 return V3HL7StandardVersionCode.BALLOT2011JAN; 061 if ("Ballot2011May".equals(codeString)) 062 return V3HL7StandardVersionCode.BALLOT2011MAY; 063 if ("Ballot2011Sep".equals(codeString)) 064 return V3HL7StandardVersionCode.BALLOT2011SEP; 065 if ("Ballot2012Jan".equals(codeString)) 066 return V3HL7StandardVersionCode.BALLOT2012JAN; 067 if ("Ballot2012May".equals(codeString)) 068 return V3HL7StandardVersionCode.BALLOT2012MAY; 069 if ("Ballot2012Sep".equals(codeString)) 070 return V3HL7StandardVersionCode.BALLOT2012SEP; 071 if ("V3-2003-12".equals(codeString)) 072 return V3HL7StandardVersionCode.V3200312; 073 if ("V3-2005N".equals(codeString)) 074 return V3HL7StandardVersionCode.V32005N; 075 if ("V3-2006N".equals(codeString)) 076 return V3HL7StandardVersionCode.V32006N; 077 if ("V3-2008N".equals(codeString)) 078 return V3HL7StandardVersionCode.V32008N; 079 if ("V3-2009N".equals(codeString)) 080 return V3HL7StandardVersionCode.V32009N; 081 if ("V3-2010N".equals(codeString)) 082 return V3HL7StandardVersionCode.V32010N; 083 if ("V3-2011N".equals(codeString)) 084 return V3HL7StandardVersionCode.V32011N; 085 if ("V3-2012N".equals(codeString)) 086 return V3HL7StandardVersionCode.V32012N; 087 if ("V3PR1".equals(codeString)) 088 return V3HL7StandardVersionCode.V3PR1; 089 if ("V3-2007N".equals(codeString)) 090 return V3HL7StandardVersionCode.V32007N; 091 throw new IllegalArgumentException("Unknown V3HL7StandardVersionCode code '" + codeString + "'"); 092 } 093 094 public String toCode(V3HL7StandardVersionCode code) { 095 if (code == V3HL7StandardVersionCode.NULL) 096 return null; 097 if (code == V3HL7StandardVersionCode.BALLOT2008JAN) 098 return "Ballot2008Jan"; 099 if (code == V3HL7StandardVersionCode.BALLOT2008MAY) 100 return "Ballot2008May"; 101 if (code == V3HL7StandardVersionCode.BALLOT2008SEP) 102 return "Ballot2008Sep"; 103 if (code == V3HL7StandardVersionCode.BALLOT2009JAN) 104 return "Ballot2009Jan"; 105 if (code == V3HL7StandardVersionCode.BALLOT2009MAY) 106 return "Ballot2009May"; 107 if (code == V3HL7StandardVersionCode.BALLOT2009SEP) 108 return "Ballot2009Sep"; 109 if (code == V3HL7StandardVersionCode.BALLOT2010JAN) 110 return "Ballot2010Jan"; 111 if (code == V3HL7StandardVersionCode.BALLOT2010MAY) 112 return "Ballot2010May"; 113 if (code == V3HL7StandardVersionCode.BALLOT2010SEP) 114 return "Ballot2010Sep"; 115 if (code == V3HL7StandardVersionCode.BALLOT2011JAN) 116 return "Ballot2011Jan"; 117 if (code == V3HL7StandardVersionCode.BALLOT2011MAY) 118 return "Ballot2011May"; 119 if (code == V3HL7StandardVersionCode.BALLOT2011SEP) 120 return "Ballot2011Sep"; 121 if (code == V3HL7StandardVersionCode.BALLOT2012JAN) 122 return "Ballot2012Jan"; 123 if (code == V3HL7StandardVersionCode.BALLOT2012MAY) 124 return "Ballot2012May"; 125 if (code == V3HL7StandardVersionCode.BALLOT2012SEP) 126 return "Ballot2012Sep"; 127 if (code == V3HL7StandardVersionCode.V3200312) 128 return "V3-2003-12"; 129 if (code == V3HL7StandardVersionCode.V32005N) 130 return "V3-2005N"; 131 if (code == V3HL7StandardVersionCode.V32006N) 132 return "V3-2006N"; 133 if (code == V3HL7StandardVersionCode.V32008N) 134 return "V3-2008N"; 135 if (code == V3HL7StandardVersionCode.V32009N) 136 return "V3-2009N"; 137 if (code == V3HL7StandardVersionCode.V32010N) 138 return "V3-2010N"; 139 if (code == V3HL7StandardVersionCode.V32011N) 140 return "V3-2011N"; 141 if (code == V3HL7StandardVersionCode.V32012N) 142 return "V3-2012N"; 143 if (code == V3HL7StandardVersionCode.V3PR1) 144 return "V3PR1"; 145 if (code == V3HL7StandardVersionCode.V32007N) 146 return "V3-2007N"; 147 return "?"; 148 } 149 150 public String toSystem(V3HL7StandardVersionCode code) { 151 return code.getSystem(); 152 } 153 154}