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

/**
 * This class represents CardiacPhase CID12233
 */
public class CardiacPhase_CID12233 {

	/**
	 * 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 CardiacPhase_CID12233 Template 
	 */
	public CardiacPhase_CID12233()
	{

	}

	/**
	 * 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 enumCardiacPhase Object of EnumCM_CardiacPhase represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_CardiacPhase enumCardiacPhase)
	{
		switch(enumCardiacPhase) //CV
		{
		case SYSTOLE: this.strCodeValue =EnumCV_CardiacPhase.SYSTOLE_F_32020.getValue(); break;
		case DIASTOLE: this.strCodeValue =EnumCV_CardiacPhase.DIASTOLE_F_32010.getValue(); break;
		case END_DIASTOLE: this.strCodeValue =EnumCV_CardiacPhase.END_DIASTOLE_F_32011.getValue(); break;
		case END_SYSTOLE: this.strCodeValue =EnumCV_CardiacPhase.END_SYSTOLE_R_FAB5B.getValue(); break;
		case EARLY_DIASTOLE: this.strCodeValue =EnumCV_CardiacPhase.EARLY_DIASTOLE_R_40B1B.getValue(); break;
		case PEAK_SYSTOLIC: this.strCodeValue =EnumCV_CardiacPhase.PEAK_SYSTOLIC_F_32021.getValue(); break;
		case ATRIAL_SYSTOLE: this.strCodeValue =EnumCV_CardiacPhase.ATRIAL_SYSTOLE_F_32030.getValue(); break;
		case VENTRICULAR_SYSTOLE: this.strCodeValue =EnumCV_CardiacPhase.VENTRICULAR_SYSTOLE_F_32040.getValue(); break;
		case VENTRICULAR_ISOVOLUMIC_CONTRACTION: this.strCodeValue =EnumCV_CardiacPhase.VENTRICULAR_ISOVOLUMIC_CONTRACTION_R_40B12.getValue(); break;
		case VENTRICULAR_EJECTION: this.strCodeValue =EnumCV_CardiacPhase.VENTRICULAR_EJECTION_R_40B11.getValue(); break;
		case VENTRICULAR_ISOVOLUMIC_RELAXATION: this.strCodeValue =EnumCV_CardiacPhase.VENTRICULAR_ISOVOLUMIC_RELAXATION_R_40B10.getValue(); break;
		case DIASTOLIC_RAPID_INFLOW: this.strCodeValue =EnumCV_CardiacPhase.DIASTOLIC_RAPID_INFLOW_R_40B1C.getValue(); break;
		case DIASTASIS: this.strCodeValue =EnumCV_CardiacPhase.DIASTASIS_R_40B21.getValue(); break;
		}
	}

	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumCardiacPhase Object of EnumCM_CardiacPhase represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_CardiacPhase enumCardiacPhase)
	{
		switch(enumCardiacPhase)
		{
		case SYSTOLE : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.SYSTOLE.getSNOMEDCTID(); break;
		case DIASTOLE : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.DIASTOLE.getSNOMEDCTID(); break;
		case END_DIASTOLE : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.END_DIASTOLE.getSNOMEDCTID(); break;
		case END_SYSTOLE : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.END_SYSTOLE.getSNOMEDCTID(); break;
		case EARLY_DIASTOLE : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.EARLY_DIASTOLE.getSNOMEDCTID(); break;
		case PEAK_SYSTOLIC : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.PEAK_SYSTOLIC.getSNOMEDCTID(); break;
		case ATRIAL_SYSTOLE : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.ATRIAL_SYSTOLE.getSNOMEDCTID(); break;
		case VENTRICULAR_SYSTOLE : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.VENTRICULAR_SYSTOLE.getSNOMEDCTID(); break;
		case VENTRICULAR_ISOVOLUMIC_CONTRACTION : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.VENTRICULAR_ISOVOLUMIC_CONTRACTION.getSNOMEDCTID(); break;
		case VENTRICULAR_EJECTION : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.VENTRICULAR_EJECTION.getSNOMEDCTID(); break;
		case VENTRICULAR_ISOVOLUMIC_RELAXATION : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.VENTRICULAR_ISOVOLUMIC_RELAXATION.getSNOMEDCTID(); break;
		case DIASTOLIC_RAPID_INFLOW : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.DIASTOLIC_RAPID_INFLOW.getSNOMEDCTID(); break;
		case DIASTASIS : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.DIASTASIS.getSNOMEDCTID(); break;
		}
	}

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

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