001 002package ca.uhn.fhir.model.dstu2.valueset; 003 004import ca.uhn.fhir.model.api.*; 005import java.util.HashMap; 006import java.util.Map; 007 008public enum TextureModifiedFoodTypeCodesEnum { 009 010 /** 011 * Code Value: <b>255620007</b> 012 */ 013 _255620007("255620007", "http://snomed.info/sct"), 014 015 /** 016 * Code Value: <b>28647000</b> 017 */ 018 _28647000("28647000", "http://snomed.info/sct"), 019 020 /** 021 * Code Value: <b>22836000</b> 022 */ 023 _22836000("22836000", "http://snomed.info/sct"), 024 025 /** 026 * Code Value: <b>72511004</b> 027 */ 028 _72511004("72511004", "http://snomed.info/sct"), 029 030 /** 031 * Code Value: <b>226760005</b> 032 */ 033 _226760005("226760005", "http://snomed.info/sct"), 034 035 /** 036 * Code Value: <b>226887002</b> 037 */ 038 _226887002("226887002", "http://snomed.info/sct"), 039 040 /** 041 * Code Value: <b>102263004</b> 042 */ 043 _102263004("102263004", "http://snomed.info/sct"), 044 045 /** 046 * Code Value: <b>74242007</b> 047 */ 048 _74242007("74242007", "http://snomed.info/sct"), 049 050 /** 051 * Code Value: <b>227415002</b> 052 */ 053 _227415002("227415002", "http://snomed.info/sct"), 054 055 /** 056 * Code Value: <b>264331002</b> 057 */ 058 _264331002("264331002", "http://snomed.info/sct"), 059 060 /** 061 * Code Value: <b>227518002</b> 062 */ 063 _227518002("227518002", "http://snomed.info/sct"), 064 065 /** 066 * Code Value: <b>44027008</b> 067 */ 068 _44027008("44027008", "http://snomed.info/sct"), 069 070 /** 071 * Code Value: <b>226529007</b> 072 */ 073 _226529007("226529007", "http://snomed.info/sct"), 074 075 /** 076 * Code Value: <b>227210005</b> 077 */ 078 _227210005("227210005", "http://snomed.info/sct"), 079 080 ; 081 082 /** 083 * Identifier for this Value Set: 084 * 085 */ 086 public static final String VALUESET_IDENTIFIER = ""; 087 088 /** 089 * Name for this Value Set: 090 * Texture Modified Food Type Codes 091 */ 092 public static final String VALUESET_NAME = "Texture Modified Food Type Codes"; 093 094 private static Map<String, TextureModifiedFoodTypeCodesEnum> CODE_TO_ENUM = new HashMap<String, TextureModifiedFoodTypeCodesEnum>(); 095 private static Map<String, Map<String, TextureModifiedFoodTypeCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, TextureModifiedFoodTypeCodesEnum>>(); 096 097 private final String myCode; 098 private final String mySystem; 099 100 static { 101 for (TextureModifiedFoodTypeCodesEnum next : TextureModifiedFoodTypeCodesEnum.values()) { 102 CODE_TO_ENUM.put(next.getCode(), next); 103 104 if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) { 105 SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, TextureModifiedFoodTypeCodesEnum>()); 106 } 107 SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next); 108 } 109 } 110 111 /** 112 * Returns the code associated with this enumerated value 113 */ 114 public String getCode() { 115 return myCode; 116 } 117 118 /** 119 * Returns the code system associated with this enumerated value 120 */ 121 public String getSystem() { 122 return mySystem; 123 } 124 125 /** 126 * Returns the enumerated value associated with this code 127 */ 128 public static TextureModifiedFoodTypeCodesEnum forCode(String theCode) { 129 TextureModifiedFoodTypeCodesEnum retVal = CODE_TO_ENUM.get(theCode); 130 return retVal; 131 } 132 133 /** 134 * Converts codes to their respective enumerated values 135 */ 136 public static final IValueSetEnumBinder<TextureModifiedFoodTypeCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<TextureModifiedFoodTypeCodesEnum>() { 137 @Override 138 public String toCodeString(TextureModifiedFoodTypeCodesEnum theEnum) { 139 return theEnum.getCode(); 140 } 141 142 @Override 143 public String toSystemString(TextureModifiedFoodTypeCodesEnum theEnum) { 144 return theEnum.getSystem(); 145 } 146 147 @Override 148 public TextureModifiedFoodTypeCodesEnum fromCodeString(String theCodeString) { 149 return CODE_TO_ENUM.get(theCodeString); 150 } 151 152 @Override 153 public TextureModifiedFoodTypeCodesEnum fromCodeString(String theCodeString, String theSystemString) { 154 Map<String, TextureModifiedFoodTypeCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString); 155 if (map == null) { 156 return null; 157 } 158 return map.get(theCodeString); 159 } 160 161 }; 162 163 /** 164 * Constructor 165 */ 166 TextureModifiedFoodTypeCodesEnum(String theCode, String theSystem) { 167 myCode = theCode; 168 mySystem = theSystem; 169 } 170 171 172}