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

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.VascularSummary_CID12101;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_VascularProcedureSummarySection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_VascularSummary;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_VascularProcedureSummarySection;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents VascularProcedureSummarySection - TID5102
 */
public class VascularProcedureSummarySection_TID5102 extends Template
{
	/**
	 * Object of VascularSummary_CID12101
	 */
	private VascularSummary_CID12101 objVascularSummaryCID12101;
	
	/**
	 * Instantiates VascularProcedureSummarySection_TID5102 Template.
	 * @param objTree Object of SRTree.
	 */
	public VascularProcedureSummarySection_TID5102(SRTree objTree)
	{
		super(objTree);
	}
	
	/**
	 * Sets the value for Summary
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setSummary(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VascularProcedureSummarySection.SUMMARY.getValue();
		String strCodeValue = EnumCV_VascularProcedureSummarySection.SUMMARY_121111.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 Vascular Summary
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strVascularSummary String value for Vascular Summary.
	 */
	public void setVascularSummary(int[] arrPosition, String strVascularSummary, EnumCM_VascularSummary enumVascularSummary)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objVascularSummaryCID12101)
	this.objVascularSummaryCID12101 = new VascularSummary_CID12101();
		this.objVascularSummaryCID12101.setVascularSummary(enumVascularSummary);
		
		String strCodeMeaning = objVascularSummaryCID12101.getCodeMeaning();
		String strCodeValue = objVascularSummaryCID12101.getCodeValue();
		String strCSD = objVascularSummaryCID12101.getCodingSchemeDesignator();
		
		/**
		 * 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, strVascularSummary);
		getSRTree().addChild(objContentSequenceItem);
	}
	
}
