/*******************************************************************************
 *  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.LesionMargin_CID3715;
import cdac.medinfo.sdk.dcm30_04.templates.cid.PlaqueStructures_CID3802;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_FlowQuantification;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_LesionMargin;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PlaqueProperties;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PlaqueStructures;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_FlowQuantification;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_PlaqueProperties;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Measurement_TID300;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents FlowQuantification_TID3910
 */
public class FlowQuantification_TID3910  extends Template
{
	private static final String strCM = null;
	
	/**
	 * Object of CardiovascularAnalysisObservationContext_TID3929
	 */
	private CardiovascularAnalysisObservationContext_TID3929 objCardiovascularAnalysisObservationContextTID3929;
	
	/**
	 * Object of Measurement_TID300
	 */
	private Measurement_TID300 objMeasurementTID300;
		
	/**
	 * Object of PlaqueStructures_CID3802
	 */
	private PlaqueStructures_CID3802 objPlaqueStructuresCID3802;
	
	/**
	 * Object of LesionMargin_CID3715
	 */
	private LesionMargin_CID3715 objLesionMarginCID3715;
	
	/**
	 * Instantiates a new FlowQuantification_TID3910 Template.
	 * @param objTree Object of SRTree.
	 */
	public FlowQuantification_TID3910(SRTree objTree)
	{
		super(objTree);
	}

	/**
	 * Retrieves Cardiovascular Analysis Observation Context.
	 * @return objCardiovascularAnalysisObservationContextTID3929 Object of CardiovascularAnalysisObservationContext_TID3929 
	 */
	public CardiovascularAnalysisObservationContext_TID3929 getCardiovascularAnalysisObservationContext() 
	{
		if(null == this.objCardiovascularAnalysisObservationContextTID3929)
			this.objCardiovascularAnalysisObservationContextTID3929 = new CardiovascularAnalysisObservationContext_TID3929(getSRTree());
		return this.objCardiovascularAnalysisObservationContextTID3929;
	}
	
	/**
	 * 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 Morphological Abnormal Structure.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setMorphologicalAbnormalStructure(int[] arrPosition, EnumCM_PlaqueStructures enumPlaqueStructures)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PlaqueProperties.MORPHOLOGICAL_ABNORMAL_STRUCTURE.getValue();
		String strCodeValue = EnumCV_PlaqueProperties.MORPHOLOGICAL_ABNORMAL_STRUCTURE_M_01000.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objPlaqueStructuresCID3802)
			this.objPlaqueStructuresCID3802 = new PlaqueStructures_CID3802();
		this.objPlaqueStructuresCID3802.setPlaqueStructures(enumPlaqueStructures);

		String strCM = objPlaqueStructuresCID3802.getCodeMeaning();
		String strCV = objPlaqueStructuresCID3802.getCodeValue();
		String strCSD = objPlaqueStructuresCID3802.getCodingSchemeDesignator();
		String strSNOMEDCTID = objPlaqueStructuresCID3802.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, strCSDesg, strCM ,strCV, strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Margin.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setMargin(int[] arrPosition, EnumCM_LesionMargin enumLesionMargin)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PlaqueProperties.MARGIN.getValue();
		String strCodeValue = EnumCV_PlaqueProperties.MARGIN_G_A428.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objLesionMarginCID3715)
			this.objLesionMarginCID3715 = new LesionMargin_CID3715();
		this.objLesionMarginCID3715.setLesionMargin(enumLesionMargin);

		String strCM = objLesionMarginCID3715.getCodeMeaning();
		String strCV = objLesionMarginCID3715.getCodeValue();
		String strCSD = objLesionMarginCID3715.getCodingSchemeDesignator();
		String strSNOMEDCTID = objLesionMarginCID3715.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, strCSDesg, strCM ,strCV, strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Findings.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree. 
	 * @param enumContinuityOfContent 
	 */
	public void setFindings(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_FlowQuantification.FINDINGS.getValue();
		String strCodeValue = EnumCV_FlowQuantification.FINDINGS_121070.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 Analysis Performed.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strValue 
	 */
	public void setAnalysisPerformed(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_FlowQuantification.ANALYSIS_PERFORMED.getValue();
		String strCodeValue = EnumCV_FlowQuantification.ANALYSIS_PERFORMED_111004.getValue();
		String strCSD = 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, strCSD, "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Flow Quantification.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param string 
	 */
	public void setFlowQuantification(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_FlowQuantification.FLOW_QUANTIFICATION.getValue();
		String strCodeValue = EnumCV_FlowQuantification.FLOW_QUANTIFICATION_122604.getValue();
		String strCSD = 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, strCSD, "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Start Time.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strValue 
	 */
	public void setStartTime(int[] arrPosition, String strValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_FlowQuantification.START_TIME.getValue();
		String strCodeValue = EnumCV_FlowQuantification.START_TIME_G_D321.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 *Creating a node of Value Type DATETIME and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createDateTimeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strValue);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Stop Time.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strValue 
	 */
	public void setStopTime(int[] arrPosition, String strValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_FlowQuantification.STOP_TIME.getValue();
		String strCodeValue = EnumCV_FlowQuantification.STOP_TIME_G_D320.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 *Creating a node of Value Type DATETIME and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createDateTimeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strValue);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Velocity Encoding Minimum Value.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree. 
	 * @param arrNumericValue 
	 */
	public void setVelocityEncodingMinimumValue(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_FlowQuantification.VELOCITY_ENCODING_MINIMUM_VALUE.getValue();
		String strCodeValue = EnumCV_FlowQuantification.VELOCITY_ENCODING_MINIMUM_VALUE_122642.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 *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, "", "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Velocity Encoding Maximum Value.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree. 
	 * @param arrNumericValue 
	 */
	public void setVelocityEncodingMaximumValue(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_FlowQuantification.VELOCITY_ENCODING_MAXIMUM_VALUE.getValue();
		String strCodeValue = EnumCV_FlowQuantification.VELOCITY_ENCODING_MAXIMUM_VALUE_122643.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 *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, "", "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Measurement Group.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree. 
	 * @param enumContinuityOfContent 
	 */
	public void setMeasurementGroup(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_FlowQuantification.MEASUREMENT_GROUP.getValue();
		String strCodeValue = EnumCV_FlowQuantification.MEASUREMENT_GROUP_125007.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 Finding Site.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree. 
	 * @param strValue 
	 */
	public void setFindingSite(int[] arrPosition, String strValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_FlowQuantification.FINDING_SITE.getValue();
		String strCodeValue = EnumCV_FlowQuantification.FINDING_SITE_G_C0E3.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 *Creating a node of Value Type TEXT and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createTextNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strValue);
		getSRTree().addChild(objContentSequenceItem);
		
		/**
		 *Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem1 = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, "", "", "", "");
		getSRTree().addChild(objContentSequenceItem1);
	}

}
