ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum 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 EncounterClassEnum {
/**
* Display: Inpatient
* Code Value: inpatient
*
* An encounter during which the patient is hospitalized and stays overnight.
*/
INPATIENT("inpatient", "http://hl7.org/fhir/encounter-class"),
/**
* Display: Outpatient
* Code Value: outpatient
*
* An encounter during which the patient is not hospitalized overnight.
*/
OUTPATIENT("outpatient", "http://hl7.org/fhir/encounter-class"),
/**
* Display: Ambulatory
* Code Value: ambulatory
*
* An encounter where the patient visits the practitioner in his/her office, e.g. a G.P. visit.
*/
AMBULATORY("ambulatory", "http://hl7.org/fhir/encounter-class"),
/**
* Display: Emergency
* Code Value: emergency
*
* An encounter in the Emergency Care Department.
*/
EMERGENCY("emergency", "http://hl7.org/fhir/encounter-class"),
/**
* Display: Home
* Code Value: home
*
* An encounter where the practitioner visits the patient at his/her home.
*/
HOME("home", "http://hl7.org/fhir/encounter-class"),
/**
* Display: Field
* Code Value: field
*
* An encounter taking place outside the regular environment for giving care.
*/
FIELD("field", "http://hl7.org/fhir/encounter-class"),
/**
* Display: Daytime
* Code Value: daytime
*
* An encounter where the patient needs more prolonged treatment or investigations than outpatients, but who do not need to stay in the hospital overnight.
*/
DAYTIME("daytime", "http://hl7.org/fhir/encounter-class"),
/**
* Display: Virtual
* Code Value: virtual
*
* An encounter that takes place where the patient and practitioner do not physically meet but use electronic means for contact.
*/
VIRTUAL("virtual", "http://hl7.org/fhir/encounter-class"),
/**
* Display: Other
* Code Value: other
*
* Any other encounter type that is not described by one of the other values. Where this is used it is expected that an implementer will include an extension value to define what the actual other type is.
*/
OTHER("other", "http://hl7.org/fhir/encounter-class"),
;
/**
* Identifier for this Value Set:
*
*/
public static final String VALUESET_IDENTIFIER = "";
/**
* Name for this Value Set:
* EncounterClass
*/
public static final String VALUESET_NAME = "EncounterClass";
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 (EncounterClassEnum next : EncounterClassEnum.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 EncounterClassEnum forCode(String theCode) {
EncounterClassEnum 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(EncounterClassEnum theEnum) {
return theEnum.getCode();
}
@Override
public String toSystemString(EncounterClassEnum theEnum) {
return theEnum.getSystem();
}
@Override
public EncounterClassEnum fromCodeString(String theCodeString) {
return CODE_TO_ENUM.get(theCodeString);
}
@Override
public EncounterClassEnum fromCodeString(String theCodeString, String theSystemString) {
Map map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
if (map == null) {
return null;
}
return map.get(theCodeString);
}
};
/**
* Constructor
*/
EncounterClassEnum(String theCode, String theSystem) {
myCode = theCode;
mySystem = theSystem;
}
}