/*******************************************************************************
 *  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.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.StentComposition_CID3814;
import cdac.medinfo.sdk.dcm30_04.templates.cid.StentFindings_CID3813;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StentComposition;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StentFindings;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StentProperties;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_StentProperties;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents StentProperties_TID3916
 */
public class StentProperties_TID3916 extends Template
{
	private static final String strCM = null;
	
	/**
	 * Object of StenosisProperties_TID3912
	 */
	private StenosisProperties_TID3912 objStenosisPropertiesTID3912;
	 	
	/**
	 * Object of StentFindings_CID3813
	 */
	private StentFindings_CID3813 objStentFindingsCID3813;
	
	/**
	 * Object of StentComposition_CID3814
	 */
	private StentComposition_CID3814 objStentCompositionCID3814;
	
	/**
	 * Instantiates a new StentProperties_TID3916 Template.
	 * @param objTree Object of SRTree.
	 */
	public StentProperties_TID3916(SRTree objTree)
	{
		super(objTree);
	}

	/**
	 * Retrieves Stenosis Properties.
	 * @return objStenosisPropertiesTID3912 Object of StenosisProperties_TID3912 
	 */
	public StenosisProperties_TID3912 getStenosisProperties() 
	{
		if(null == this.objStenosisPropertiesTID3912)
			this.objStenosisPropertiesTID3912 = new StenosisProperties_TID3912(getSRTree());
		return this.objStenosisPropertiesTID3912;
	}
	
		
	/**
	 * Sets the value for Stent Composition.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setStentComposition(int[] arrPosition, EnumCM_StentComposition enumStentComposition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StentProperties.STENT_COMPOSITION.getValue();
		String strCodeValue = EnumCV_StentProperties.STENT_COMPOSITION_122685.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objStentCompositionCID3814)
			this.objStentCompositionCID3814 = new StentComposition_CID3814();
		this.objStentCompositionCID3814.setStentComposition(enumStentComposition);

		String strCM = objStentCompositionCID3814.getCodeMeaning();
		String strCV = objStentCompositionCID3814.getCodeValue();
		String strCSD = objStentCompositionCID3814.getCodingSchemeDesignator();
		String strSNOMEDCTID = objStentCompositionCID3814.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 Finding.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setFinding(int[] arrPosition, EnumCM_StentFindings enumStentFindings)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StentProperties.FINDING.getValue();
		String strCodeValue = EnumCV_StentProperties.FINDING_121071.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objStentFindingsCID3813)
			this.objStentFindingsCID3813 = new StentFindings_CID3813();
		this.objStentFindingsCID3813.setStentFindings(enumStentFindings);

		String strCM = objStentFindingsCID3813.getCodeMeaning();
		String strCV = objStentFindingsCID3813.getCodeValue();
		String strCSD = objStentFindingsCID3813.getCodingSchemeDesignator();
		String strSNOMEDCTID = objStentFindingsCID3813.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 Vascular Stent Length.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue 
	 */
	public void setVascularStentLength(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StentProperties.VASCULAR_STENT_LENGTH.getValue();
		String strCodeValue = EnumCV_StentProperties.VASCULAR_STENT_LENGTH_R_101B0.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().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, arrNumericValue, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Vascular Stent Diameter.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue 
	 */
	public void setVascularStentDiameter(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StentProperties.VASCULAR_STENT_DIAMETER.getValue();
		String strCodeValue = EnumCV_StentProperties.VASCULAR_STENT_DIAMETER_R_101AD.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().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, arrNumericValue, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	
}
