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

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.CADProcessingAndFindingsSummary_CID6047;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CADProcessingAndFindingsSummary;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_MammographyCADOverallImpressionRecommendationTemplate;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_MammographyCADOverallImpressionRecommendationTemplate;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents MammographyCADOverallImpressionRecommendationTemplate - TID4001
 */
public class MammographyCADOverallImpressionRecommendationTemplate_TID4001 extends Template
{
	/**
	 * Object of CADProcessingAndFindingsSummary_CID6047
	 */
	private CADProcessingAndFindingsSummary_CID6047 objCadProcessingAndFindingsSummaryCID6047;

	/**
	 * Object of MammographyCADImpressionRecommendationBodyTemplate_TID4002
	 */

	private MammographyCADImpressionRecommendationBodyTemplate_TID4002 objRecommendationBodyTemplateTID4002;

	/**
	 * Object of MammographyCADIndividualImpressionRecommendationTemplate_TID4003
	 */

	private MammographyCADIndividualImpressionRecommendationTemplate_TID4003 objMammographyCADIndividualImpressionRecommendationTemplateTID4003;

	/**
	 * Instantiates a new MammographyCADOverallImpressionRecommendationTemplate_TID4001 Template.
	 * @param objTree Object of SRTree.
	 */
	public MammographyCADOverallImpressionRecommendationTemplate_TID4001(SRTree objTree)
	{
		super(objTree);
	}

	/**
	 * Retrieves CADAlgorithmIdentificationTemplate 
	 * @return objRecommendationBodyTemplateTID4002 Object of MammographyCADImpressionRecommendationBodyTemplate_TID4002 
	 */
	public MammographyCADImpressionRecommendationBodyTemplate_TID4002 getMammographyCADImpressionRecommendationBodyTemplate() 
	{
		if(null == this.objRecommendationBodyTemplateTID4002)
			this.objRecommendationBodyTemplateTID4002 = new MammographyCADImpressionRecommendationBodyTemplate_TID4002(getSRTree());
		return this.objRecommendationBodyTemplateTID4002;
	}

	/**
	 * Retrieves MammographyCADIndividualImpressionRecommendationTemplate 
	 * @return objMammographyCADIndividualImpressionRecommendationTemplateTID4003 Object of MammographyCADIndividualImpressionRecommendationTemplate_TID4003 
	 */
	public MammographyCADIndividualImpressionRecommendationTemplate_TID4003 getMammographyCADIndividualImpressionRecommendationTemplate() 
	{
		if(null == this.objMammographyCADIndividualImpressionRecommendationTemplateTID4003)
			this.objMammographyCADIndividualImpressionRecommendationTemplateTID4003 = new MammographyCADIndividualImpressionRecommendationTemplate_TID4003(getSRTree());
		return this.objMammographyCADIndividualImpressionRecommendationTemplateTID4003;
	}

	/**
	 * Sets value for Breast composition.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumCADProcessingAndFindingsSummary Enumerated value for CADProcessingAndFindingsSummary
	 */
	public void setCADProcessingAndFindingsSummary(int[] arrPosition, EnumCM_CADProcessingAndFindingsSummary enumCADProcessingAndFindingsSummary)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_MammographyCADOverallImpressionRecommendationTemplate.CAD_PROCESSING_AND_FINDINGS_SUMMARY.getValue();
		String strCodeValue = EnumCV_MammographyCADOverallImpressionRecommendationTemplate.CAD_PROCESSING_AND_FINDINGS_SUMMARY_111017.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Assessment Category
		 */
		if(null== this.objCadProcessingAndFindingsSummaryCID6047)
			this.objCadProcessingAndFindingsSummaryCID6047 = new CADProcessingAndFindingsSummary_CID6047();
		this.objCadProcessingAndFindingsSummaryCID6047.setCADProcessingAndFindingsSummary(enumCADProcessingAndFindingsSummary);

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