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


/**
 * This class represents MeasurementType - CID3627
 */
public class MeasurementType_CID3627 
{
	
	/**
	 * The Code Value for template.
	 */
	private String strCodeValue = null;
	/**
	 * The SNOMED CT ID for template.
	 */
	private String strSNOMEDCTID = null;
	
	/**
	 * The Code Meaning for template.
	 */
	private String strCodeMeaning = null;

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

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

	}

	/**
	 * 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 Code Value according to Code Meaning.
	 * @param enumMeasurementType Object of EnumCM_MeasurementType represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_MeasurementType enumMeasurementType)
	{
		switch(enumMeasurementType)
		{
		case BEST_VALUE: this.strCodeValue =EnumCV_MeasurementType.BEST_VALUE_R_002E1.getValue(); break;
		case MEAN: this.strCodeValue =EnumCV_MeasurementType.MEAN_R_00317.getValue(); break;
		case MEDIAN: this.strCodeValue =EnumCV_MeasurementType.MEDIAN_R_00319.getValue(); break;
		case MODE: this.strCodeValue =EnumCV_MeasurementType.MODE_R_0032E.getValue(); break;
		case POINT_SOURCE_MEASUREMENT: this.strCodeValue =EnumCV_MeasurementType.POINT_SOURCE_MEASUREMENT_R_00355.getValue(); break;
		case PEAK_TO_PEAK: this.strCodeValue =EnumCV_MeasurementType.PEAK_TO_PEAK_R_00353.getValue(); break;
		case VISUAL_ESTIMATION: this.strCodeValue =EnumCV_MeasurementType.VISUAL_ESTIMATION_R_41D27.getValue(); break;
		case ESTIMATED: this.strCodeValue =EnumCV_MeasurementType.ESTIMATED_R_10260.getValue(); break;
		case CALCULATED: this.strCodeValue =EnumCV_MeasurementType.CALCULATED_R_41D2D.getValue(); break;
		case MEASURED: this.strCodeValue =EnumCV_MeasurementType.MEASURED_R_41D41.getValue(); break;
		}
	}
	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumMeasurementType Object of EnumCM_MeasurementType represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_MeasurementType enumMeasurementType)
	{
		switch(enumMeasurementType)
		{
		case BEST_VALUE : this.strSNOMEDCTID =EnumRadiologySNOMEDMap.BEST_VALUE.getSNOMEDCTID(); break;
		case MEAN : this.strSNOMEDCTID =EnumRadiologySNOMEDMap.MEAN.getSNOMEDCTID(); break;
		case MEDIAN : this.strSNOMEDCTID =EnumRadiologySNOMEDMap.MEDIAN.getSNOMEDCTID(); break;
		case MODE : this.strSNOMEDCTID =EnumRadiologySNOMEDMap.MODE.getSNOMEDCTID(); break;
		case POINT_SOURCE_MEASUREMENT : this.strSNOMEDCTID =EnumRadiologySNOMEDMap.POINT_SOURCE_MEASUREMENT.getSNOMEDCTID(); break;
		case PEAK_TO_PEAK : this.strSNOMEDCTID =EnumRadiologySNOMEDMap.PEAK_TO_PEAK.getSNOMEDCTID(); break;
		case VISUAL_ESTIMATION : this.strSNOMEDCTID =EnumRadiologySNOMEDMap.VISUAL_ESTIMATION.getSNOMEDCTID(); break;
		case ESTIMATED : this.strSNOMEDCTID =EnumRadiologySNOMEDMap.ESTIMATED.getSNOMEDCTID(); break;
		case CALCULATED : this.strSNOMEDCTID =EnumRadiologySNOMEDMap.CALCULATED.getSNOMEDCTID(); break;
		case MEASURED : this.strSNOMEDCTID =EnumRadiologySNOMEDMap.MEASURED.getSNOMEDCTID(); break;
		}
	}

	/**
	 * Sets the value for MeasurementType
	 * @param enumMeasurementType Object of EnumCM_MeasurementType.
	 */
	public void setMeasurementType(EnumCM_MeasurementType enumMeasurementType)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumMeasurementType.getValue();
		this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		
		/**
		 * set code Value
		 */
		setCodeValue(enumMeasurementType);

		/**
		 * set SNOMED-CT ID
		 */
		setSNOMEDCTID(enumMeasurementType);
	}
}
