/*******************************************************************************
 *  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.AneurysmTypes_CID3808;
import cdac.medinfo.sdk.dcm30_04.templates.cid.MinMaxMean_CID3488;
import cdac.medinfo.sdk.dcm30_04.templates.cid.SourceOfVascularFinding_CID3815;
import cdac.medinfo.sdk.dcm30_04.templates.cid.StenosisGrade_CID3832;
import cdac.medinfo.sdk.dcm30_04.templates.cid.StenosisLength_CID3831;
import cdac.medinfo.sdk.dcm30_04.templates.cid.StenosisMeasurementMethods_CID3804;
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_AneurysmProperties;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_AneurysmTypes;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_MinMaxMean;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_SourceOfVascularFinding;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StenosisGrade;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StenosisLength;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StenosisMeasurementMethods;
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_AneurysmProperties;
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 AneurysmProperties_TID3913
 */
public class AneurysmProperties_TID3913 extends Template
{
	private static final String strCM = null;
	
	/**
	 * Object of AneurysmMeasurements_TID3917
	 */
	private AneurysmMeasurements_TID3917 objAneurysmMeasurementsTID3917;
	
	/**
	 * Object of AneurysmTypes_CID3808
	 */
	private AneurysmTypes_CID3808 objAneurysmTypesCID3808;
	
	/**
	 * Object of SourceOfVascularFinding_CID3815
	 */
	private SourceOfVascularFinding_CID3815 objSourceOfVascularFindingCID3815;
		
	/**
	 * Instantiates a new AneurysmProperties_TID3913 Template.
	 * @param objTree Object of SRTree.
	 */
	public AneurysmProperties_TID3913(SRTree objTree)
	{
		super(objTree);
	}

	/**
	 * Retrieves AneurysmMeasurements.
	 * @return objAneurysmMeasurementsTID3917 Object of AneurysmMeasurements_TID3917 
	 */
	public AneurysmMeasurements_TID3917 getAneurysmMeasurements() 
	{
		if(null == this.objAneurysmMeasurementsTID3917)
			this.objAneurysmMeasurementsTID3917 = new AneurysmMeasurements_TID3917(getSRTree());
		return this.objAneurysmMeasurementsTID3917;
	}
	
	/**
	 * 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_AneurysmProperties.ASSOCIATED_WITH.getValue();
		String strCodeValue = EnumCV_AneurysmProperties.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 Associated Morphology.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue 
	 */
	public void setAssociatedMorphology(int[] arrPosition, EnumCM_AneurysmTypes enumAneurysmTypes)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StenosisProperties.DERIVATION.getValue();
		String strCodeValue = EnumCV_StenosisProperties.DERIVATION_121401.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objAneurysmTypesCID3808)
			this.objAneurysmTypesCID3808 = new AneurysmTypes_CID3808();
		this.objAneurysmTypesCID3808.setAneurysmTypes(enumAneurysmTypes);

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