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


/**
 * This class represents ChestDistributionDescriptor - CID6128
 */
public class ChestDistributionDescriptor_CID6128 
{
	
	/**
	 * 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 ChestDistributionDescriptor_CID6128 Template 
	 */
	public ChestDistributionDescriptor_CID6128()
	{

	}

	/**
	 * 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 enumChestDistributionDescriptor Object of EnumCM_ChestDistributionDescriptor represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_ChestDistributionDescriptor enumChestDistributionDescriptor)
	{
		switch(enumChestDistributionDescriptor)
		{
		case BATS_WING_DISTRIBUTION: this.strCodeValue =EnumCV_ChestDistributionDescriptor.BATS_WING_DISTRIBUTION_112154.getValue(); break;
		case BUTTERFLY_DISTRIBUTION: this.strCodeValue =EnumCV_ChestDistributionDescriptor.BUTTERFLY_DISTRIBUTION_112155.getValue(); break;
		case CENTRILOBULAR: this.strCodeValue =EnumCV_ChestDistributionDescriptor.CENTRILOBULAR_112156.getValue(); break;
		case COALESCENT: this.strCodeValue =EnumCV_ChestDistributionDescriptor.COALESCENT_112157.getValue(); break;
		case DIFFUSE: this.strCodeValue =EnumCV_ChestDistributionDescriptor.DIFFUSE_G_A321.getValue(); break;
		case DISCOID: this.strCodeValue =EnumCV_ChestDistributionDescriptor.DISCOID_M_020FA.getValue(); break;
		case DISSEMINATED: this.strCodeValue =EnumCV_ChestDistributionDescriptor.DISSEMINATED_G_A324.getValue(); break;
		case FOCAL: this.strCodeValue =EnumCV_ChestDistributionDescriptor.FOCAL_G_A351.getValue(); break;
		case GENERALIZED: this.strCodeValue =EnumCV_ChestDistributionDescriptor.GENERALIZED_G_A366.getValue(); break;
		case LOBAR: this.strCodeValue =EnumCV_ChestDistributionDescriptor.LOBAR_112158.getValue(); break;
		case MULTIFOCAL: this.strCodeValue =EnumCV_ChestDistributionDescriptor.MULTIFOCAL_G_A443.getValue(); break;
		case SEGMENTAL: this.strCodeValue =EnumCV_ChestDistributionDescriptor.SEGMENTAL_G_A137.getValue(); break;
		case SYSTEMIC: this.strCodeValue =EnumCV_ChestDistributionDescriptor.SYSTEMIC_G_A572.getValue(); break;
		}
	}
	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumChestDistributionDescriptor Object of EnumCM_ChestDistributionDescriptor represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_ChestDistributionDescriptor enumChestDistributionDescriptor)
	{
		switch(enumChestDistributionDescriptor)
		{
		case DIFFUSE : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.DIFFUSE.getSNOMEDCTID(); break;
		case DISCOID : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.DISCOID.getSNOMEDCTID(); break;
		case DISSEMINATED : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.DISSEMINATED.getSNOMEDCTID(); break;
		case FOCAL : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.FOCAL.getSNOMEDCTID(); break;
		case GENERALIZED : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.GENERALIZED.getSNOMEDCTID(); break;
		case MULTIFOCAL : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.MULTIFOCAL.getSNOMEDCTID(); break;
		case SEGMENTAL : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.SEGMENTAL.getSNOMEDCTID(); break;
		case SYSTEMIC : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.SYSTEMIC.getSNOMEDCTID(); break;
		}
	}
	/**
	 * Sets the value for ChestDistributionDescriptor
	 * @param enumChestDistributionDescriptor Object of EnumCM_ChestDistributionDescriptor.
	 */
	public void setChestDistributionDescriptor(EnumCM_ChestDistributionDescriptor enumChestDistributionDescriptor)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumChestDistributionDescriptor.getValue();
		if(strCodeMeaning.equalsIgnoreCase(EnumCM_ChestDistributionDescriptor.BATS_WING_DISTRIBUTION.getValue())
				|| strCodeMeaning.equalsIgnoreCase(EnumCM_ChestDistributionDescriptor.BUTTERFLY_DISTRIBUTION.getValue())
				|| strCodeMeaning.equalsIgnoreCase(EnumCM_ChestDistributionDescriptor.CENTRILOBULAR.getValue())
				|| strCodeMeaning.equalsIgnoreCase(EnumCM_ChestDistributionDescriptor.COALESCENT.getValue())
				|| strCodeMeaning.equalsIgnoreCase(EnumCM_ChestDistributionDescriptor.LOBAR.getValue()))
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		else
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		
		/**
		 * set code Value
		 */
		setCodeValue(enumChestDistributionDescriptor);
		/**
		 * set SNOMED-CT ID
		 */
		setSNOMEDCTID(enumChestDistributionDescriptor);
	}
}
