/*******************************************************************************
 *  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.EnumDICOMSNOMEDMap;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PressureMeasurements;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_PressureMeasurements;


/**
 * This class represents PressureMeasurements - CID3611
 */
public class PressureMeasurements_CID3611 
{
	
	/**
	 * 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 PressureMeasurements_CID3611 Template 
	 */
	public PressureMeasurements_CID3611()
	{

	}

	/**
	 * 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 enumPressureMeasurements Object of EnumCM_PressureMeasurements represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_PressureMeasurements enumPressureMeasurements)
	{
		switch(enumPressureMeasurements)
		{
		case A_WAVE_PEAK_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.A_WAVE_PEAK_PRESSURE_109016.getValue(); break;
		case C_WAVE_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.C_WAVE_PRESSURE_122196.getValue(); break;
		case INTRAVASCULAR_DIASTOLIC_BLOOD_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.INTRAVASCULAR_DIASTOLIC_BLOOD_PRESSURE_8462_4.getValue(); break;
		case AVERAGE_DIASTOLIC_BLOOD_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.AVERAGE_DIASTOLIC_BLOOD_PRESSURE_F_00E22.getValue(); break;
		case MINIMUM_DIASTOLIC_BLOOD_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.MINIMUM_DIASTOLIC_BLOOD_PRESSURE_F_00E1F.getValue(); break;
		case VENTRICULAR_END_DIASTOLIC_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.VENTRICULAR_END_DIASTOLIC_PRESSURE_122191.getValue(); break;
		case GRADIENT_PRESSURE_AVERAGE: this.strCodeValue =EnumCV_PressureMeasurements.GRADIENT_PRESSURE_AVERAGE_122197.getValue(); break;
		case GRADIENT_PRESSURE_PEAK: this.strCodeValue =EnumCV_PressureMeasurements.GRADIENT_PRESSURE_PEAK_122198.getValue(); break;
		case MEAN_BLOOD_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.MEAN_BLOOD_PRESSURE_F_31150.getValue(); break;
		case PRESSURE_AT_DP_DT_MAX: this.strCodeValue =EnumCV_PressureMeasurements.PRESSURE_AT_DP_DT_MAX_122199.getValue(); break;
		case INTRAVASCULAR_SYSTOLIC_BLOOD_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.INTRAVASCULAR_SYSTOLIC_BLOOD_PRESSURE_8480_6.getValue(); break;
		case AVERAGE_SYSTOLIC_BLOOD_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.AVERAGE_SYSTOLIC_BLOOD_PRESSURE_F_00E14.getValue(); break;
		case MAXIMUM_SYSTOLIC_BLOOD_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.MAXIMUM_SYSTOLIC_BLOOD_PRESSURE_F_00E11.getValue(); break;
		case V_WAVE_PEAK_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.V_WAVE_PEAK_PRESSURE_109034.getValue(); break;
		case X_DESCENT_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.X_DESCENT_PRESSURE_122208.getValue(); break;
		case Y_DESCENT_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.Y_DESCENT_PRESSURE_122209.getValue(); break;
		case Z_POINT_PRESSURE: this.strCodeValue =EnumCV_PressureMeasurements.Z_POINT_PRESSURE_122210.getValue(); break;
		}
	}
	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumPressureMeasurements Object of EnumCM_PressureMeasurements represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_PressureMeasurements enumPressureMeasurements)
	{
		switch(enumPressureMeasurements)
		{
		case AVERAGE_DIASTOLIC_BLOOD_PRESSURE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.AVERAGE_DIASTOLIC_BLOOD_PRESSURE.getSNOMEDCTID(); break;
		case MINIMUM_DIASTOLIC_BLOOD_PRESSURE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.MINIMUM_DIASTOLIC_BLOOD_PRESSURE.getSNOMEDCTID(); break;
		case MEAN_BLOOD_PRESSURE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.MEAN_BLOOD_PRESSURE.getSNOMEDCTID(); break;
		case AVERAGE_SYSTOLIC_BLOOD_PRESSURE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.AVERAGE_SYSTOLIC_BLOOD_PRESSURE.getSNOMEDCTID(); break;
		case MAXIMUM_SYSTOLIC_BLOOD_PRESSURE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.MAXIMUM_SYSTOLIC_BLOOD_PRESSURE.getSNOMEDCTID(); break;
		}
	}

	/**
	 * Sets the value for PressureMeasurements
	 * @param enumPressureMeasurements Object of EnumCM_PressureMeasurements.
	 */
	public void setPressureMeasurements(EnumCM_PressureMeasurements enumPressureMeasurements)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumPressureMeasurements.getValue();
		if(strCodeMeaning.equalsIgnoreCase(EnumCM_PressureMeasurements.INTRAVASCULAR_DIASTOLIC_BLOOD_PRESSURE.getValue())
		   ||strCodeMeaning.equalsIgnoreCase(EnumCM_PressureMeasurements.INTRAVASCULAR_SYSTOLIC_BLOOD_PRESSURE.getValue()))
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.LN.getValue();
		else if(strCodeMeaning.equalsIgnoreCase(EnumCM_PressureMeasurements.AVERAGE_DIASTOLIC_BLOOD_PRESSURE.getValue())
		   ||strCodeMeaning.equalsIgnoreCase(EnumCM_PressureMeasurements.AVERAGE_SYSTOLIC_BLOOD_PRESSURE.getValue())
		   ||strCodeMeaning.equalsIgnoreCase(EnumCM_PressureMeasurements.MEAN_BLOOD_PRESSURE.getValue())
		   ||strCodeMeaning.equalsIgnoreCase(EnumCM_PressureMeasurements.MINIMUM_DIASTOLIC_BLOOD_PRESSURE.getValue())
		   ||strCodeMeaning.equalsIgnoreCase(EnumCM_PressureMeasurements.MAXIMUM_SYSTOLIC_BLOOD_PRESSURE.getValue()))
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		else
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * set code Value
		 */
		setCodeValue(enumPressureMeasurements);
		/**
		 * set SNOMED-CT ID
		 */
		setSNOMEDCTID(enumPressureMeasurements);
	}
}
