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

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.dicommodel.modules.SRDocumentContentModule;
import cdac.medinfo.sdk.dcm30_04.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_QuantitativeArterialAnalysisTemplate;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_QuantitativeArterialAnalysisTemplate;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.LanguageOfContentItemAndDescendants_TID1204;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.ObserverContext_TID1002;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;
import cdac.medinfo.sdk.dcm30_04.templates.hemodynamicsreporttemplates.CardiovascularPatientCharacteristics_TID3602;

/**
 * This class represents QuantitativeArterialAnalysisTemplate - TID3213
 */
public class QuantitativeArterialAnalysisTemplate_TID3213 extends Template
{
	/**
	 * Object of ObserverContext_TID1002
	 */

	private ObserverContext_TID1002 objObserverContextTID1002;
	
	/**
	 * Object of LanguageOfContentItemAndDescendants_TID1204
	 */

	private LanguageOfContentItemAndDescendants_TID1204 objLanguageOfContentItemAndDescendantsTID1204;

	/**
	 * Object of CardiovascularPatientCharacteristics_TID3602
	 */

	private CardiovascularPatientCharacteristics_TID3602 objCathPatientCharacteristicsTID3602;

	/**
	 * Object of AnalyzedSegmentTemplate_TID3214
	 */

	private AnalyzedSegmentTemplate_TID3214 objAnalyzedSegmentTemplateTID3214;

	/**
	 * Instantiates QuantitativeArterialAnalysisTemplate_TID3213 Template.
	 * @param objTree Object of SRTree.
	 */
	public QuantitativeArterialAnalysisTemplate_TID3213(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves Language Of Content Item And Descendants 
	 * 	 * @return objLanguageOfContentItemAndDescendantsTID1204 Object of LanguageOfContentItemAndDescendants_TID1204 
	 */
	public LanguageOfContentItemAndDescendants_TID1204 getLanguageOfContentItemAndDescendants() 
	{
		if(null == this.objLanguageOfContentItemAndDescendantsTID1204)
			this.objLanguageOfContentItemAndDescendantsTID1204 = new LanguageOfContentItemAndDescendants_TID1204(getSRTree());
		return this.objLanguageOfContentItemAndDescendantsTID1204;
	}
	/**
	 * Retrieves Observer Context 
	 * @return objObserverContext Object of ObserverContext_TID1002 
	 */
	public ObserverContext_TID1002 getObserverContext() 
	{
		if(null == this.objObserverContextTID1002)
			this.objObserverContextTID1002 = new ObserverContext_TID1002(getSRTree());
		return this.objObserverContextTID1002;
	}

	/**
	 * Retrieves AnalyzedSegmentTemplate 
	 * @return objAnalyzedSegmentTemplateTID3214 Object of AnalyzedSegmentTemplate_TID3214 
	 */
	public AnalyzedSegmentTemplate_TID3214 getAnalyzedSegmentTemplate() 
	{
		if(null == this.objAnalyzedSegmentTemplateTID3214)
			this.objAnalyzedSegmentTemplateTID3214 = new AnalyzedSegmentTemplate_TID3214(getSRTree());
		return this.objAnalyzedSegmentTemplateTID3214;
	}

	/**
	 * Retrieves PatientCharacteristics 
	 * @return objCathPatientCharacteristicsTID3602 Object of CardiovascularPatientCharacteristics_TID3602 
	 */
	public CardiovascularPatientCharacteristics_TID3602 getPatientCharacteristics() 
	{
		if(null == this.objCathPatientCharacteristicsTID3602)
			this.objCathPatientCharacteristicsTID3602 = new CardiovascularPatientCharacteristics_TID3602(getSRTree());
		return this.objCathPatientCharacteristicsTID3602;
	}

	/**
	 * Sets the value for Quantitative Arteriography Report
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setQuantitativeArteriographyReport(EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_QuantitativeArterialAnalysisTemplate.QUANTITATIVE_ARTERIOGRAPHY_REPORT.getValue();
		String strCodeValue = EnumCV_QuantitativeArterialAnalysisTemplate.QUANTITATIVE_ARTERIOGRAPHY_REPORT_122291.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type CONTAINER and adding this node as root of a tree.
		 */
		SRDocumentContentModule objDocumentContentModule = getSRTree().getSRDocumentContentModule();
		getSRTree().createRoot(objDocumentContentModule,strCodeMeaning,strCodeValue , strCSD, enumContinuityOfContent);
	}

	/**
	 * Sets the value for Algorithm Name
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strAlgorithmName String value for Algorithm Name.
	 */
	public void setAlgorithmName(int[] arrPosition, String strAlgorithmName)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_QuantitativeArterialAnalysisTemplate.ALGORITHM_NAME.getValue();
		String strCodeValue = EnumCV_QuantitativeArterialAnalysisTemplate.ALGORITHM_NAME_111001.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.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, strAlgorithmName);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Algorithm Version
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strAlgorithmVersion String value for Algorithm Version.
	 */
	public void setAlgorithmVersion(int[] arrPosition, String strAlgorithmVersion)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_QuantitativeArterialAnalysisTemplate.ALGORITHM_VERSION.getValue();
		String strCodeValue = EnumCV_QuantitativeArterialAnalysisTemplate.ALGORITHM_VERSION_111003.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.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, strAlgorithmVersion);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Algorithm Manufacturer
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strAlgorithmManufacturer String value for Algorithm Manufacturer.
	 */
	public void setAlgorithmManufacturer(int[] arrPosition, String strAlgorithmManufacturer)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_QuantitativeArterialAnalysisTemplate.ALGORITHM_MANUFACTURER.getValue();
		String strCodeValue = EnumCV_QuantitativeArterialAnalysisTemplate.ALGORITHM_MANUFACTURER_122405.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.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, strAlgorithmManufacturer);
		getSRTree().addChild(objContentSequenceItem);
	}
}
