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

/**
 * This class represents OrificeFlowProperties CID12222
 */
public class OrificeFlowProperties_CID12222 {

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

	}

	/**
	 * 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 enumOrificeFlowProperties Object of EnumCM_OrificeFlowProperties represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_OrificeFlowProperties enumOrificeFlowProperties)
	{
		switch(enumOrificeFlowProperties) 
		{
		case VOLUME_FLOW: this.strCodeValue =EnumCV_OrificeFlowProperties.VOLUME_FLOW_33878_0.getValue(); break;
		case PEAK_INSTANTANEOUS_FLOW_RATE: this.strCodeValue =EnumCV_OrificeFlowProperties.PEAK_INSTANTANEOUS_FLOW_RATE_34141_2.getValue(); break;
		case CARDIOVASCULAR_ORIFICE_AREA: this.strCodeValue =EnumCV_OrificeFlowProperties.CARDIOVASCULAR_ORIFICE_AREA_G_038E.getValue(); break;
		case CARDIOVASCULAR_ORIFICE_DIAMETER: this.strCodeValue =EnumCV_OrificeFlowProperties.CARDIOVASCULAR_ORIFICE_DIAMETER_G_038F.getValue(); break;
		case REGURGITANT_FRACTION: this.strCodeValue =EnumCV_OrificeFlowProperties.REGURGITANT_FRACTION_G_0390.getValue(); break;
		case END_DIASTOLIC_VELOCITY: this.strCodeValue =EnumCV_OrificeFlowProperties.END_DIASTOLIC_VELOCITY_11653_3.getValue(); break;
		case PEAK_SYSTOLIC_VELOCITY: this.strCodeValue =EnumCV_OrificeFlowProperties.PEAK_SYSTOLIC_VELOCITY_11726_7.getValue(); break;
		case TIME_AVERAGED_MEAN_VELOCITY: this.strCodeValue =EnumCV_OrificeFlowProperties.TIME_AVERAGED_MEAN_VELOCITY_20352_1.getValue(); break;
		case TIME_AVERAGED_PEAK_VELOCITY: this.strCodeValue =EnumCV_OrificeFlowProperties.TIME_AVERAGED_PEAK_VELOCITY_11692_1.getValue(); break;
		case PEAK_GRADIENT: this.strCodeValue =EnumCV_OrificeFlowProperties.PEAK_GRADIENT_20247_3.getValue(); break;
		case MEAN_GRADIENT: this.strCodeValue =EnumCV_OrificeFlowProperties.MEAN_GRADIENT_20256_4.getValue(); break;
		case VELOCITY_TIME_INTEGRAL: this.strCodeValue =EnumCV_OrificeFlowProperties.VELOCITY_TIME_INTEGRAL_20354_7.getValue(); break;
		case PRESSURE_HALF_TIME: this.strCodeValue =EnumCV_OrificeFlowProperties.PRESSURE_HALF_TIME_20280_4.getValue(); break;
		case ACCELERATION_TIME: this.strCodeValue =EnumCV_OrificeFlowProperties.ACCELERATION_TIME_20168_1.getValue(); break;
		case DECELERATION_TIME: this.strCodeValue =EnumCV_OrificeFlowProperties.DECELERATION_TIME_20217_6.getValue(); break;
		case DECELERATION_SLOPE: this.strCodeValue =EnumCV_OrificeFlowProperties.DECELERATION_SLOPE_20216_8.getValue(); break;
		case SYSTOLIC_TO_DIASTOLIC_VELOCITY_RATIO: this.strCodeValue =EnumCV_OrificeFlowProperties.SYSTOLIC_TO_DIASTOLIC_VELOCITY_RATIO_12144_2.getValue(); break;
		case FLOW_RADIUS: this.strCodeValue =EnumCV_OrificeFlowProperties.FLOW_RADIUS_59102_4.getValue(); break;
		case ALIAS_VELOCITY: this.strCodeValue =EnumCV_OrificeFlowProperties.ALIAS_VELOCITY_59130_5.getValue(); break;
		case ACCELERATION_SLOPE: this.strCodeValue =EnumCV_OrificeFlowProperties.ACCELERATION_SLOPE_20167_3.getValue(); break;
		case D_E_SLOPE: this.strCodeValue =EnumCV_OrificeFlowProperties.D_E_SLOPE_59127_1.getValue(); break;
		case E_F_SLOPE: this.strCodeValue =EnumCV_OrificeFlowProperties.E_F_SLOPE_59128_9.getValue(); break;
		case A_C_INTERVAL: this.strCodeValue =EnumCV_OrificeFlowProperties.A_C_INTERVAL_59103_2.getValue(); break;
		case PEAK_E_WAVE_PEAK_A_WAVE_BY_US: this.strCodeValue =EnumCV_OrificeFlowProperties.PEAK_E_WAVE_PEAK_A_WAVE_BY_US_59104_0.getValue(); break;
		case STENOSIS_PEAK_GRADIENT: this.strCodeValue =EnumCV_OrificeFlowProperties.STENOSIS_PEAK_GRADIENT_59106_5.getValue(); break;
		case STENOSIS_PEAK_VELOCITY: this.strCodeValue =EnumCV_OrificeFlowProperties.STENOSIS_PEAK_VELOCITY_59107_3.getValue(); break;
		case PEAK_REVERSAL_VELOCITY_DURING_ATRIAL_CONTRACTION: this.strCodeValue =EnumCV_OrificeFlowProperties.PEAK_REVERSAL_VELOCITY_DURING_ATRIAL_CONTRACTION_59079_4.getValue(); break;
		case E_WAVE_PEAK_VELOCITY: this.strCodeValue =EnumCV_OrificeFlowProperties.E_WAVE_PEAK_VELOCITY_59080_2.getValue(); break;
		case A_WAVE_PEAK_VELOCITY: this.strCodeValue =EnumCV_OrificeFlowProperties.A_WAVE_PEAK_VELOCITY_59081_0.getValue(); break;
		case E_VELOCITY_TO_ANNULUS_E_VELOCITY_RATIO: this.strCodeValue =EnumCV_OrificeFlowProperties.E_VELOCITY_TO_ANNULUS_E_VELOCITY_RATIO_59111_5.getValue(); break;
		case VELOCITY_OF_FLOW_PROPAGATION: this.strCodeValue =EnumCV_OrificeFlowProperties.VELOCITY_OF_FLOW_PROPAGATION_59115_6.getValue(); break;
		}
	}

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

	/**
	 * Sets the value for OrificeFlowProperties
	 * @param enumOrificeFlowProperties Object of EnumCM_OrificeFlowProperties.
	 */
	public void setOrificeFlowProperties(EnumCM_OrificeFlowProperties enumOrificeFlowProperties)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumOrificeFlowProperties.getValue();
		if(enumOrificeFlowProperties.getValue().equalsIgnoreCase(EnumCM_OrificeFlowProperties.CARDIOVASCULAR_ORIFICE_AREA.getValue()) ||
				enumOrificeFlowProperties.getValue().equalsIgnoreCase(EnumCM_OrificeFlowProperties.CARDIOVASCULAR_ORIFICE_DIAMETER.getValue())||
				enumOrificeFlowProperties.getValue().equalsIgnoreCase(EnumCM_OrificeFlowProperties.REGURGITANT_FRACTION.getValue()))
		{
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		}
		else
		{
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.LN.getValue();
		}
		
		/**
		 * set code Value
		 */
		setCodeValue(enumOrificeFlowProperties);

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