/*******************************************************************************
 *  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.cid.CatheterSizeUnits_CID3510;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacOutputMeasurementByIndicatorDilution;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CatheterSizeUnits;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_CardiacOutputMeasurementByIndicatorDilution;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Measurement_TID300;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents CardiacOutputMeasurementByIndicatorDilution - TID3515
 */
public class CardiacOutputMeasurementByIndicatorDilution_TID3515 extends Template
{
	/**
	 * Object of Measurement_TID300
	 */
	private Measurement_TID300 objMeasurementTID300;
	/**
	 * Object of CatheterSizeUnits_CID3510
	 */
	private CatheterSizeUnits_CID3510 objCatheterSizeUnitsCID3510;

	/**
	 * Instantiates a new CardiacOutputMeasurementByIndicatorDilution_TID3515 Template.
	 * @param objTree Object of SRTree.
	 */
	public CardiacOutputMeasurementByIndicatorDilution_TID3515(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;
	}
	/**
	 * Sets the value for Cardiac Output measurement
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setCardiacOutputMeasurement(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacOutputMeasurementByIndicatorDilution.CARDIAC_OUTPUT_MEASUREMENT.getValue();
		String strCodeValue = EnumCV_CardiacOutputMeasurementByIndicatorDilution.CARDIAC_OUTPUT_MEASUREMENT_P2_34201.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Creating a node of Value Type UIDREF 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 Catheter Size
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 * @param enumCatheterSizeUnits Enumerated value for Catheter Size Units
	 */
	public void setCatheterSize(int[] arrPosition,EnumCM_CatheterSizeUnits enumCatheterSizeUnits, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacOutputMeasurementByIndicatorDilution.CATHETER_SIZE.getValue();
		String strCodeValue = EnumCV_CardiacOutputMeasurementByIndicatorDilution.CATHETER_SIZE_122319.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objCatheterSizeUnitsCID3510)
			this.objCatheterSizeUnitsCID3510 = new CatheterSizeUnits_CID3510();
		this.objCatheterSizeUnitsCID3510.setCatheterSizeUnits(enumCatheterSizeUnits);

		String strCMUnit = objCatheterSizeUnitsCID3510.getCodeMeaning();
		String strCVUnit = objCatheterSizeUnitsCID3510.getCodeValue();
		String strCSDUnit = objCatheterSizeUnitsCID3510.getCodingSchemeDesignator();

		/**
		 * Creating a node of Value Type NUM and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVUnit,strCSDUnit,"",strCMUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Injectate Temperature.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setInjectateTemperature(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.CEL.getValue();
		String strCVForUnit = EnumCV_Unit.CEL.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacOutputMeasurementByIndicatorDilution.INJECTATE_TEMPERATURE.getValue();
		String strCodeValue = EnumCV_CardiacOutputMeasurementByIndicatorDilution.INJECTATE_TEMPERATURE_122320.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Injectate Volume.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setInjectateVolume(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.ML.getValue();
		String strCVForUnit = EnumCV_Unit.ML.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacOutputMeasurementByIndicatorDilution.INJECTATE_VOLUME.getValue();
		String strCodeValue = EnumCV_CardiacOutputMeasurementByIndicatorDilution.INJECTATE_VOLUME_122321.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Calibration Factor.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setCalibrationFactor(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.NOUNITS.getValue();
		String strCVForUnit = EnumCV_Unit.NOUNITS.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacOutputMeasurementByIndicatorDilution.CALIBRATION_FACTOR.getValue();
		String strCodeValue = EnumCV_CardiacOutputMeasurementByIndicatorDilution.CALIBRATION_FACTOR_122322.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
}
