All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.uhn.fhir.model.dstu.valueset.MessageEventEnum Maven / Gradle / Ivy

There is a newer version: 7.6.1
Show newest version

package ca.uhn.fhir.model.dstu.valueset;

import ca.uhn.fhir.model.api.*;
import java.util.HashMap;
import java.util.Map;

public enum MessageEventEnum {

	/**
	 * 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"),
	
	/**
	 * 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"),
	
	/**
	 * 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"),
	
	/**
	 * Code Value: MedicationAdministration-Update
	 *
	 * Update a Medication Administration record.
	 */
	MEDICATIONADMINISTRATION_UPDATE("MedicationAdministration-Update", "http://hl7.org/fhir/message-events"),
	
	/**
	 * Code Value: admin-notify
	 *
	 * Notification that a patient or other administrative resource as been created or updated.
	 */
	ADMIN_NOTIFY("admin-notify", "http://hl7.org/fhir/message-events"),
	
	/**
	 * 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"),
	
	/**
	 * 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"),
	
	/**
	 * Code Value: patient-link
	 *
	 * Notification that two patient records actually identify the same patient.
	 */
	PATIENT_LINK("patient-link", "http://hl7.org/fhir/message-events"),
	
	/**
	 * 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"),
	
	/**
	 * Code Value: query
	 *
	 * Request to perform a query according to the attached query resource.
	 */
	QUERY("query", "http://hl7.org/fhir/message-events"),
	
	/**
	 * Code Value: query-response
	 *
	 * Response with the result of processing the query.
	 */
	QUERY_RESPONSE("query-response", "http://hl7.org/fhir/message-events"),
	
	;
	
	/**
	 * Identifier for this Value Set:
	 * http://hl7.org/fhir/vs/message-events
	 */
	public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/message-events";

	/**
	 * 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;
	}

	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy