/*******************************************************************************
 *  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_PopulationStatisticalDescriptors;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_PopulationStatisticalDescriptors;


/**
 * This class represents PopulationStatisticalDescriptors - CID226
 */
public class PopulationStatisticalDescriptors_CID226  
{
	
	/**
	 * 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;
	
	/**
	 * 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;
	}
	
	/**
	 * Instantiates a new PopulationStatisticalDescriptors_CID226 Template 
	 */
	public PopulationStatisticalDescriptors_CID226()
	{
		
	}
	
	/**
	 * Sets the Code Value according to Code Meaning.
	 * @param enumEquipmentEvents Object of EnumEquipmentEvents represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_PopulationStatisticalDescriptors enumPopulationStatisticalDescriptors)
	{
		switch(enumPopulationStatisticalDescriptors) 
		{
		case NINETY_FIFTH_PERCENTILE_VALUE_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.NINETY_FIFTH_PERCENTILE_VALUE_OF_POPULATION_R_00337.getValue(); break;
		case NINETYTH_PERCENTILE_VALUE_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.NINETYTH_PERCENTILE_VALUE_OF_POPULATION_R_00338.getValue(); break;
		case FIRST_SIGMA_UPPER_VALUE_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.FIRST_SIGMA_UPPER_VALUE_OF_POPULATION_R_00346.getValue(); break;
		case SECOND_SIGMA_UPPER_VALUE_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.SECOND_SIGMA_UPPER_VALUE_OF_POPULATION_R_00387.getValue(); break;
		case MEAN_VALUE_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.MEAN_VALUE_OF_POPULATION_R_00317.getValue(); break;
		case MEDIAN_VALUE_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.MEDIAN_VALUE_OF_POPULATION_R_00319.getValue(); break;
		case TENTH_PERCENTILE_VALUE_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.TENTH_PERCENTILE_VALUE_OF_POPULATION_R_00377.getValue(); break;
		case FIFTH_PERCENTILE_VALUE_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.FIFTH_PERCENTILE_VALUE_OF_POPULATION_R_00397.getValue(); break;
		case FIRST_SIGMA_LOWER_VALUE_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.FIRST_SIGMA_LOWER_VALUE_OF_POPULATION_R_00347.getValue(); break;
		case SECOND_SIGMA_LOWER_VALUE_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.SECOND_SIGMA_LOWER_VALUE_OF_POPULATION_R_00388.getValue(); break;
		case STANDARD_DEVIATION_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.STANDARD_DEVIATION_OF_POPULATION_121414.getValue(); break;
		case SECOND_SIGMA_DEVIATION_OF_POPULATION: this.strCodeValue =EnumCV_PopulationStatisticalDescriptors.SECOND_SIGMA_DEVIATION_OF_POPULATION_121417.getValue(); break;
		}
	}
	
	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumPopulationStatisticalDescriptors Object of EnumCM_PopulationStatisticalDescriptors represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_PopulationStatisticalDescriptors enumPopulationStatisticalDescriptors)
	{
		switch(enumPopulationStatisticalDescriptors)
		{
		case NINETY_FIFTH_PERCENTILE_VALUE_OF_POPULATION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.NINETY_FIFTH_PERCENTILE_VALUE_OF_POPULATION.getSNOMEDCTID(); break;
		case NINETYTH_PERCENTILE_VALUE_OF_POPULATION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.NINETYTH_PERCENTILE_VALUE_OF_POPULATION.getSNOMEDCTID(); break;
		case FIRST_SIGMA_UPPER_VALUE_OF_POPULATION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.FIRST_SIGMA_UPPER_VALUE_OF_POPULATION.getSNOMEDCTID(); break;
		case SECOND_SIGMA_UPPER_VALUE_OF_POPULATION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.SECOND_SIGMA_UPPER_VALUE_OF_POPULATION.getSNOMEDCTID(); break;
		case MEAN_VALUE_OF_POPULATION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.MEAN_VALUE_OF_POPULATION.getSNOMEDCTID(); break;
		case MEDIAN_VALUE_OF_POPULATION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.MEDIAN_VALUE_OF_POPULATION.getSNOMEDCTID(); break;
		case TENTH_PERCENTILE_VALUE_OF_POPULATION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.TENTH_PERCENTILE_VALUE_OF_POPULATION.getSNOMEDCTID(); break;
		case FIFTH_PERCENTILE_VALUE_OF_POPULATION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.FIFTH_PERCENTILE_VALUE_OF_POPULATION.getSNOMEDCTID(); break;
		case FIRST_SIGMA_LOWER_VALUE_OF_POPULATION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.FIRST_SIGMA_LOWER_VALUE_OF_POPULATION.getSNOMEDCTID(); break;
		case SECOND_SIGMA_LOWER_VALUE_OF_POPULATION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.SECOND_SIGMA_LOWER_VALUE_OF_POPULATION.getSNOMEDCTID(); break;
		}
	}

	/**
	 * Sets the value for Population Statistical Descriptors
	 * @param enumPopulationStatisticalDescriptors Object of EnumCM_PopulationStatisticalDescriptors.
	 */
	public void setPopulationStatisticalDescriptors(EnumCM_PopulationStatisticalDescriptors enumPopulationStatisticalDescriptors)
	{
		this.strCodeMeaning = enumPopulationStatisticalDescriptors.getValue();
		if(enumPopulationStatisticalDescriptors.getValue().equalsIgnoreCase(EnumCM_PopulationStatisticalDescriptors.STANDARD_DEVIATION_OF_POPULATION.getValue()) 
			|| enumPopulationStatisticalDescriptors.getValue().equalsIgnoreCase(EnumCM_PopulationStatisticalDescriptors.SECOND_SIGMA_DEVIATION_OF_POPULATION.getValue()))
		{
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		}
		else
		{
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		}
		setCodeValue(enumPopulationStatisticalDescriptors);
		/**
		 * set SNOMED-CT ID
		 */
		setSNOMEDCTID(enumPopulationStatisticalDescriptors);
	}
}
