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

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.MajorCoronaryArteries_CID3016;
import cdac.medinfo.sdk.dcm30_04.templates.cid.StressSymptoms_CID3220;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_MajorCoronaryArteries;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StressImagingQualityIssues;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StressImagingSummary;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StressSymptoms;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StressTestSummary;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_StressImagingSummary;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_StressTestSummary;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.NegationModifierPresenceOfFinding_TID1350;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents StressTestSummary_TID3311
 */
public class StressTestSummary_TID3311 extends Template
{		
	/**
	 * Object of MajorCoronaryArteries_CID3016
	 */
	private MajorCoronaryArteries_CID3016 objMajorCoronaryArteriesCID3016;
	
	/**
	 * Object of StressSymptoms_CID3220
	 */
	private StressSymptoms_CID3220 objStressSymptomsCID3220;
	
	/**
	 * Object of PhysiologicalSummary_TID3312
	 */
	private PhysiologicalSummary_TID3312 objPhysiologicalSummaryTID3312;
	
	/**
	 * Object of StressECGSummary_TID3313
	 */
	private StressECGSummary_TID3313 objStressECGSummaryTID3313;
	
	/**
	 * Object of StressImagingSummary_TID3317
	 */
	private StressImagingSummary_TID3317 objStressImagingSummaryTID3317;
	
	/**
	 * Object of NegationModifierPresenceOfFinding_TID1350
	 */
	private NegationModifierPresenceOfFinding_TID1350 objNegationModifierPresenceOfFindingTID1350;
	
	/**
	 * Instantiates a new StressTestSummary_TID3311 Template.
	 * @param objTree Object of SRTree.
	 */
	public StressTestSummary_TID3311(SRTree objTree)
	{
		super(objTree);
	}

	/**
	 * Retrieves Negation Modifier Presence Of Finding.
	 * @return objNegationModifierPresenceOfFindingTID1350 Object of NegationModifierPresenceOfFinding_TID1350 
	 */
	public NegationModifierPresenceOfFinding_TID1350 getNegationModifierPresenceOfFinding()
	{
		if(null == this.objNegationModifierPresenceOfFindingTID1350)
			this.objNegationModifierPresenceOfFindingTID1350 = new NegationModifierPresenceOfFinding_TID1350(getSRTree());
		return this.objNegationModifierPresenceOfFindingTID1350;
	}
	
	/**
	 * Retrieves  Stress Imaging Summary.
	 * @return objStressImagingSummaryTID3317 Object of StressImagingSummary_TID3317 
	 */
	public StressImagingSummary_TID3317 getStressImagingSummary()
	{
		if(null == this.objStressImagingSummaryTID3317)
			this.objStressImagingSummaryTID3317 = new StressImagingSummary_TID3317(getSRTree());
		return this.objStressImagingSummaryTID3317;
	}
	/**
	 * Retrieves Stress ECG Summary.
	 * @return objStressECGSummaryTID3313 Object of StressECGSummary_TID3313 
	 */
	public StressECGSummary_TID3313 getStressECGSummary()
	{
		if(null == this.objStressECGSummaryTID3313)
			this.objStressECGSummaryTID3313 = new StressECGSummary_TID3313(getSRTree());
		return this.objStressECGSummaryTID3313;
	}
	
	/**
	 * Retrieves Physiological Summary.
	 * @return objPhysiologicalSummaryTID3312 Object of PhysiologicalSummary_TID3312 
	 */
	public PhysiologicalSummary_TID3312 getPhysiologicalSummary()
	{
		if(null == this.objPhysiologicalSummaryTID3312)
			this.objPhysiologicalSummaryTID3312 = new PhysiologicalSummary_TID3312(getSRTree());
		return this.objPhysiologicalSummaryTID3312;
	}
	
	/**
	 * Sets the value for Summary.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent 
	 */
	public void setSummary(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressTestSummary.SUMMARY.getValue();
		String strCodeValue = EnumCV_StressTestSummary.SUMMARY_121111.getValue();
		String strCSD = EnumCodingSchemeDesignator.LN.getValue();

		/**
		 * Creating a node of Value Type CONTAINER and adding this node as root of a tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);

		/**
		  *Creating a node of Value Type TEXT and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem1 = getSRTree().createTextNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, "");
		getSRTree().addChild(objContentSequenceItem1);
	}
		
	/**
	 * Sets the value for Finding Site.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setFindingSite(int[] arrPosition, EnumCM_MajorCoronaryArteries enumMajorCoronaryArteries )
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressImagingSummary.FINDING_SITE.getValue();
		String strCodeValue = EnumCV_StressImagingSummary.FINDING_SITE_G_C0E3.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		
		if(null== this.objMajorCoronaryArteriesCID3016)
			this.objMajorCoronaryArteriesCID3016 = new MajorCoronaryArteries_CID3016();
		this.objMajorCoronaryArteriesCID3016.setMajorCoronaryArteries(enumMajorCoronaryArteries);

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

	/**
	 * Sets the value for Pharmacological Stress Agent Dose.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue 
	 */
	public void setPharmacologicalStressAgentDose(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressTestSummary.PHARMACOLOGICAL_STRESS_AGENT_DOSE.getValue();
		String strCodeValue = EnumCV_StressTestSummary.PHARMACOLOGICAL_STRESS_AGENT_DOSE_122715.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, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Reason for stopping test.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setReasonForDtoppingTest(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressTestSummary.REASON_FOR_STOPPING_TEST.getValue();
		String strCodeValue = EnumCV_StressTestSummary.REASON_FOR_STOPPING_TEST_G_0180.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.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, "", strCSDesg, "", "","");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Finding.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setFinding(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressTestSummary.FINDING.getValue();
		String strCodeValue = EnumCV_StressTestSummary.FINDING_121071.getValue();
		String strCSDesg = 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, "", strCSDesg, "", "","");
		getSRTree().addChild(objContentSequenceItem);
		/**
		 *Creating a node of Value Type TEXT and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem1 = getSRTree().createTextNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, "");
		getSRTree().addChild(objContentSequenceItem1);
	}
	
	/**
	 * Sets the value for Finding.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setFinding(int[] arrPosition, EnumCM_StressSymptoms enumStressSymptoms)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressTestSummary.FINDING.getValue();
		String strCodeValue = EnumCV_StressTestSummary.FINDING_121071.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objStressSymptomsCID3220)
			this.objStressSymptomsCID3220 = new StressSymptoms_CID3220();
		this.objStressSymptomsCID3220.setStressSymptoms(enumStressSymptoms);

		String strCM = objStressSymptomsCID3220.getCodeMeaning();
		String strCV = objStressSymptomsCID3220.getCodeValue();
		String strCSD = objStressSymptomsCID3220.getCodingSchemeDesignator();
		String strSNOMEDCTID = objStressSymptomsCID3220.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, strCM, strCSDesg, strCV,strCSD,strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
		
	}
	/**
	 * Sets the value for Exercise-induced angina.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setExerciseInducedAngina(int[] arrPosition, EnumCM_StressImagingQualityIssues enumStressImagingQualityIssues)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressTestSummary.EXERCISE_INDUCED_ANGINA.getValue();
		String strCodeValue = EnumCV_StressTestSummary.EXERCISE_INDUCED_ANGINA_D3_13025.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.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, "", strCSDesg, "", "","");
		getSRTree().addChild(objContentSequenceItem);
	}

}