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

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ConjunctiveTerms_CID3685;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ECGInterpretiveStatements_CID3686;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Modifiers_CID3683;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Probability_CID3682;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Trend_CID3684;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ConjunctiveTerms;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ECGInterpretiveStatement;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ECGInterpretiveStatements;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Modifiers;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Probability;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Trend;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_ECGInterpretiveStatement;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents ECGInterpretiveStatement - TID3718
 */
public class ECGInterpretiveStatement_TID3718 extends Template
{
	/**
	 * Object of Trend_CID3684
	 */
	private Trend_CID3684 objTrendCID3684;

	/**
	 * Object of Probability_CID3682
	 */
	private Probability_CID3682 objProbabilityCID3682;

	/**
	 * Object of ECGInterpretiveStatements_CID3686
	 */
	private ECGInterpretiveStatements_CID3686 objInterpretiveStatementsCID3686;

	/**
	 * Object of Modifiers_CID3683
	 */
	private Modifiers_CID3683 objModifiersCID3683;

	/**
	 * Object of ConjunctiveTerms_CID3685
	 */
	private ConjunctiveTerms_CID3685 objConjunctiveTermsCID3685;

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

	/**
	 * Sets value for Trend.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumTrend Enumerated value for Trend
	 */
	public void setTrend(int[] arrPosition, EnumCM_Trend enumTrend)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ECGInterpretiveStatement.TREND.getValue();
		String strCodeValue = EnumCV_ECGInterpretiveStatement.TREND_122151.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Arterial Lesion Location
		 */
		if(null== this.objTrendCID3684)
			this.objTrendCID3684 = new Trend_CID3684();
		this.objTrendCID3684.setTrend(enumTrend);

		String strCM = objTrendCID3684.getCodeMeaning();
		String strCV = objTrendCID3684.getCodeValue();
		String strCSD = objTrendCID3684.getCodingSchemeDesignator();
		String strCSV = objTrendCID3684.getCodingSchemeVersion();

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

	/**
	 * Sets value for Probability.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumProbability Enumerated value for Probability
	 */
	public void setProbability(int[] arrPosition, EnumCM_Probability enumProbability)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ECGInterpretiveStatement.PROBABILITY.getValue();
		String strCodeValue = EnumCV_ECGInterpretiveStatement.PROBABILITY_122157.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Arterial Lesion Location
		 */
		if(null== this.objProbabilityCID3682)
			this.objProbabilityCID3682 = new Probability_CID3682();
		this.objProbabilityCID3682.setProbability(enumProbability);

		String strCM = objProbabilityCID3682.getCodeMeaning();
		String strCV = objProbabilityCID3682.getCodeValue();
		String strCSD = objProbabilityCID3682.getCodingSchemeDesignator();
		String strCSV = objProbabilityCID3682.getCodingSchemeVersion();

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

	/**
	 * Sets value for Statement.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumECGInterpretiveStatements Enumerated value for Statement
	 */
	public void setStatement(int[] arrPosition, EnumCM_ECGInterpretiveStatements enumECGInterpretiveStatements)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ECGInterpretiveStatement.STATEMENT.getValue();
		String strCodeValue = EnumCV_ECGInterpretiveStatement.STATEMENT_122152.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Arterial Lesion Location
		 */
		if(null== this.objInterpretiveStatementsCID3686)
			this.objInterpretiveStatementsCID3686 = new ECGInterpretiveStatements_CID3686();
		this.objInterpretiveStatementsCID3686.setECGInterpretiveStatements(enumECGInterpretiveStatements);

		String strCM = objInterpretiveStatementsCID3686.getCodeMeaning();
		String strCV = objInterpretiveStatementsCID3686.getCodeValue();
		String strCSD = objInterpretiveStatementsCID3686.getCodingSchemeDesignator();
		String strCSV = objInterpretiveStatementsCID3686.getCodingSchemeVersion();

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

	/**
	 * Sets value for Statement Modifier.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumModifiers Modifier Enumerated value for Statement Modifier
	 */
	public void setStatementModifier(int[] arrPosition, EnumCM_Modifiers enumModifiers)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ECGInterpretiveStatement.STATEMENT_MODIFIER.getValue();
		String strCodeValue = EnumCV_ECGInterpretiveStatement.STATEMENT_MODIFIER_122153.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Arterial Lesion Location
		 */
		if(null== this.objModifiersCID3683)
			this.objModifiersCID3683 = new Modifiers_CID3683();
		this.objModifiersCID3683.setModifiers(enumModifiers);

		String strCM = objModifiersCID3683.getCodeMeaning();
		String strCV = objModifiersCID3683.getCodeValue();
		String strCSD = objModifiersCID3683.getCodingSchemeDesignator();
		String strCSV = objModifiersCID3683.getCodingSchemeVersion();

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

	/**
	 * Sets value for Conjunctive Term.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumConjunctiveTerms Modifier Enumerated value for Conjunctive Term
	 */
	public void setConjunctiveTerm(int[] arrPosition, EnumCM_ConjunctiveTerms enumConjunctiveTerms)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ECGInterpretiveStatement.CONJUNCTIVE_TERM.getValue();
		String strCodeValue = EnumCV_ECGInterpretiveStatement.CONJUNCTIVE_TERM_122154.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Arterial Lesion Location
		 */
		if(null== this.objConjunctiveTermsCID3685)
			this.objConjunctiveTermsCID3685 = new ConjunctiveTerms_CID3685();
		this.objConjunctiveTermsCID3685.setConjunctiveTerms(enumConjunctiveTerms);

		String strCM = objConjunctiveTermsCID3685.getCodeMeaning();
		String strCV = objConjunctiveTermsCID3685.getCodeValue();
		String strCSD = objConjunctiveTermsCID3685.getCodingSchemeDesignator();
		String strCSV = objConjunctiveTermsCID3685.getCodingSchemeVersion();

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


}
