ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum Maven / Gradle / Ivy
The newest version!
package ca.uhn.fhir.model.dstu2.valueset;
import ca.uhn.fhir.model.api.*;
import java.util.HashMap;
import java.util.Map;
public enum AllergyIntoleranceCertaintyEnum {
/**
* Display: Unlikely
* Code Value: unlikely
*
* There is a low level of clinical certainty that the reaction was caused by the identified Substance.
*/
UNLIKELY("unlikely", "http://hl7.org/fhir/reaction-event-certainty"),
/**
* Display: Likely
* Code Value: likely
*
* There is a high level of clinical certainty that the reaction was caused by the identified Substance.
*/
LIKELY("likely", "http://hl7.org/fhir/reaction-event-certainty"),
/**
* Display: Confirmed
* Code Value: confirmed
*
* There is a very high level of clinical certainty that the reaction was due to the identified Substance, which may include clinical evidence by testing or rechallenge.
*/
CONFIRMED("confirmed", "http://hl7.org/fhir/reaction-event-certainty"),
;
/**
* Identifier for this Value Set:
*
*/
public static final String VALUESET_IDENTIFIER = "";
/**
* Name for this Value Set:
* AllergyIntoleranceCertainty
*/
public static final String VALUESET_NAME = "AllergyIntoleranceCertainty";
private static Map CODE_TO_ENUM = new HashMap();
private static Map> SYSTEM_TO_CODE_TO_ENUM = new HashMap>();
private final String myCode;
private final String mySystem;
static {
for (AllergyIntoleranceCertaintyEnum next : AllergyIntoleranceCertaintyEnum.values()) {
CODE_TO_ENUM.put(next.getCode(), next);
if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) {
SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap());
}
SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next);
}
}
/**
* Returns the code associated with this enumerated value
*/
public String getCode() {
return myCode;
}
/**
* Returns the code system associated with this enumerated value
*/
public String getSystem() {
return mySystem;
}
/**
* Returns the enumerated value associated with this code
*/
public static AllergyIntoleranceCertaintyEnum forCode(String theCode) {
AllergyIntoleranceCertaintyEnum retVal = CODE_TO_ENUM.get(theCode);
return retVal;
}
/**
* Converts codes to their respective enumerated values
*/
public static final IValueSetEnumBinder VALUESET_BINDER = new IValueSetEnumBinder() {
@Override
public String toCodeString(AllergyIntoleranceCertaintyEnum theEnum) {
return theEnum.getCode();
}
@Override
public String toSystemString(AllergyIntoleranceCertaintyEnum theEnum) {
return theEnum.getSystem();
}
@Override
public AllergyIntoleranceCertaintyEnum fromCodeString(String theCodeString) {
return CODE_TO_ENUM.get(theCodeString);
}
@Override
public AllergyIntoleranceCertaintyEnum fromCodeString(String theCodeString, String theSystemString) {
Map map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
if (map == null) {
return null;
}
return map.get(theCodeString);
}
};
/**
* Constructor
*/
AllergyIntoleranceCertaintyEnum(String theCode, String theSystem) {
myCode = theCode;
mySystem = theSystem;
}
}