/*******************************************************************************
 *  Copyright 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_RadiopharmaceuticalPatientState;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_SpecimenSamplingProcedure;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_SpecimenSamplingProcedure;
import cdac.medinfo.sdk.dcm30_04.templates.dicomsnomedmap.EnumDICOMSNOMEDMap;

/**
 * This class represents SpecimenSamplingProcedure CID8110
 */
public class SpecimenSamplingProcedure_CID8110 {

	/**
	 * 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;
	/**
	 * Instantiates a new SpecimenSamplingProcedure_CID8110 Template 
	 */
	public SpecimenSamplingProcedure_CID8110()
	{

	}

	/**
	 * 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;
	}
	
	/**
	 * Retrieves the value for SNOMED-CT ID.
	 * @return String value for SNOMED-CT ID.
	 */
	public String getSNOMEDCTID() 
	{
		return strSNOMEDCTID;
	}
	/**
	 * Sets the Code Value according to Code Meaning.
	 * @param enumSpecimenSamplingProcedure Object of EnumCM_SpecimenSamplingProcedure represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_SpecimenSamplingProcedure enumSpecimenSamplingProcedure)
	{
		switch(enumSpecimenSamplingProcedure)
		{
		case DISSECTION: this.strCodeValue =EnumCV_SpecimenSamplingProcedure.DISSECTION_P1_01003.getValue(); break;
		case DISSECTION_WITH_ENTIRE_SPECIMEN_SUBMISSION: this.strCodeValue =EnumCV_SpecimenSamplingProcedure.DISSECTION_WITH_ENTIRE_SPECIMEN_SUBMISSION_111726.getValue(); break;
		case DISSECTION_WITH_REPRESENTATIVE_SECTIONS_SUBMISSION: this.strCodeValue =EnumCV_SpecimenSamplingProcedure.DISSECTION_WITH_REPRESENTATIVE_SECTIONS_SUBMISSION_111727.getValue(); break;
		case CORE_SAMPLING: this.strCodeValue =EnumCV_SpecimenSamplingProcedure.CORE_SAMPLING_P3_40011.getValue(); break;
		case BLOCK_SECTIONING: this.strCodeValue =EnumCV_SpecimenSamplingProcedure.BLOCK_SECTIONING_P3_4000D.getValue(); break;
		case LASER_MICRODISSECTION: this.strCodeValue =EnumCV_SpecimenSamplingProcedure.LASER_MICRODISSECTION_P3_40004.getValue(); break;
		case BLOCK_SURFACE_RECUT: this.strCodeValue =EnumCV_SpecimenSamplingProcedure.BLOCK_SURFACE_RECUT_P3_4000E.getValue(); break;
		case BLOCK_STEP_SECTIONING: this.strCodeValue =EnumCV_SpecimenSamplingProcedure.BLOCK_STEP_SECTIONING_P3_4000F.getValue(); break;
		case TOUCH_PREPARATION_PROCEDURE: this.strCodeValue =EnumCV_SpecimenSamplingProcedure.TOUCH_PREPARATION_PROCEDURE_P3_4500A.getValue(); break;
		case SMEAR_PROCEDURE: this.strCodeValue =EnumCV_SpecimenSamplingProcedure.SMEAR_PROCEDURE_P3_00048.getValue(); break;
		}
	}

	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumSpecimenSamplingProcedure Object of EnumCM_SpecimenSamplingProcedure represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_SpecimenSamplingProcedure enumSpecimenSamplingProcedure)
	{
		switch(enumSpecimenSamplingProcedure)
		{
		case DISSECTION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.DISSECTION.getSNOMEDCTID(); break;
		case CORE_SAMPLING : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.CORE_SAMPLING.getSNOMEDCTID(); break;
		case BLOCK_SECTIONING : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.BLOCK_SECTIONING.getSNOMEDCTID(); break;
		case LASER_MICRODISSECTION : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.LASER_MICRODISSECTION.getSNOMEDCTID(); break;
		case BLOCK_SURFACE_RECUT : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.BLOCK_SURFACE_RECUT.getSNOMEDCTID(); break;
		case BLOCK_STEP_SECTIONING : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.BLOCK_STEP_SECTIONING.getSNOMEDCTID(); break;
		case TOUCH_PREPARATION_PROCEDURE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.TOUCH_PREPARATION_PROCEDURE.getSNOMEDCTID(); break;
		case SMEAR_PROCEDURE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.SMEAR_PROCEDURE.getSNOMEDCTID(); break;
		}
	}

	/**
	 * Sets the value for SpecimenSamplingProcedure
	 * @param enumSpecimenSamplingProcedure Object of EnumCM_SpecimenSamplingProcedure.
	 */
	public void setSpecimenSamplingProcedure(EnumCM_SpecimenSamplingProcedure enumSpecimenSamplingProcedure)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumSpecimenSamplingProcedure.getValue();
		if(enumSpecimenSamplingProcedure.getValue().equalsIgnoreCase(EnumCM_SpecimenSamplingProcedure.DISSECTION_WITH_ENTIRE_SPECIMEN_SUBMISSION.getValue())
				|| enumSpecimenSamplingProcedure.getValue().equalsIgnoreCase(EnumCM_SpecimenSamplingProcedure.DISSECTION_WITH_REPRESENTATIVE_SECTIONS_SUBMISSION.getValue()))
		{
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		}
		else
		{
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		}
		
		/**
		 * set code Value
		 */
		setCodeValue(enumSpecimenSamplingProcedure);

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