ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum 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 MessageEventEnum {
/**
* Display: MedicationAdministration-Complete
* Code Value: MedicationAdministration-Complete
*
* Change the status of a Medication Administration to show that it is complete.
*/
MEDICATIONADMINISTRATION_COMPLETE("MedicationAdministration-Complete", "http://hl7.org/fhir/message-events"),
/**
* Display: MedicationAdministration-Nullification
* Code Value: MedicationAdministration-Nullification
*
* Someone wishes to record that the record of administration of a medication is in error and should be ignored.
*/
MEDICATIONADMINISTRATION_NULLIFICATION("MedicationAdministration-Nullification", "http://hl7.org/fhir/message-events"),
/**
* Display: MedicationAdministration-Recording
* Code Value: MedicationAdministration-Recording
*
* Indicates that a medication has been recorded against the patient's record.
*/
MEDICATIONADMINISTRATION_RECORDING("MedicationAdministration-Recording", "http://hl7.org/fhir/message-events"),
/**
* Display: MedicationAdministration-Update
* Code Value: MedicationAdministration-Update
*
* Update a Medication Administration record.
*/
MEDICATIONADMINISTRATION_UPDATE("MedicationAdministration-Update", "http://hl7.org/fhir/message-events"),
/**
* Display: admin-notify
* Code Value: admin-notify
*
* Notification of a change to an administrative resource (either create or update). Note that there is no delete, though some administrative resources have status or period elements for this use.
*/
ADMIN_NOTIFY("admin-notify", "http://hl7.org/fhir/message-events"),
/**
* Display: diagnosticreport-provide
* Code Value: diagnosticreport-provide
*
* Provide a diagnostic report, or update a previously provided diagnostic report.
*/
DIAGNOSTICREPORT_PROVIDE("diagnosticreport-provide", "http://hl7.org/fhir/message-events"),
/**
* Display: observation-provide
* Code Value: observation-provide
*
* Provide a simple observation or update a previously provided simple observation.
*/
OBSERVATION_PROVIDE("observation-provide", "http://hl7.org/fhir/message-events"),
/**
* Display: patient-link
* Code Value: patient-link
*
* Notification that two patient records actually identify the same patient.
*/
PATIENT_LINK("patient-link", "http://hl7.org/fhir/message-events"),
/**
* Display: patient-unlink
* Code Value: patient-unlink
*
* Notification that previous advice that two patient records concern the same patient is now considered incorrect.
*/
PATIENT_UNLINK("patient-unlink", "http://hl7.org/fhir/message-events"),
/**
* Display: valueset-expand
* Code Value: valueset-expand
*
* The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. An expanded value set will be returned, or an error message.
*/
VALUESET_EXPAND("valueset-expand", "http://hl7.org/fhir/message-events"),
;
/**
* Identifier for this Value Set:
*
*/
public static final String VALUESET_IDENTIFIER = "";
/**
* Name for this Value Set:
* MessageEvent
*/
public static final String VALUESET_NAME = "MessageEvent";
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 (MessageEventEnum next : MessageEventEnum.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 MessageEventEnum forCode(String theCode) {
MessageEventEnum 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(MessageEventEnum theEnum) {
return theEnum.getCode();
}
@Override
public String toSystemString(MessageEventEnum theEnum) {
return theEnum.getSystem();
}
@Override
public MessageEventEnum fromCodeString(String theCodeString) {
return CODE_TO_ENUM.get(theCodeString);
}
@Override
public MessageEventEnum fromCodeString(String theCodeString, String theSystemString) {
Map map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
if (map == null) {
return null;
}
return map.get(theCodeString);
}
};
/**
* Constructor
*/
MessageEventEnum(String theCode, String theSystem) {
myCode = theCode;
mySystem = theSystem;
}
}