/*******************************************************************************
 *  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.EnumGraphicType;
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.cid.IntendedUseOfCADOutput_CID6034;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ColonCADSingleImageFinding;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ColonFindingorFeature;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_IntendedUseOfCADOutput;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_ColonCADSingleImageFinding;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;
import cdac.medinfo.sdk.dcm30_04.templates.mammographycadsriodtemplates.CADAlgorithmIdentificationTemplate_TID4019;
import cdac.medinfo.sdk.dcm30_04.templates.mammographycadsriodtemplates.CADImageQualityTemplate_TID4014;
import cdac.medinfo.sdk.dcm30_04.templates.mammographycadsriodtemplates.CADObservationContextTemplate_TID4022;

/**
 * This class represents ColonCADSingleImageFinding_TID4127 
 */
public class ColonCADSingleImageFinding_TID4127 extends Template{
	
	/**
	 * Object of ColonFindingOrFeature_CID6201
	 */
	private ColonFindingorFeature_CID6201 objColonFindingorFeatureCID6201;
	/**
	 * Object of ColonFindingorFeatureModifier_CID6202
	 */
	private ColonFindingOrFeatureModifier_CID6202 objColonFindingorFeatureModifierCID6202;
	/**
	 * Object of IntendedUseOfCADOutput_CID6034
	 */
	private IntendedUseOfCADOutput_CID6034 objIntendedUseOfCADOutputCID6034;	
	/**
	 * Object of TrackingIdentifier_TID4108
	 */
	private TrackingIdentifier_TID4108 objTrackingIdentifierTID4108;
	/**
	 * Object of  CADImageQualityTemplate_TID4014
	 */
	private CADImageQualityTemplate_TID4014 objCADImageQualityTemplateTID4014;
	/**
	 * Object of  CADObservationContextTemplate_TID4022
	 */
	private CADObservationContextTemplate_TID4022 objCADObservationContextTemplateTID4022;
	/**
	 * Object of ColonCADDescriptors_TID4128
	 */
	private ColonCADDescriptors_TID4128 objColonCADDescriptorsTID4128;
	
	/**
	 * Object of  ColonCADGeometry_TID4129
	 */
	private ColonCADGeometry_TID4129 objColonCADGeometryTID4129;
	
	/**
	 * Object of  CADAlgorithmIdentificationTemplate_TID4019
	 */
	private CADAlgorithmIdentificationTemplate_TID4019 objCADAlgorithmIdentificationTemplateTID4019;
		

	/**
	 * Instantiates ColonCADCompositeFeatureBody_TID4126 Template.
	 * @param objTree Object of SRTree.
	 */
	public ColonCADSingleImageFinding_TID4127(SRTree objTree)
	{
		super(objTree);
	}
	
	/**
	 * Retrieves the object of CADImageQualityTemplate.
	 * @return objCADImageQualityTemplateTID4014 object of CADImageQualityTemplate_TID4014
	 */
	public CADImageQualityTemplate_TID4014 getCADImageQualityTemplate() 
	{
		if(null == objCADImageQualityTemplateTID4014)
			objCADImageQualityTemplateTID4014 = new CADImageQualityTemplate_TID4014(getSRTree());
		return objCADImageQualityTemplateTID4014;
	}
	/**
	 * Retrieves the object of CADAlgorithmIdentificationTamplate.
	 * @return objCADAlgorithmIdentificationTemplateTID4019 object of CADAlgorithmIdentificationTemplate_TID4019
	 */
	public CADAlgorithmIdentificationTemplate_TID4019 getCADAlgorithmIdentificationTemplate() 
	{
		if(null == objCADAlgorithmIdentificationTemplateTID4019)
			objCADAlgorithmIdentificationTemplateTID4019 = new CADAlgorithmIdentificationTemplate_TID4019(getSRTree());
		return objCADAlgorithmIdentificationTemplateTID4019;
	}
	/**
	 * Retrieves the object of ColonCADDescriptors
	 * @return objColonCADDescriptorsTID4128 object of ColonCADDescriptors_TID4128
	 */
	public ColonCADDescriptors_TID4128 getColonCADDescriptors() 
	{
		if(null == objColonCADDescriptorsTID4128)
			objColonCADDescriptorsTID4128 = new ColonCADDescriptors_TID4128(getSRTree());
		return objColonCADDescriptorsTID4128;
	}
	/**
	 * Retrieves the object of ColonCADGeometry
	 * @return objColonCADGeometryTID4129 object of ColonCADGeometry_TID4129
	 */
	public ColonCADGeometry_TID4129 getColonCADGeometry() 
	{
		if(null == objColonCADGeometryTID4129)
			objColonCADGeometryTID4129 = new ColonCADGeometry_TID4129(getSRTree());
		return objColonCADGeometryTID4129;
	}
	/**
	 * Retrieves the object of TrackingIdentifier
	 * @return objTrackingIdentifierTID4108 object of TrackingIdentifier_TID4108
	 */
	public TrackingIdentifier_TID4108 getTrackingIdentifier() 
	{
		if(null == objTrackingIdentifierTID4108)
			objTrackingIdentifierTID4108 = new TrackingIdentifier_TID4108(getSRTree());
		return objTrackingIdentifierTID4108;
	}	
	/**
	 * Retrieves the object of objCADObservationContextTemplate.
	 * @return objCADObservationContextTemplateTID4022 object of CADObservationContextTemplate_TID4022
	 */
	public CADObservationContextTemplate_TID4022 getCADObservationContext() 
	{
		if(null == objCADObservationContextTemplateTID4022)
			objCADObservationContextTemplateTID4022 = new CADObservationContextTemplate_TID4022(getSRTree());
		return objCADObservationContextTemplateTID4022;
	}	
	/**
	 * Sets the value for Selected Region Description
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strValue 
	 * @param arrNumericValue 
	 * @param strCSVForNumValQuaCodeSQ 
	 * @param "" 
	 */
	public void setSelectedRegionDescription(int[] arrPosition, String strValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ColonCADSingleImageFinding.SELECTED_REGION_DESCRIPTION.getValue();
		String strCodeValue = EnumCV_ColonCADSingleImageFinding.SELECTED_REGION_DESCRIPTION_111058.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, strValue);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Image Region
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strValue 
	 * @param arrFlGraphicData 
	 * @param enumGraphicType 
	 * @param arrNumericValue 
	 * @param strCSVForNumValQuaCodeSQ 
	 * @param "" 
	 */
	public void setImageRegion(int[] arrPosition, String strValue, float[] arrFlGraphicData, EnumGraphicType enumGraphicType)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ColonCADSingleImageFinding.IMAGE_REGION.getValue();
		String strCodeValue = EnumCV_ColonCADSingleImageFinding.IMAGE_REGION_111030.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type SCOORD and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createSCOORDNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, arrFlGraphicData, enumGraphicType);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets value for Certainty of Finding 
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue 
	 * @param strCodeValueForUnitSQ 
	 * @param "" 
	 */
	public void setCertaintyOfFinding(int[] arrPosition, String[] arrNumericValue, String strCodeValueForUnitSQ)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ColonCADSingleImageFinding.CERTAINTY_OF_FINDING.getValue();
		String strCodeValue = EnumCV_ColonCADSingleImageFinding.CERTAINTY_OF_FINDING_111012.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type NUM and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, arrNumericValue, strCodeValueForUnitSQ, "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets value for CAD Operating Point 
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue 
	 * @param strCodeValueForUnitSQ 
	 * @param "" 
	 */
	public void setCADOperatingPoint(int[] arrPosition, String[] arrNumericValue, String strCodeValueForUnitSQ)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ColonCADSingleImageFinding.CAD_OPERATING_POINT.getValue();
		String strCodeValue = EnumCV_ColonCADSingleImageFinding.CAD_OPERATING_POINT_111071.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type NUM and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, arrNumericValue, strCodeValueForUnitSQ, "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets value for Rendering Intent.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumIntendedUseOfCADOutput Enumerated value for IntendedUseOfCADOutput
	 */
	public void setRenderingIntent(int[] arrPosition, EnumCM_IntendedUseOfCADOutput enumIntendedUseOfCADOutput)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ColonCADSingleImageFinding.RENDERING_INTENT.getValue();
		String strCodeValue = EnumCV_ColonCADSingleImageFinding.RENDERING_INTENT_111056.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Intended Use Of CAD Output
		 */
		if(null== this.objIntendedUseOfCADOutputCID6034)
			this.objIntendedUseOfCADOutputCID6034 = new IntendedUseOfCADOutput_CID6034();
		this.objIntendedUseOfCADOutputCID6034.setIntendedUseOfCADOutput(enumIntendedUseOfCADOutput);

		String strCM = objIntendedUseOfCADOutputCID6034.getCodeMeaning();
		String strCV = objIntendedUseOfCADOutputCID6034.getCodeValue();
		String strCSD = objIntendedUseOfCADOutputCID6034.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 Qualitative Difference.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumValue Enumerated value for ColonFindingOrFeatureModifier
	 */
	public void setSingleImageFindingModifier(int[] arrPosition, Enum enumValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ColonCADSingleImageFinding.SINGLE_IMAGE_FINDING_MODIFIER.getValue();
		String strCodeValue = EnumCV_ColonCADSingleImageFinding.SINGLE_IMAGE_FINDING_MODIFIER_112024.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for ColonFindingorFeatureModifier
		 */
		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();
		//String strSNOMEDCTID = objColonFindingOrFeatureModifierCID6202.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, strCSDesg, strCV, strCSD, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets value for Single SingleImageFinding
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumColonFindingOrFeature Enumerated value for Colon Finding Or Feature
	 * @param strCodeValueForCode 
	 */
	public void setSingleImageFinding(int[] arrPosition, EnumCM_ColonFindingorFeature enumColonFindingorFeature)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ColonCADSingleImageFinding.SINGLE_IMAGE_FINDING.getValue();
		String strCodeValue = EnumCV_ColonCADSingleImageFinding.SINGLE_IMAGE_FINDING_111059.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		/**
		 * Setting value for ColonFindingOrFeature
		 */
		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();
		String strSNOMEDCTID = objColonFindingorFeatureCID6201.getSNOMEDCTID();

		/**
		 * Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCM, strCV, strCSD, "",strCodeMeaning, strCodeValue, strCSDesg,strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}
}
