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 GoalStartEventEnum { 009 010 /** 011 * Code Value: <b>32485007</b> 012 */ 013 _32485007("32485007", "http://snomed.info/sct"), 014 015 /** 016 * Code Value: <b>308283009</b> 017 */ 018 _308283009("308283009", "http://snomed.info/sct"), 019 020 /** 021 * Code Value: <b>442137000</b> 022 */ 023 _442137000("442137000", "http://snomed.info/sct"), 024 025 /** 026 * Code Value: <b>386216000</b> 027 */ 028 _386216000("386216000", "http://snomed.info/sct"), 029 030 ; 031 032 /** 033 * Identifier for this Value Set: 034 * 035 */ 036 public static final String VALUESET_IDENTIFIER = ""; 037 038 /** 039 * Name for this Value Set: 040 * GoalStartEvent 041 */ 042 public static final String VALUESET_NAME = "GoalStartEvent"; 043 044 private static Map<String, GoalStartEventEnum> CODE_TO_ENUM = new HashMap<String, GoalStartEventEnum>(); 045 private static Map<String, Map<String, GoalStartEventEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, GoalStartEventEnum>>(); 046 047 private final String myCode; 048 private final String mySystem; 049 050 static { 051 for (GoalStartEventEnum next : GoalStartEventEnum.values()) { 052 CODE_TO_ENUM.put(next.getCode(), next); 053 054 if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) { 055 SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, GoalStartEventEnum>()); 056 } 057 SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next); 058 } 059 } 060 061 /** 062 * Returns the code associated with this enumerated value 063 */ 064 public String getCode() { 065 return myCode; 066 } 067 068 /** 069 * Returns the code system associated with this enumerated value 070 */ 071 public String getSystem() { 072 return mySystem; 073 } 074 075 /** 076 * Returns the enumerated value associated with this code 077 */ 078 public static GoalStartEventEnum forCode(String theCode) { 079 GoalStartEventEnum retVal = CODE_TO_ENUM.get(theCode); 080 return retVal; 081 } 082 083 /** 084 * Converts codes to their respective enumerated values 085 */ 086 public static final IValueSetEnumBinder<GoalStartEventEnum> VALUESET_BINDER = new IValueSetEnumBinder<GoalStartEventEnum>() { 087 @Override 088 public String toCodeString(GoalStartEventEnum theEnum) { 089 return theEnum.getCode(); 090 } 091 092 @Override 093 public String toSystemString(GoalStartEventEnum theEnum) { 094 return theEnum.getSystem(); 095 } 096 097 @Override 098 public GoalStartEventEnum fromCodeString(String theCodeString) { 099 return CODE_TO_ENUM.get(theCodeString); 100 } 101 102 @Override 103 public GoalStartEventEnum fromCodeString(String theCodeString, String theSystemString) { 104 Map<String, GoalStartEventEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString); 105 if (map == null) { 106 return null; 107 } 108 return map.get(theCodeString); 109 } 110 111 }; 112 113 /** 114 * Constructor 115 */ 116 GoalStartEventEnum(String theCode, String theSystem) { 117 myCode = theCode; 118 mySystem = theSystem; 119 } 120 121 122}