/*******************************************************************************
 *  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.SourceOfVascularFinding_CID3815;
import cdac.medinfo.sdk.dcm30_04.templates.cid.StenosisShape_CID3806;
import cdac.medinfo.sdk.dcm30_04.templates.cid.StenosisTypes_CID3805;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_SourceOfVascularFinding;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StenosisProperties;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StenosisShape;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StenosisTypes;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_StenosisProperties;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Measurement_TID300;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents VascularOcclusionProperties_TID3915
 */
public class VascularOcclusionProperties_TID3915 extends Template
{
	private static final String strCM = null;
	
	/**
	 * Object of Measurement_TID300
	 */
	private Measurement_TID300 objMeasurementTID300;
		
	/**
	 * Object of StenosisTypes_CID3805
	 */
	private StenosisTypes_CID3805 objStenosisTypesCID3805;
	 	
	/**
	 * Object of StenosisShape_CID3806
	 */
	private StenosisShape_CID3806 objStenosisShapeCID3806;
	
	/**
	 * Object of SourceOfVascularFinding_CID3815
	 */
	private SourceOfVascularFinding_CID3815 objSourceOfVascularFindingCID3815;
	
	/**
	 * Instantiates a new VascularOcclusionProperties_TID3915 Template.
	 * @param objTree Object of SRTree.
	 */
	public VascularOcclusionProperties_TID3915(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 Type Of Stenosis.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setTypeOfStenosis(int[] arrPosition, EnumCM_StenosisTypes enumStenosisTypes)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StenosisProperties.TYPE_OF_STENOSIS.getValue();
		String strCodeValue = EnumCV_StenosisProperties.TYPE_OF_STENOSIS_G_D775.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objStenosisTypesCID3805)
			this.objStenosisTypesCID3805 = new StenosisTypes_CID3805();
		this.objStenosisTypesCID3805.setStenosisTypes(enumStenosisTypes);

		String strCM = objStenosisTypesCID3805.getCodeMeaning();
		String strCV = objStenosisTypesCID3805.getCodeValue();
		String strCSD = objStenosisTypesCID3805.getCodingSchemeDesignator();
		String strSNOMEDCTID = objStenosisTypesCID3805.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 Associated with.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setAssociatedWith(int[] arrPosition, EnumCM_SourceOfVascularFinding enumSourceOfVascularFinding)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StenosisProperties.ASSOCIATED_WITH.getValue();
		String strCodeValue = EnumCV_StenosisProperties.ASSOCIATED_WITH_G_C002.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objSourceOfVascularFindingCID3815)
			this.objSourceOfVascularFindingCID3815 = new SourceOfVascularFinding_CID3815();
		this.objSourceOfVascularFindingCID3815.setSourceOfVascularFinding(enumSourceOfVascularFinding);

		String strCM = objSourceOfVascularFindingCID3815.getCodeMeaning();
		String strCV = objSourceOfVascularFindingCID3815.getCodeValue();
		String strCSD = objSourceOfVascularFindingCID3815.getCodingSchemeDesignator();
		String strSNOMEDCTID = objSourceOfVascularFindingCID3815.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 Shape.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setShape(int[] arrPosition, EnumCM_StenosisShape enumStenosisShape)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StenosisProperties.SHAPE.getValue();
		String strCodeValue = EnumCV_StenosisProperties.SHAPE_G_C2FE.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objStenosisShapeCID3806)
			this.objStenosisShapeCID3806 = new StenosisShape_CID3806();
		this.objStenosisShapeCID3806.setStenosisShape(enumStenosisShape);

		String strCM = objStenosisShapeCID3806.getCodeMeaning();
		String strCV = objStenosisShapeCID3806.getCodeValue();
		String strCSD = objStenosisShapeCID3806.getCodingSchemeDesignator();
		String strSNOMEDCTID = objStenosisShapeCID3806.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);
	}
	
}
