/*******************************************************************************
 *  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.hemodynamicsreporttemplates;

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_AtrialPressureMeasurement;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_AtrialPressureMeasurement;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Measurement_TID300;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents AtrialPressureMeasurement - TID3505
 */
public class AtrialPressureMeasurement_TID3505 extends Template
{
	/**
	 * Object of HemodynamicAcquisitionContext_TID3530
	 */
	private HemodynamicAcquisitionContext_TID3530 objHemodynamicAcquisitionContextTID3530;
	/**
	 * Object of PressureWaveformMeasurements_TID3550
	 */
	private PressureWaveformMeasurements_TID3550 objPressureWaveformMeasurementsTID3550;
	
	/**
	 * Object of Measurement_TID300
	 */
	private Measurement_TID300 objMeasurementTID300;

	/**
	 * Instantiates a new AtrialPressureMeasurement_TID3505 Template.
	 * @param objTree Object of SRTree.
	 */
	public AtrialPressureMeasurement_TID3505(SRTree objTree)
	{
		super(objTree);
	}

	/**
	 * Retrieves Measurement 
	 * @return objMeasurementID300 Object of Measurement_TID300 
	 */
	public Measurement_TID300 getMeasurement() 
	{
		if(null == this.objMeasurementTID300)
			this.objMeasurementTID300 = new Measurement_TID300(getSRTree());
		return this.objMeasurementTID300;
	}
	/**
	 * Retrieves PressureWaveformMeasurements
	 * @return objPressureWaveformMeasurementsTID3550 Object of PressureWaveformMeasurements_TID3550 
	 */
	public PressureWaveformMeasurements_TID3550 getPressureWaveformMeasurements() 
	{
		if(null == this.objPressureWaveformMeasurementsTID3550)
			this.objPressureWaveformMeasurementsTID3550 = new PressureWaveformMeasurements_TID3550(getSRTree());
		return this.objPressureWaveformMeasurementsTID3550;
	}
	/**
	 * Retrieves HemodynamicAcquisitionContext 
	 * @return objHemodynamicAcquisitionContextTID3530 Object of HemodynamicAcquisitionContext_TID3530 
	 */
	public HemodynamicAcquisitionContext_TID3530 getHemodynamicAcquisitionContext() 
	{
		if(null == this.objHemodynamicAcquisitionContextTID3530)
			this.objHemodynamicAcquisitionContextTID3530 = new HemodynamicAcquisitionContext_TID3530(getSRTree());
		return this.objHemodynamicAcquisitionContextTID3530;
	}

	/**
	 * Sets the value for Atrial pressure measurements
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setAtrialPressureMeasurements(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AtrialPressureMeasurement.ATRIAL_PRESSURE_MEASUREMENTS.getValue();
		String strCodeValue = EnumCV_AtrialPressureMeasurement.ATRIAL_PRESSURE_MEASUREMENTS_122121.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type CONTAINER and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
}
