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

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.cid.CardiacPhase_CID12233;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_AbsoluteValuesOfVentricularMeasurements;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacPhase;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_AbsoluteValuesOfVentricularMeasurements;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Measurement_TID300;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents AbsoluteValuesOfVentricularMeasurements_TID3922
 */
public class AbsoluteValuesOfVentricularMeasurements_TID3922 extends Template
{
	private static final String strCM = null;

	/**
	 * Object of Measurement_TID300
	 */
	private Measurement_TID300 objMeasurementTID300;

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

	/**
	 * Retrieves Measurement.
	 * @return objMeasurementTID300 Object of Measurement_TID300 
	 */
	public Measurement_TID300 getMeasurement() 
	{
		if(null == this.objMeasurementTID300)
			this.objMeasurementTID300 = new Measurement_TID300(getSRTree());
		return this.objMeasurementTID300;
	}

	/**
	 * Sets the value for Absolute Values Of Ventricular Measurements.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 * @param arrPosition 
	 */
	public void setAbsoluteValuesOfVentricularMeasurements(EnumContinuityOfContent enumContinuityOfContent, int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AbsoluteValuesOfVentricularMeasurements.ABSOLUTE_VALUES_OF_VENTRICULAR_MEASUREMENTS.getValue();
		String strCodeValue = EnumCV_AbsoluteValuesOfVentricularMeasurements.ABSOLUTE_VALUES_OF_VENTRICULAR_MEASUREMENTS_122608.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);
	}
	
	/**
	 * Sets the value for Peak Ejection Time.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 * @param arrNumericValue 
	 * @param arrPosition 
	 */
	public void setPeakEjectionTime(String[] arrNumericValue, int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AbsoluteValuesOfVentricularMeasurements.PEAK_EJECTION_TIME.getValue();
		String strCodeValue = EnumCV_AbsoluteValuesOfVentricularMeasurements.PEAK_EJECTION_TIME_122617.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type NUM and adding this node as root of a tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, arrNumericValue, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Peak Filling Time.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 * @param arrNumericValue 
	 * @param arrPosition 
	 */
	public void setPeakFillingTime(String[] arrNumericValue, int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AbsoluteValuesOfVentricularMeasurements.PEAK_FILLING_TIME.getValue();
		String strCodeValue = EnumCV_AbsoluteValuesOfVentricularMeasurements.PEAK_FILLING_TIME_122619.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type NUM and adding this node as root of a tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, arrNumericValue, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Cardiac Cycle Point.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strProcedureActionID String value for Procedure Action ID
	 */
	public void setCardiacCyclePoint(int[] arrPosition, EnumCM_CardiacPhase enumCardiacPhase)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AbsoluteValuesOfVentricularMeasurements.CARDIAC_CYCLE_POINT.getValue();
		String strCodeValue = EnumCV_AbsoluteValuesOfVentricularMeasurements.CARDIAC_CYCLE_POINT_R_4089A.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objCardiacPhaseCID12233)
			this.objCardiacPhaseCID12233 = new CardiacPhase_CID12233();
		this.objCardiacPhaseCID12233.setCardiacPhase(enumCardiacPhase);

		String strCM = objCardiacPhaseCID12233.getCodeMeaning();
		String strCV = objCardiacPhaseCID12233.getCodeValue();
		String strCSD = objCardiacPhaseCID12233.getCodingSchemeDesignator();
		String strSNOMEDCTID = objCardiacPhaseCID12233.getSNOMEDCTID();
		
		/**
		 * Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strCV, strCSDesg, "", strCM,strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Reference Point.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strProcedureActionID String value for Procedure Action ID
	 */
	public void setReferencePoint(int[] arrPosition, EnumCM_CardiacPhase enumCardiacPhase)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AbsoluteValuesOfVentricularMeasurements.REFERENCE_POINT.getValue();
		String strCodeValue = EnumCV_AbsoluteValuesOfVentricularMeasurements.REFERENCE_POINT_122611.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, "", "", strCSDesg, "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for End-Diastolic.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strProcedureActionID String value for Procedure Action ID
	 */
	public void setEndDiastolic(int[] arrPosition, EnumCM_CardiacPhase enumCardiacPhase)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AbsoluteValuesOfVentricularMeasurements.END_DIASTOLIC.getValue();
		String strCodeValue = EnumCV_AbsoluteValuesOfVentricularMeasurements.END_DIASTOLIC_F_32011.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		
		/**
		 * Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, "", "", strCSDesg, "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
}