/*******************************************************************************
 *  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 cdac.medinfo.sdk.dcm30_04.templates.dicomsnomedmap.EnumDICOMSNOMEDMap;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_NonLesionObjectType;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_NonLesionObjectType;


/**
 * This class represents NonLesionObjectType - CID6040
 */
public class NonLesionObjectType_CID6040 
{
	
	/**
	 * 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;
	/**
	 * The SNOMED CT ID for template.
	 */
	private String strSNOMEDCTID = null;
	
	/**
	 * Instantiates a new NonLesionObjectType_CID6040 Template 
	 */
	public NonLesionObjectType_CID6040()
	{

	}

	/**
	 * 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 Coding Scheme Designator.
	 * @return String value for Coding Scheme Designator.
	 */
	public String getCodingSchemeDesignator() 
	{
		return strCodingSchemeDesignator;
	}
	/**
	 * Retrieves the value for SNOMED-CT ID.
	 * @return String value for SNOMED-CT ID.
	 */
	public String getSNOMEDCTID() 
	{
		return strSNOMEDCTID;
	}
	
	/**
	 * Sets the Code Value according to Code Meaning.
	 * @param enumNonLesionObjectType Object of EnumCM_NonLesionObjectType represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_NonLesionObjectType enumNonLesionObjectType)
	{
		switch(enumNonLesionObjectType)
		{
		case BB_SHOT_LEAD_PELLET: this.strCodeValue =EnumCV_NonLesionObjectType.BB_SHOT_LEAD_PELLET_A_32475.getValue(); break;
		case BULLET: this.strCodeValue =EnumCV_NonLesionObjectType.BULLET_A_32110.getValue(); break;
		case CARDIAC_PACEMAKER: this.strCodeValue =EnumCV_NonLesionObjectType.CARDIAC_PACEMAKER_A_11101.getValue(); break;
		case CATHETER: this.strCodeValue =EnumCV_NonLesionObjectType.CATHETER_A_26800.getValue(); break;
		case CLIP: this.strCodeValue =EnumCV_NonLesionObjectType.CLIP_A_12062.getValue(); break;
		case COLLIMATOR: this.strCodeValue =EnumCV_NonLesionObjectType.COLLIMATOR_A_10044.getValue(); break;
		case COMPRESSION_PADDLE: this.strCodeValue =EnumCV_NonLesionObjectType.COMPRESSION_PADDLE_A_10042.getValue(); break;
		case CONTRAST_AGENT: this.strCodeValue =EnumCV_NonLesionObjectType.CONTRAST_AGENT_C_B0300.getValue(); break;
		case ID_PLATE: this.strCodeValue =EnumCV_NonLesionObjectType.ID_PLATE_A_16016.getValue(); break;
		case IMPLANT: this.strCodeValue =EnumCV_NonLesionObjectType.IMPLANT_A_04010.getValue(); break;
		case J_WIRE: this.strCodeValue =EnumCV_NonLesionObjectType.J_WIRE_A_1016B.getValue(); break;
		case OPAQUE_MARKER: this.strCodeValue =EnumCV_NonLesionObjectType.OPAQUE_MARKER_A_00D7B.getValue(); break;
		case OTHER_MARKER: this.strCodeValue =EnumCV_NonLesionObjectType.OTHER_MARKER_111175.getValue(); break;
		case SCAR_TISSUE: this.strCodeValue =EnumCV_NonLesionObjectType.SCAR_TISSUE_M_78060.getValue(); break;
		case STAPLE: this.strCodeValue =EnumCV_NonLesionObjectType.STAPLE_A_13600.getValue(); break;
		case SUTURE_MATERIAL: this.strCodeValue =EnumCV_NonLesionObjectType.SUTURE_MATERIAL_A_13510.getValue(); break;
		case UNSPECIFIED: this.strCodeValue =EnumCV_NonLesionObjectType.UNSPECIFIED_111176.getValue(); break;
		}
	}
	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumNon-lesionObjectType Object of EnumCM_Non-lesionObjectType represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_NonLesionObjectType enumNonLesionObjectType)
	{
		switch(enumNonLesionObjectType)
		{
		case BB_SHOT_LEAD_PELLET : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.BB_SHOT_LEAD_PELLET.getSNOMEDCTID(); break;
		case BULLET : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.BULLET.getSNOMEDCTID(); break;
		case CARDIAC_PACEMAKER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.CARDIAC_PACEMAKER.getSNOMEDCTID(); break;
		case CATHETER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.CATHETER.getSNOMEDCTID(); break;
		case CLIP : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.CLIP.getSNOMEDCTID(); break;
		case COLLIMATOR : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.COLLIMATOR.getSNOMEDCTID(); break;
		case COMPRESSION_PADDLE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.COMPRESSION_PADDLE.getSNOMEDCTID(); break;
		case CONTRAST_AGENT : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.CONTRAST_AGENT.getSNOMEDCTID(); break;
		case ID_PLATE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.ID_PLATE.getSNOMEDCTID(); break;
		case IMPLANT : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.IMPLANT.getSNOMEDCTID(); break;
		case J_WIRE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.J_WIRE.getSNOMEDCTID(); break;
		case OPAQUE_MARKER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.OPAQUE_MARKER.getSNOMEDCTID(); break;
		case SCAR_TISSUE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.SCAR_TISSUE.getSNOMEDCTID(); break;
		case STAPLE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.STAPLE.getSNOMEDCTID(); break;
		case SUTURE_MATERIAL : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.SUTURE_MATERIAL.getSNOMEDCTID(); break;
		}
	}

	/**
	 * Sets the value for NonLesionObjectType
	 * @param enumNonLesionObjectType Object of EnumCM_NonLesionObjectType.
	 */
	public void setNonLesionObjectType(EnumCM_NonLesionObjectType enumNonLesionObjectType)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumNonLesionObjectType.getValue();
		if(strCodeMeaning.equalsIgnoreCase(EnumCM_NonLesionObjectType.OTHER_MARKER.getValue())
				|| strCodeMeaning.equalsIgnoreCase(EnumCM_NonLesionObjectType.UNSPECIFIED.getValue()))
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		else
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		
		/**
		 * set code Value
		 */
		setCodeValue(enumNonLesionObjectType);
		/**
		 * set SNOMED-CT ID
		 */
		setSNOMEDCTID(enumNonLesionObjectType);
	}
}
