/*******************************************************************************
 *  Copyright 2017-2018 Centre for Development of Advanced Computing(C-DAC), Pune
 *  
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *  
 *   http://www.apache.org/licenses/LICENSE-2.0
 *  
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package cdac.medinfo.sdk.dcm30_04.templates.cid;


import java.util.Locale;

import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_BloodVelocityMeasurementsByUltrasound;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacOutputProperties;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_EchocardiographyCommonMeasurements;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OrificeFlowProperties;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OtherVascularProperties;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_VascularIndicesAndRatios;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConfig;
import cdac.medinfo.sdk.dcm30_04.utils.DicomLogger;
import cdac.medinfo.sdk.dcm30_04.utils.ResourceBundleWrapper;


/**
 * This class represents VascularUltrasoundProperty - CID12119
 */
public class VascularUltrasoundProperty_CID12119 
{
	
	/**
	 * The Code Value for template.
	 */
	private String strCodeValue = null;

	/**
	 * The Code Meaning for template.
	 */
	private String strCodeMeaning = null;
	/**
	 * The SNOMED CT ID for template.
	 */
	private String strSNOMEDCTID = null;
	/**
	 * Object of BloodVelocityMeasurementsByUltrasound_CID12120
	 */
	private BloodVelocityMeasurementsByUltrasound_CID12120 objBloodVelocityMeasurementsByUltrasoundCID12120;
	/**
	 * Object of VascularIndicesAndRatios_CID12121
	 */
	private VascularIndicesAndRatios_CID12121 objVascularIndicesAndRatiosCID12121;
	/**
	 * Object of OtherVascularProperties_CID12122
	 */
	private OtherVascularProperties_CID12122 objOtherVascularPropertiesCID12122;

	/**
	 * The Coding Scheme Designator for template.
	 */
	private String strCodingSchemeDesignator;

	/**
	 * Instantiates a new VascularUltrasoundProperty_CID12119 Template 
	 */
	public VascularUltrasoundProperty_CID12119()
	{

	}

	/**
	 * Retrieves the value for Code Meaning.
	 * @return String value for Code Meaning.
	 */
	public String getCodeMeaning()
	{
		return strCodeMeaning;
	}
	/**
	 * Retrieves the value for SNOMED-CT ID.
	 * @return String value for SNOMED-CT ID.
	 */
	public String getSNOMEDCTID() 
	{
		return strSNOMEDCTID;
	}	
	/**
	 * Retrieves the value for Code Value.
	 * @return String value for Code Value.
	 */
	public String getCodeValue() 
	{
		return strCodeValue;
	}

	/**
	 * Retrieves the value for Coding Scheme Designator.
	 * @return String value for Coding Scheme Designator.
	 */
	public String getCodingSchemeDesignator() 
	{
		return strCodingSchemeDesignator;
	}

	/**
	 * Sets the value for VascularUltrasoundProperty
	 * @param enumVascularUltrasoundProperty Object of EnumCM_VascularUltrasoundProperty.
	 */
	public void setVascularUltrasoundProperty(Enum enumValue)
	{
		if(enumValue instanceof EnumCM_BloodVelocityMeasurementsByUltrasound)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_BloodVelocityMeasurementsByUltrasound new_enumBloodVelocityMeasurementsByUltrasound = (EnumCM_BloodVelocityMeasurementsByUltrasound) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objBloodVelocityMeasurementsByUltrasoundCID12120)
			this.objBloodVelocityMeasurementsByUltrasoundCID12120 = new BloodVelocityMeasurementsByUltrasound_CID12120();
			this.objBloodVelocityMeasurementsByUltrasoundCID12120.setBloodVelocityMeasurementsByUltrasound(new_enumBloodVelocityMeasurementsByUltrasound);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objBloodVelocityMeasurementsByUltrasoundCID12120.getCodeMeaning();
			this.strCodeValue = objBloodVelocityMeasurementsByUltrasoundCID12120.getCodeValue();
			this.strCodingSchemeDesignator = objBloodVelocityMeasurementsByUltrasoundCID12120.getCodingSchemeDesignator();
			
		}
		 else if(enumValue instanceof EnumCM_VascularIndicesAndRatios)
			{
				/**
				 * Casting EnumValue to required Enum.
				 */
			 EnumCM_VascularIndicesAndRatios new_enumVascularIndicesAndRatios = (EnumCM_VascularIndicesAndRatios) enumValue;
				
				/**
				 * Creating object of require CID with respect to enum and setting value accordingly.
				 */
				if(null== this.objVascularIndicesAndRatiosCID12121)
				this.objVascularIndicesAndRatiosCID12121 = new VascularIndicesAndRatios_CID12121();
				this.objVascularIndicesAndRatiosCID12121.setVascularIndicesAndRatios(new_enumVascularIndicesAndRatios);
				
				/**
				 * Retrieving attributes and setting it to member variables. 
				 */
				this.strCodeMeaning = objVascularIndicesAndRatiosCID12121.getCodeMeaning();
				this.strCodeValue = objVascularIndicesAndRatiosCID12121.getCodeValue();
				this.strCodingSchemeDesignator = objVascularIndicesAndRatiosCID12121.getCodingSchemeDesignator();
				this.strSNOMEDCTID = objVascularIndicesAndRatiosCID12121.getSNOMEDCTID();
			}
		 else if(enumValue instanceof EnumCM_OtherVascularProperties)
			{
				/**
				 * Casting EnumValue to required Enum.
				 */
			 EnumCM_OtherVascularProperties new_enumOtherVascularProperties = (EnumCM_OtherVascularProperties) enumValue;
				
				/**
				 * Creating object of require CID with respect to enum and setting value accordingly.
				 */
				if(null== this.objOtherVascularPropertiesCID12122)
				this.objOtherVascularPropertiesCID12122 = new OtherVascularProperties_CID12122();
				this.objOtherVascularPropertiesCID12122.setOtherVascularProperties(new_enumOtherVascularProperties);
				
				/**
				 * Retrieving attributes and setting it to member variables. 
				 */
				this.strCodeMeaning = objOtherVascularPropertiesCID12122.getCodeMeaning();
				this.strCodeValue = objOtherVascularPropertiesCID12122.getCodeValue();
				this.strCodingSchemeDesignator = objOtherVascularPropertiesCID12122.getCodingSchemeDesignator();
				this.strSNOMEDCTID = objOtherVascularPropertiesCID12122.getSNOMEDCTID();
			}
				 
		else
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger objDicomLogger = DicomLogger.getLogger();
				objDicomLogger.log(ResourceBundleWrapper.getValue("warning","InvalidEnumeratedValue",new Locale(DicomConfig.createInstance().getLocale())));
			}
		}
	}
}
