/*******************************************************************************
 *  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.EnumOpthalmicSNOMEDMap;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CalcificationTypesFromBI_RADS;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OphthalmicFilter;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_OphthalmicFilter;


/**
 * This class represents OphthalmicFilter - CID4204
 */
public class OphthalmicFilter_CID4204 
{
	
	/**
	 * 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;
	
	/**
	 * Retrieves the value for SNOMED-CT ID.
	 * @return String value for SNOMED-CT ID.
	 */
	public String getSNOMEDCTID() 
	{
		return strSNOMEDCTID;
	}
	/**
	 * Instantiates a new OphthalmicFilter_CID4204 Template 
	 */
	public OphthalmicFilter_CID4204()
	{

	}

	/**
	 * 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 enumOphthalmicFilter Object of EnumCM_OphthalmicFilter represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_OphthalmicFilter enumOphthalmicFilter)
	{
		switch(enumOphthalmicFilter)
		{
		case GREEN_OPTICAL_FILTER: this.strCodeValue =EnumCV_OphthalmicFilter.GREEN_OPTICAL_FILTER_A_010E2.getValue(); break;
		case RED_OPTICAL_FILTER: this.strCodeValue =EnumCV_OphthalmicFilter.RED_OPTICAL_FILTER_A_010DF.getValue(); break;
		case BLUE_OPTICAL_FILTER: this.strCodeValue =EnumCV_OphthalmicFilter.BLUE_OPTICAL_FILTER_A_010DA.getValue(); break;
		case YELLOW_GREEN_OPTICAL_FILTER: this.strCodeValue =EnumCV_OphthalmicFilter.YELLOW_GREEN_OPTICAL_FILTER_A_010E0.getValue(); break;
		case BLUE_GREEN_OPTICAL_FILTER: this.strCodeValue =EnumCV_OphthalmicFilter.BLUE_GREEN_OPTICAL_FILTER_A_010D8.getValue(); break;
		case INFRARED_OPTICAL_FILTER: this.strCodeValue =EnumCV_OphthalmicFilter.INFRARED_OPTICAL_FILTER_A_010DC.getValue(); break;
		case POLARIZING_OPTICAL_FILTER: this.strCodeValue =EnumCV_OphthalmicFilter.POLARIZING_OPTICAL_FILTER_A_010E1.getValue(); break;
		case NO_FILTER: this.strCodeValue =EnumCV_OphthalmicFilter.NO_FILTER_111609.getValue(); break;

		}
	}
	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumOphthalmicFilter Object of EnumCM_OphthalmicFilter represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_OphthalmicFilter enumOphthalmicFilter)
	{
		switch(enumOphthalmicFilter)
		{
		case GREEN_OPTICAL_FILTER : this.strSNOMEDCTID =EnumOpthalmicSNOMEDMap.GREEN_OPTICAL_FILTER.getSNOMEDCTID(); break;
		case RED_OPTICAL_FILTER : this.strSNOMEDCTID =EnumOpthalmicSNOMEDMap.RED_OPTICAL_FILTER.getSNOMEDCTID(); break;
		case BLUE_OPTICAL_FILTER : this.strSNOMEDCTID =EnumOpthalmicSNOMEDMap.BLUE_OPTICAL_FILTER.getSNOMEDCTID(); break;
		case YELLOW_GREEN_OPTICAL_FILTER : this.strSNOMEDCTID =EnumOpthalmicSNOMEDMap.YELLOW_GREEN_OPTICAL_FILTER.getSNOMEDCTID(); break;
		case BLUE_GREEN_OPTICAL_FILTER : this.strSNOMEDCTID =EnumOpthalmicSNOMEDMap.BLUE_GREEN_OPTICAL_FILTER.getSNOMEDCTID(); break;
		case INFRARED_OPTICAL_FILTER : this.strSNOMEDCTID =EnumOpthalmicSNOMEDMap.INFRARED_OPTICAL_FILTER.getSNOMEDCTID(); break;
		case POLARIZING_OPTICAL_FILTER : this.strSNOMEDCTID =EnumOpthalmicSNOMEDMap.POLARIZING_OPTICAL_FILTER.getSNOMEDCTID(); break;
		}
	}

	/**
	 * Sets the value for OphthalmicFilter
	 * @param enumOphthalmicFilter Object of EnumCM_OphthalmicFilter.
	 */
	public void setOphthalmicFilter(EnumCM_OphthalmicFilter enumOphthalmicFilter)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumOphthalmicFilter.getValue();
		if(strCodeMeaning.equalsIgnoreCase(EnumCM_OphthalmicFilter.NO_FILTER.getValue()))
				this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		else
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		
		/**
		 * set code Value
		 */
		setCodeValue(enumOphthalmicFilter);

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