/*******************************************************************************
 *  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_CardiacUltrasoundHemodynamicMeasurements;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_CardiacUltrasoundHemodynamicMeasurements;
import cdac.medinfo.sdk.dcm30_04.templates.dicomsnomedmap.EnumChestCardiacSNOMEDMap;

/**
 * This class represents CardiacUltrasoundHemodynamicMeasurements CID12254
 */
public class CardiacUltrasoundHemodynamicMeasurements_CID12254 {

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

	}

	/**
	 * 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 enumCardiacUltrasoundHemodynamicMeasurements Object of EnumCM_CardiacUltrasoundHemodynamicMeasurements represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_CardiacUltrasoundHemodynamicMeasurements enumCardiacUltrasoundHemodynamicMeasurements)
	{
		switch(enumCardiacUltrasoundHemodynamicMeasurements) 
		{
		case R_R_INTERVAL: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.R_R_INTERVAL_122182.getValue(); break;
		case TAU: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.TAU_122182.getValue(); break;
		case INDICATOR_MEAN_TRANSIT_TIME: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.INDICATOR_MEAN_TRANSIT_TIME_122182.getValue(); break;
		case CLOSURE_TO_OPENING_TIME: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.CLOSURE_TO_OPENING_TIME_122182.getValue(); break;
		case ISOVOLUMIC_RELAXATION_TIME: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.ISOVOLUMIC_RELAXATION_TIME_122182.getValue(); break;
		case ISOVOLUMIC_CONTRACTION_TIME: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.ISOVOLUMIC_CONTRACTION_TIME_122182.getValue(); break;
		case EJECTION_TIME: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.EJECTION_TIME_122182.getValue(); break;
		case PRE_EJECTION_PERIOD: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.PRE_EJECTION_PERIOD_122182.getValue(); break;
		case FILLING_TIME: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.FILLING_TIME_122182.getValue(); break;
		case BLOOD_PRESSURE: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.BLOOD_PRESSURE_122182.getValue(); break;
		case HEART_RATE_CORRECTED_EJECTION_TIME: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.HEART_RATE_CORRECTED_EJECTION_TIME_122182.getValue(); break;
		case HEART_RATE_CORRECTED_PRE_EJECTION_PERIOD: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.HEART_RATE_CORRECTED_PRE_EJECTION_PERIOD_122182.getValue(); break;
		case A_WAVE_DURATION: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.A_WAVE_DURATION_122182.getValue(); break;
		case PRE_EJECTION_PERIOD_EJECTION_TIME_RATIO: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.PRE_EJECTION_PERIOD_EJECTION_TIME_RATIO_122182.getValue(); break;
		case ENVELOPE_DURATION: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.ENVELOPE_DURATION_122182.getValue(); break;
		case TIME_TO_PEAK_BY_US: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.TIME_TO_PEAK_BY_US_122182.getValue(); break;
		case DP_DT_BY_US: this.strCodeValue =EnumCV_CardiacUltrasoundHemodynamicMeasurements.DP_DT_BY_US_122182.getValue(); break;
		}
	}

	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumCardiacUltrasoundHemodynamicMeasurements Object of EnumCM_CardiacUltrasoundHemodynamicMeasurements represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_CardiacUltrasoundHemodynamicMeasurements enumCardiacUltrasoundHemodynamicMeasurements)
	{
		switch(enumCardiacUltrasoundHemodynamicMeasurements)
		{
		case BLOOD_PRESSURE : this.strSNOMEDCTID =EnumChestCardiacSNOMEDMap.BLOOD_PRESSURE.getSNOMEDCTID(); break;
		}
	}

	/**
	 * Sets the value for CardiacUltrasoundHemodynamicMeasurements
	 * @param enumCardiacUltrasoundHemodynamicMeasurements Object of EnumCM_CardiacUltrasoundHemodynamicMeasurements.
	 */
	public void setCardiacUltrasoundHemodynamicMeasurements(EnumCM_CardiacUltrasoundHemodynamicMeasurements enumCardiacUltrasoundHemodynamicMeasurements)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumCardiacUltrasoundHemodynamicMeasurements.getValue();
		if(enumCardiacUltrasoundHemodynamicMeasurements.getValue().equalsIgnoreCase(EnumCM_CardiacUltrasoundHemodynamicMeasurements.R_R_INTERVAL.getValue())
			||enumCardiacUltrasoundHemodynamicMeasurements.getValue().equalsIgnoreCase(EnumCM_CardiacUltrasoundHemodynamicMeasurements.TAU.getValue())||
			enumCardiacUltrasoundHemodynamicMeasurements.getValue().equalsIgnoreCase(EnumCM_CardiacUltrasoundHemodynamicMeasurements.INDICATOR_MEAN_TRANSIT_TIME.getValue()))
		{
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		}
		else if(enumCardiacUltrasoundHemodynamicMeasurements.getValue().equalsIgnoreCase(EnumCM_CardiacUltrasoundHemodynamicMeasurements.BLOOD_PRESSURE.getValue()))
		{
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		}
		else{
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.LN.getValue();
		}
		
		/**
		 * set code Value
		 */
		setCodeValue(enumCardiacUltrasoundHemodynamicMeasurements);

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