/*******************************************************************************
 *  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.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CalculatedValue;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_CalculatedValue;


/**
 * This class represents CalculatedValue - CID6142
 */
public class CalculatedValue_CID6142 
{
	
	/**
	 * 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;

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

	}

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

	/**
	 * Sets the Code Value according to Code Meaning.
	 * @param enumCalculatedValue Object of EnumCM_CalculatedValue represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_CalculatedValue enumCalculatedValue)
	{
		switch(enumCalculatedValue)
		{
		case CAVITY_EXTENT_AS_PERCENT_OF_VOLUME: this.strCodeValue =EnumCV_CalculatedValue.CAVITY_EXTENT_AS_PERCENT_OF_VOLUME_112017.getValue(); break;
		case CALCIFICATION_EXTENT_AS_PERCENT_OF_SURFACE: this.strCodeValue =EnumCV_CalculatedValue.CALCIFICATION_EXTENT_AS_PERCENT_OF_SURFACE_112018.getValue(); break;
		case CALCIFICATION_EXTENT_AS_PERCENT_OF_VOLUME: this.strCodeValue =EnumCV_CalculatedValue.CALCIFICATION_EXTENT_AS_PERCENT_OF_VOLUME_112019.getValue(); break;
		case CALCIUM_SCORE: this.strCodeValue =EnumCV_CalculatedValue.CALCIUM_SCORE_112058.getValue(); break;
		case BREAST_TISSUE_DENSITY: this.strCodeValue =EnumCV_CalculatedValue.BREAST_TISSUE_DENSITY_112191.getValue(); break;
		case VOLUME_OF_PARENCHYMAL_TISSUE: this.strCodeValue =EnumCV_CalculatedValue.VOLUME_OF_PARENCHYMAL_TISSUE_112192.getValue(); break;
		case VOLUME_OF_BREAST: this.strCodeValue =EnumCV_CalculatedValue.VOLUME_OF_BREAST_112193.getValue(); break;
		case MASS_OF_PARENCHYMAL_TISSUE: this.strCodeValue =EnumCV_CalculatedValue.MASS_OF_PARENCHYMAL_TISSUE_112194.getValue(); break;
		case MASS_OF_BREAST: this.strCodeValue =EnumCV_CalculatedValue.MASS_OF_BREAST_112195.getValue(); break;
		case AREA_OF_VASCULAR_CALCIFICATION: this.strCodeValue =EnumCV_CalculatedValue.AREA_OF_VASCULAR_CALCIFICATION_112196.getValue(); break;
		case VOLUME_OF_VASCULAR_CALCIFICATION: this.strCodeValue =EnumCV_CalculatedValue.VOLUME_OF_VASCULAR_CALCIFICATION_112197.getValue(); break;
		case PERCENTAGE_OF_VASCULAR_CALCIFICATION: this.strCodeValue =EnumCV_CalculatedValue.PERCENTAGE_OF_VASCULAR_CALCIFICATION_112198.getValue(); break;
		case MASS_OF_VASCULAR_CALCIFICATION: this.strCodeValue =EnumCV_CalculatedValue.MASS_OF_VASCULAR_CALCIFICATION_112199.getValue(); break;
		case AVERAGE_CALCIFICATION_DISTANCE_IN_A_CALCIFICATION_CLUSTER: this.strCodeValue =EnumCV_CalculatedValue.AVERAGE_CALCIFICATION_DISTANCE_IN_A_CALCIFICATION_CLUSTER_112200.getValue(); break;
		case STANDARD_DEVIATION_DISTANCE_OF_CALCIFICATIONS_IN_A_CLUSTER: this.strCodeValue =EnumCV_CalculatedValue.STANDARD_DEVIATION_DISTANCE_OF_CALCIFICATIONS_IN_A_CLUSTER_112201.getValue(); break;
		}
	}

	/**
	 * Sets the value for CalculatedValue
	 * @param enumCalculatedValue Object of EnumCM_CalculatedValue.
	 */
	public void setCalculatedValue(EnumCM_CalculatedValue enumCalculatedValue)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumCalculatedValue.getValue();
		this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * set code Value
		 */
		setCodeValue(enumCalculatedValue);
	}
}
