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

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.chestcadsriodtemplates.TrackingIdentifier_TID4108;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ColonFindingOrFeatureModifier_CID6202;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ColonFindingorFeature_CID6201;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ColonCADCompositeFeature;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ColonCADDocumentRoot;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ColonFindingorFeature;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_ColonCADCompositeFeature;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_ColonCADDocumentRoot;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;
import cdac.medinfo.sdk.dcm30_04.templates.mammographycadsriodtemplates.CADAlgorithmIdentificationTemplate_TID4019;

/**
 * This class represents ColonCADDocumentRoot_TID4120 
 */
 public class ColonCADCompositeFeature_TID4125 extends Template
 {
	 /**
	* Object of ColonCADCompositeFeatureBody_TID4126
	*/
	private ColonCADCompositeFeatureBody_TID4126 objColonCADCompositeFeatureBodyTID4126;
		
	/**
	 * Object of ColonCADSingleImageFinding_TID4127
	 */
		private ColonCADSingleImageFinding_TID4127 objColonCADSingleImageFindingTID4127;
	/**
	 * Object of ColonFindingorFeature_CID6201
	 */
	private ColonFindingorFeature_CID6201 objColonFindingorFeatureCID6201;
	/**
	 * Object of ColonFindingOrFeatureModifier_CID6202
	 */
	private ColonFindingOrFeatureModifier_CID6202 objColonFindingOrFeatureModifierCID6202;
	
	/**
	 * Object of CADAlgorithmIdentification_TID4019
	 */
	private CADAlgorithmIdentificationTemplate_TID4019 objCADAlgorithmIdentificationTemplateTID4019;
	/**
	 * Object of TrackingIdentifier_TID4108
	 */
	private TrackingIdentifier_TID4108 objTrackingIdentifierTID4108;

	/**
	 * Instantiates ColonCADCompositeFeature_TID4125 Template.
	 * @param objTree Object of SRTree.
	 */
	public ColonCADCompositeFeature_TID4125(SRTree objTree)
	{
		super(objTree);
	}	
	/**
	 * Retrieves the object of Colon CAD Composite Feature Body
	 * @return objColonCADCompositeFeatureBodyTID4126 object of ColonCADCompositeFeatureBody_TID4126
	 */
	public ColonCADCompositeFeatureBody_TID4126 getColonCADCompositeFeatureBody() 
	{
		if(null == objColonCADCompositeFeatureBodyTID4126)
			objColonCADCompositeFeatureBodyTID4126 = new ColonCADCompositeFeatureBody_TID4126(getSRTree());
		return objColonCADCompositeFeatureBodyTID4126;
	}
	/**
	 * Retrieves the object of ColonCADSingleImageFinding
	 * @return objColonCADSingleImageFindingTID4127 object of ColonCADSingleImageFinding_TID4127
	 */
	public ColonCADSingleImageFinding_TID4127 getColonCADSingleImageFinding() 
	{
		if(null == objColonCADSingleImageFindingTID4127)
			objColonCADSingleImageFindingTID4127 = new ColonCADSingleImageFinding_TID4127(getSRTree());
		return objColonCADSingleImageFindingTID4127;
	}
	/**
	 * Retrieves the object of CADAlgorithmIdentification
	 * @return objCADAlgorithmIdentificationTemplateTID4019 object of CADAlgorithmIdentificationTemplate_TID4019
	 */
	public CADAlgorithmIdentificationTemplate_TID4019 getCADAlgorithmIdentification() 
	{
		if(null == objCADAlgorithmIdentificationTemplateTID4019)
			objCADAlgorithmIdentificationTemplateTID4019 = new CADAlgorithmIdentificationTemplate_TID4019(getSRTree());
		return objCADAlgorithmIdentificationTemplateTID4019;
	}
	/**
	 * Retrieves the object of Tracking Identifier
	 * @return objTrackingIdentifierTID4108 object of TrackingIdentifier_TID4108
	 */
	public TrackingIdentifier_TID4108 getTrackingIdentifier() 
	{
		if(null == objTrackingIdentifierTID4108)
			objTrackingIdentifierTID4108 = new TrackingIdentifier_TID4108(getSRTree());
		return objTrackingIdentifierTID4108;
	}
	/**
	 * Sets the value for Patient Colon CAD Report
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent 
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setColonCADReport(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ColonCADDocumentRoot.COLON_CAD_REPORT.getValue();
		String strCodeValue = EnumCV_ColonCADDocumentRoot.COLON_CAD_REPORT_112220.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 value for Composite Feature
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumColonFindingOrFeature Enumerated value for ColonFindingOrFeature
	 */
	public void setCompositeFeature(int[] arrPosition, EnumCM_ColonFindingorFeature enumColonFindingorFeature)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ColonCADCompositeFeature.COMPOSITE_FEATURE.getValue();
		String strCodeValue = EnumCV_ColonCADCompositeFeature.COMPOSITE_FEATURE_111015.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Colon Finding or Feature
		 */
		if(null== this.objColonFindingorFeatureCID6201)
			this.objColonFindingorFeatureCID6201 = new ColonFindingorFeature_CID6201();
		this.objColonFindingorFeatureCID6201.setColonFindingorFeature(enumColonFindingorFeature);

		String strCM = objColonFindingorFeatureCID6201.getCodeMeaning();
		String strCV = objColonFindingorFeatureCID6201.getCodeValue();
		String strCSD = objColonFindingorFeatureCID6201.getCodingSchemeDesignator();

		/**
		 * 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, strCSDesg, strCV, strCSD, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets value for Composite Feature Modifier.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumValue Enumerated value for ColonFindingOrFeatureModifier
	 */
	public void setCompositeFeatureModifier(int[] arrPosition, Enum enumValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ColonCADCompositeFeature.COMPOSITE_FEATURE_MODIFIER.getValue();
		String strCodeValue = EnumCV_ColonCADCompositeFeature.COMPOSITE_FEATURE_MODIFIER_112023.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Colon Finding Or Feature Modifier
		 */
		if(null== this.objColonFindingOrFeatureModifierCID6202)
			this.objColonFindingOrFeatureModifierCID6202 = new ColonFindingOrFeatureModifier_CID6202();
		this.objColonFindingOrFeatureModifierCID6202.setColonFindingOrFeatureModifier(enumValue);

		String strCM = objColonFindingOrFeatureModifierCID6202.getCodeMeaning();
		String strCV = objColonFindingOrFeatureModifierCID6202.getCodeValue();
		String strCSD = objColonFindingOrFeatureModifierCID6202.getCodingSchemeDesignator();

		/**
		 * 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, strCSDesg, strCV, strCSD, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}

}
