/*******************************************************************************
 *  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.cm.EnumCM_BreastBiopsyTechniques;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_BreastImagingProcedureModifiers;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_BreastImplantTypes;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_UltrasoundImageModes;
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 ProcedureModifiersForBreast - CID6058
 */
public class ProcedureModifiersForBreast_CID6058 
{
	
	/**
	 * The Code Value for template.
	 */
	private String strCodeValue = null;

	/**
	 * The Code Meaning for template.
	 */
	private String strCodeMeaning = null;

	/**
	 * The Coding Scheme Designator for template.
	 */
	private String strCodingSchemeDesignator;
	
	/**
	 * Object of BreastImplantTypes_CID6059
	 */
	private BreastImplantTypes_CID6059 objBreastImplantTypesCID6059;
	
	/**
	 * Object of BreastBiopsyTechniques_CID6060
	 */
	private BreastBiopsyTechniques_CID6060 objBreastBiopsyTechniquesCID6060;
	
	private UltrasoundImageModes_CID12224 objUltrasoundImageModes_CID12224;
	
	/**
	 * Object of BreastImagingProcedureModifiers_CID6061
	 */
	private BreastImagingProcedureModifiers_CID6061 objBreastImagingProcedureModifiersCID6061;
	
	/**
	 * Retrieves the value for Code Meaning.
	 * @return String value for Code Meaning.
	 */
	public String getCodeMeaning()
	{
		return strCodeMeaning;
	}

	/**
	 * Retrieves the value for Code Value.
	 * @return String value for Code Value.
	 */
	public String getCodeValue() 
	{
		return strCodeValue;
	}
	/**
	 * Retrieves the value for SNOMED-CT ID.
	 * @return String value for SNOMED-CT ID.
	 */
	public String getSNOMEDCTID() 
	{
		return strSNOMEDCTID;
	}/**
	 * The SNOMED CT ID for template.
	 */
	private String strSNOMEDCTID = null;
	/**
	 * Retrieves the value for Coding Scheme Designator.
	 * @return String value for Coding Scheme Designator.
	 */
	public String getCodingSchemeDesignator() 
	{
		return strCodingSchemeDesignator;
	}

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

	}

	/**
	 * Sets the value for ProcedureModifiersForBreast
	 * @param enumValue This value can be one of the three Enum - EnumCM_BreastImplantTypes, EnumBreastBiopsyTechniques
	 * EnumCM_BreastImagingProcedureModifiers.
	 */
	public void setProcedureModifiersForBreast(Enum enumValue)
	{
		if(enumValue instanceof EnumCM_BreastImplantTypes)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_BreastImplantTypes new_enumBreastImplantTypes = (EnumCM_BreastImplantTypes) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objBreastImplantTypesCID6059)
	this.objBreastImplantTypesCID6059 = new BreastImplantTypes_CID6059();
			this.objBreastImplantTypesCID6059.setBreastImplantTypes(new_enumBreastImplantTypes);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objBreastImplantTypesCID6059.getCodeMeaning();
			this.strCodeValue = objBreastImplantTypesCID6059.getCodeValue();
			this.strCodingSchemeDesignator = objBreastImplantTypesCID6059.getCodingSchemeDesignator();
			this.strSNOMEDCTID = objBreastImplantTypesCID6059.getSNOMEDCTID();
		}
		else if(enumValue instanceof EnumCM_BreastBiopsyTechniques)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_BreastBiopsyTechniques new_enumBreastBiopsyTechniques = (EnumCM_BreastBiopsyTechniques) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objBreastBiopsyTechniquesCID6060)
	this.objBreastBiopsyTechniquesCID6060 = new BreastBiopsyTechniques_CID6060();
			this.objBreastBiopsyTechniquesCID6060.setBreastBiopsyTechniques(new_enumBreastBiopsyTechniques);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objBreastBiopsyTechniquesCID6060.getCodeMeaning();
			this.strCodeValue = objBreastBiopsyTechniquesCID6060.getCodeValue();
			this.strCodingSchemeDesignator = objBreastBiopsyTechniquesCID6060.getCodingSchemeDesignator();
			this.strSNOMEDCTID = objBreastBiopsyTechniquesCID6060.getSNOMEDCTID();
		}
		else if(enumValue instanceof EnumCM_BreastImagingProcedureModifiers)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_BreastImagingProcedureModifiers new_enumBreastImagingProcedureModifiers = (EnumCM_BreastImagingProcedureModifiers) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objBreastImagingProcedureModifiersCID6061)
	this.objBreastImagingProcedureModifiersCID6061 = new BreastImagingProcedureModifiers_CID6061();
			this.objBreastImagingProcedureModifiersCID6061.setBreastImagingProcedureModifiers(new_enumBreastImagingProcedureModifiers);
			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objBreastImagingProcedureModifiersCID6061.getCodeMeaning();
			this.strCodeValue = objBreastImagingProcedureModifiersCID6061.getCodeValue();
			this.strCodingSchemeDesignator = objBreastImagingProcedureModifiersCID6061.getCodingSchemeDesignator();
			this.strSNOMEDCTID = objBreastImagingProcedureModifiersCID6061.getSNOMEDCTID();
		}
		else if(enumValue instanceof EnumCM_UltrasoundImageModes)
		{
			/**
			 * Casting EnumValue to required Enum.
			 */
			EnumCM_UltrasoundImageModes new_enumBreastImagingProcedureModifiers = (EnumCM_UltrasoundImageModes) enumValue;
			
			/**
			 * Creating object of require CID with respect to enum and setting value accordingly.
			 */
			if(null== this.objUltrasoundImageModes_CID12224)
	this.objUltrasoundImageModes_CID12224 = new UltrasoundImageModes_CID12224();
			this.objUltrasoundImageModes_CID12224.setUltrasoundImageModes(new_enumBreastImagingProcedureModifiers);			
			/**
			 * Retrieving attributes and setting it to member variables. 
			 */
			this.strCodeMeaning = objUltrasoundImageModes_CID12224.getCodeMeaning();
			this.strCodeValue = objUltrasoundImageModes_CID12224.getCodeValue();
			this.strCodingSchemeDesignator = objUltrasoundImageModes_CID12224.getCodingSchemeDesignator();
			this.strSNOMEDCTID = objUltrasoundImageModes_CID12224.getSNOMEDCTID();
		}
		else
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger objDicomLogger = DicomLogger.getLogger();
				objDicomLogger.log(ResourceBundleWrapper.getValue("warning","InvalidEnumeratedValue",new Locale(DicomConfig.createInstance().getLocale())));
			}
		}
	}
}
