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 FluidConsistencyTypeCodesEnum {
009
010        /**
011         * Code Value: <b>439031000124108</b>
012         */
013        _439031000124108("439031000124108", "http://snomed.info/sct"),
014        
015        /**
016         * Code Value: <b>439021000124105</b>
017         */
018        _439021000124105("439021000124105", "http://snomed.info/sct"),
019        
020        /**
021         * Code Value: <b>439041000124103</b>
022         */
023        _439041000124103("439041000124103", "http://snomed.info/sct"),
024        
025        /**
026         * Code Value: <b>439081000124109</b>
027         */
028        _439081000124109("439081000124109", "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         * Fluid Consistency Type Codes
041         */
042        public static final String VALUESET_NAME = "Fluid Consistency Type Codes";
043
044        private static Map<String, FluidConsistencyTypeCodesEnum> CODE_TO_ENUM = new HashMap<String, FluidConsistencyTypeCodesEnum>();
045        private static Map<String, Map<String, FluidConsistencyTypeCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, FluidConsistencyTypeCodesEnum>>();
046        
047        private final String myCode;
048        private final String mySystem;
049        
050        static {
051                for (FluidConsistencyTypeCodesEnum next : FluidConsistencyTypeCodesEnum.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, FluidConsistencyTypeCodesEnum>());
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 FluidConsistencyTypeCodesEnum forCode(String theCode) {
079                FluidConsistencyTypeCodesEnum 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<FluidConsistencyTypeCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<FluidConsistencyTypeCodesEnum>() {
087                @Override
088                public String toCodeString(FluidConsistencyTypeCodesEnum theEnum) {
089                        return theEnum.getCode();
090                }
091
092                @Override
093                public String toSystemString(FluidConsistencyTypeCodesEnum theEnum) {
094                        return theEnum.getSystem();
095                }
096                
097                @Override
098                public FluidConsistencyTypeCodesEnum fromCodeString(String theCodeString) {
099                        return CODE_TO_ENUM.get(theCodeString);
100                }
101                
102                @Override
103                public FluidConsistencyTypeCodesEnum fromCodeString(String theCodeString, String theSystemString) {
104                        Map<String, FluidConsistencyTypeCodesEnum> 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        FluidConsistencyTypeCodesEnum(String theCode, String theSystem) {
117                myCode = theCode;
118                mySystem = theSystem;
119        }
120
121        
122}