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

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.cid.ContourRealignment_CID3458;
import cdac.medinfo.sdk.dcm30_04.templates.cid.MyocardialWallSegmentsInProjection_CID3718;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ContourRealignment;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_EV;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_MyocardialWallSegmentsInProjection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RadialBasedWallMotionTemplate;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_EV;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_RadialBasedWallMotionTemplate;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Measurement_TID300;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents RadialBasedWallMotionTemplate - TID3210
 */
public class RadialBasedWallMotionTemplate_TID3210 extends Template
{
	/**
	 * Object of Measurement_TID300
	 */
	private Measurement_TID300 objMeasurementTID300;
	/**
	 * Object of ContourRealignment_CID3458
	 */
	private ContourRealignment_CID3458 objContourRealignmentCID3458;

	/**
	 * Object of MyocardialWallSegmentsInProjection_CID3718
	 */
	private MyocardialWallSegmentsInProjection_CID3718 objWallSegmentsInProjectionCID3718;

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

	/**
	 * Retrieves Measurement 
	 * @return objMeasurementID300 Object of Measurement_TID300 
	 */
	public Measurement_TID300 getMeasurement() 
	{
		if(null == this.objMeasurementTID300)
			this.objMeasurementTID300 = new Measurement_TID300(getSRTree());
		return this.objMeasurementTID300;
	}
	/**
	 * Sets the value for Findings
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setFindings(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadialBasedWallMotionTemplate.FINDINGS.getValue();
		String strCodeValue = EnumCV_RadialBasedWallMotionTemplate.FINDINGS_121070.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type UIDREF and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Procedure Reported.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setProcedureReported(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = EnumCM_EV.RADIAL_BASED_WALL_MOTION_ANALYSIS.getValue();
		String strCV = EnumCV_EV.RADIAL_BASED_WALL_MOTION_ANALYSIS_122493.getValue();
		String strCSD1 = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadialBasedWallMotionTemplate.PROCEDURE_REPORTED.getValue();
		String strCodeValue = EnumCV_RadialBasedWallMotionTemplate.PROCEDURE_REPORTED_121058.getValue();
		String strCSD2 = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * 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 , strCSD2, strCV, strCSD1, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Analysis Performed.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setAnalysisPerformed(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = EnumCM_EV.RADIAL_BASED_WALL_MOTION_ANALYSIS.getValue();
		String strCV = EnumCV_EV.RADIAL_BASED_WALL_MOTION_ANALYSIS_122493.getValue();
		String strCSD1 = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadialBasedWallMotionTemplate.ANALYSIS_PERFORMED.getValue();
		String strCodeValue = EnumCV_RadialBasedWallMotionTemplate.ANALYSIS_PERFORMED_111004.getValue();
		String strCSD2 = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * 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 , strCSD2, strCV, strCSD1, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Radial Based Wall Motion Analysis
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setRadialBasedWallMotionAnalysis(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = EnumCM_EV.RADIAL_BASED_WALL_MOTION_ANALYSIS.getValue();
		String strCV = EnumCV_EV.RADIAL_BASED_WALL_MOTION_ANALYSIS_122493.getValue();
		String strCSD1 = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadialBasedWallMotionTemplate.RADIAL_BASED_WALL_MOTION_ANALYSIS.getValue();
		String strCodeValue = EnumCV_RadialBasedWallMotionTemplate.RADIAL_BASED_WALL_MOTION_ANALYSIS_122493.getValue();
		String strCSD2 = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * 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 , strCSD2, strCV, strCSD1, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets value for Contour Realignment.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContourRealignment Enumerated value for Contour Realignment.
	 */
	public void setContourRealignment(int[] arrPosition, EnumCM_ContourRealignment enumContourRealignment)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadialBasedWallMotionTemplate.CONTOUR_REALIGNMENT.getValue();
		String strCodeValue = EnumCV_RadialBasedWallMotionTemplate.CONTOUR_REALIGNMENT_122410.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Contour Realignmen
		 */
		if(null== this.objContourRealignmentCID3458)
			this.objContourRealignmentCID3458 = new ContourRealignment_CID3458();
		this.objContourRealignmentCID3458.setContourRealignment(enumContourRealignment);

		String strCM = objContourRealignmentCID3458.getCodeMeaning();
		String strCV = objContourRealignmentCID3458.getCodeValue();
		String strCSD = objContourRealignmentCID3458.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 Finding Site.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumMyocardialWallSegmentsInProjection Enumerated value for Finding Site.
	 */
	public void setFindingSite(int[] arrPosition, EnumCM_MyocardialWallSegmentsInProjection enumMyocardialWallSegmentsInProjection)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadialBasedWallMotionTemplate.FINDING_SITE.getValue();
		String strCodeValue = EnumCV_RadialBasedWallMotionTemplate.FINDING_SITE_G_C03E.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Finding Site
		 */
		if(null== this.objWallSegmentsInProjectionCID3718)
			this.objWallSegmentsInProjectionCID3718 = new MyocardialWallSegmentsInProjection_CID3718();
		this.objWallSegmentsInProjectionCID3718.setMyocardialWallSegmentsInProjection(enumMyocardialWallSegmentsInProjection);

		String strCM = objWallSegmentsInProjectionCID3718.getCodeMeaning();
		String strCV = objWallSegmentsInProjectionCID3718.getCodeValue();
		String strCSD = objWallSegmentsInProjectionCID3718.getCodingSchemeDesignator();
		String strSNOMEDCTID = objWallSegmentsInProjectionCID3718.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,strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}
}
