
ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum Maven / Gradle / Ivy
package ca.uhn.fhir.model.dstu.valueset;
import ca.uhn.fhir.model.api.*;
import java.util.HashMap;
import java.util.Map;
public enum EncounterClassEnum {
/**
* Code Value: inpatient
*
* An encounter during which the patient is hospitalized and stays overnight.
*/
INPATIENT("inpatient", "http://hl7.org/fhir/encounter-class"),
/**
* Code Value: outpatient
*
* An encounter during which the patient is not hospitalized overnight.
*/
OUTPATIENT("outpatient", "http://hl7.org/fhir/encounter-class"),
/**
* 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"),
/**
* Code Value: emergency
*
* An encounter where the patient needs urgent care.
*/
EMERGENCY("emergency", "http://hl7.org/fhir/encounter-class"),
/**
* Code Value: home
*
* An encounter where the practitioner visits the patient at his/her home.
*/
HOME("home", "http://hl7.org/fhir/encounter-class"),
/**
* Code Value: field
*
* An encounter taking place outside the regular environment for giving care.
*/
FIELD("field", "http://hl7.org/fhir/encounter-class"),
/**
* 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"),
/**
* 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"),
;
/**
* Identifier for this Value Set:
* http://hl7.org/fhir/vs/encounter-class
*/
public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/encounter-class";
/**
* 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;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy