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

ca.uhn.fhir.model.dstu.valueset.ModalityEnum 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 ModalityEnum {

	/**
	 * Code Value: AR
	 */
	AR("AR", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: AU
	 */
	AU("AU", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: BDUS
	 */
	BDUS("BDUS", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: BI
	 */
	BI("BI", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: BMD
	 */
	BMD("BMD", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: CR
	 */
	CR("CR", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: CT
	 */
	CT("CT", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: DG
	 */
	DG("DG", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: DX
	 */
	DX("DX", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: ECG
	 */
	ECG("ECG", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: EPS
	 */
	EPS("EPS", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: ES
	 */
	ES("ES", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: GM
	 */
	GM("GM", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: HC
	 */
	HC("HC", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: HD
	 */
	HD("HD", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: IO
	 */
	IO("IO", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: IVOCT
	 */
	IVOCT("IVOCT", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: IVUS
	 */
	IVUS("IVUS", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: KER
	 */
	KER("KER", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: KO
	 */
	KO("KO", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: LEN
	 */
	LEN("LEN", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: LS
	 */
	LS("LS", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: MG
	 */
	MG("MG", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: MR
	 */
	MR("MR", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: NM
	 */
	NM("NM", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: OAM
	 */
	OAM("OAM", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: OCT
	 */
	OCT("OCT", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: OP
	 */
	OP("OP", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: OPM
	 */
	OPM("OPM", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: OPT
	 */
	OPT("OPT", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: OPV
	 */
	OPV("OPV", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: OT
	 */
	OT("OT", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: PR
	 */
	PR("PR", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: PT
	 */
	PT("PT", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: PX
	 */
	PX("PX", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: REG
	 */
	REG("REG", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: RF
	 */
	RF("RF", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: RG
	 */
	RG("RG", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: RTDOSE
	 */
	RTDOSE("RTDOSE", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: RTIMAGE
	 */
	RTIMAGE("RTIMAGE", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: RTPLAN
	 */
	RTPLAN("RTPLAN", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: RTRECORD
	 */
	RTRECORD("RTRECORD", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: RTSTRUCT
	 */
	RTSTRUCT("RTSTRUCT", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: SEG
	 */
	SEG("SEG", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: SM
	 */
	SM("SM", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: SMR
	 */
	SMR("SMR", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: SR
	 */
	SR("SR", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: SRF
	 */
	SRF("SRF", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: TG
	 */
	TG("TG", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: US
	 */
	US("US", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: VA
	 */
	VA("VA", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: XA
	 */
	XA("XA", "http://nema.org/dicom/dcid"),
	
	/**
	 * Code Value: XC
	 */
	XC("XC", "http://nema.org/dicom/dcid"),
	
	;
	
	/**
	 * Identifier for this Value Set:
	 * http://hl7.org/fhir/vs/modality
	 */
	public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/modality";

	/**
	 * Name for this Value Set:
	 * Modality
	 */
	public static final String VALUESET_NAME = "Modality";

	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 (ModalityEnum next : ModalityEnum.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 ModalityEnum forCode(String theCode) {
		ModalityEnum 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(ModalityEnum theEnum) {
			return theEnum.getCode();
		}

		@Override
		public String toSystemString(ModalityEnum theEnum) {
			return theEnum.getSystem();
		}
		
		@Override
		public ModalityEnum fromCodeString(String theCodeString) {
			return CODE_TO_ENUM.get(theCodeString);
		}
		
		@Override
		public ModalityEnum fromCodeString(String theCodeString, String theSystemString) {
			Map map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString);
			if (map == null) {
				return null;
			}
			return map.get(theCodeString);
		}
		
	};
	
	/** 
	 * Constructor
	 */
	ModalityEnum(String theCode, String theSystem) {
		myCode = theCode;
		mySystem = theSystem;
	}

	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy