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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034 035import org.hl7.fhir.r4.model.EnumFactory; 036 037public class ServiceUsclsEnumFactory implements EnumFactory<ServiceUscls> { 038 039 public ServiceUscls fromCode(String codeString) throws IllegalArgumentException { 040 if (codeString == null || "".equals(codeString)) 041 return null; 042 if ("1101".equals(codeString)) 043 return ServiceUscls._1101; 044 if ("1102".equals(codeString)) 045 return ServiceUscls._1102; 046 if ("1103".equals(codeString)) 047 return ServiceUscls._1103; 048 if ("1201".equals(codeString)) 049 return ServiceUscls._1201; 050 if ("1205".equals(codeString)) 051 return ServiceUscls._1205; 052 if ("2101".equals(codeString)) 053 return ServiceUscls._2101; 054 if ("2102".equals(codeString)) 055 return ServiceUscls._2102; 056 if ("2141".equals(codeString)) 057 return ServiceUscls._2141; 058 if ("2601".equals(codeString)) 059 return ServiceUscls._2601; 060 if ("11101".equals(codeString)) 061 return ServiceUscls._11101; 062 if ("11102".equals(codeString)) 063 return ServiceUscls._11102; 064 if ("11103".equals(codeString)) 065 return ServiceUscls._11103; 066 if ("11104".equals(codeString)) 067 return ServiceUscls._11104; 068 if ("21211".equals(codeString)) 069 return ServiceUscls._21211; 070 if ("21212".equals(codeString)) 071 return ServiceUscls._21212; 072 if ("27211".equals(codeString)) 073 return ServiceUscls._27211; 074 if ("67211".equals(codeString)) 075 return ServiceUscls._67211; 076 if ("99111".equals(codeString)) 077 return ServiceUscls._99111; 078 if ("99333".equals(codeString)) 079 return ServiceUscls._99333; 080 if ("99555".equals(codeString)) 081 return ServiceUscls._99555; 082 throw new IllegalArgumentException("Unknown ServiceUscls code '"+codeString+"'"); 083 } 084 085 public String toCode(ServiceUscls code) { 086 if (code == ServiceUscls._1101) 087 return "1101"; 088 if (code == ServiceUscls._1102) 089 return "1102"; 090 if (code == ServiceUscls._1103) 091 return "1103"; 092 if (code == ServiceUscls._1201) 093 return "1201"; 094 if (code == ServiceUscls._1205) 095 return "1205"; 096 if (code == ServiceUscls._2101) 097 return "2101"; 098 if (code == ServiceUscls._2102) 099 return "2102"; 100 if (code == ServiceUscls._2141) 101 return "2141"; 102 if (code == ServiceUscls._2601) 103 return "2601"; 104 if (code == ServiceUscls._11101) 105 return "11101"; 106 if (code == ServiceUscls._11102) 107 return "11102"; 108 if (code == ServiceUscls._11103) 109 return "11103"; 110 if (code == ServiceUscls._11104) 111 return "11104"; 112 if (code == ServiceUscls._21211) 113 return "21211"; 114 if (code == ServiceUscls._21212) 115 return "21212"; 116 if (code == ServiceUscls._27211) 117 return "27211"; 118 if (code == ServiceUscls._67211) 119 return "67211"; 120 if (code == ServiceUscls._99111) 121 return "99111"; 122 if (code == ServiceUscls._99333) 123 return "99333"; 124 if (code == ServiceUscls._99555) 125 return "99555"; 126 return "?"; 127 } 128 129 public String toSystem(ServiceUscls code) { 130 return code.getSystem(); 131 } 132 133} 134