/*******************************************************************************
 *  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.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.CardiacRhythms_CID3415;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ECGFindings_CID3230;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ECGPatientStateValues_CID3262;
import cdac.medinfo.sdk.dcm30_04.templates.cid.EctopicBeatMorphology_CID3234;
import cdac.medinfo.sdk.dcm30_04.templates.cid.RestStress_CID3102;
import cdac.medinfo.sdk.dcm30_04.templates.cid.STSegmentFindings_CID3231;
import cdac.medinfo.sdk.dcm30_04.templates.cid.STSegmentLocation_CID3232;
import cdac.medinfo.sdk.dcm30_04.templates.cid.STSegmentMorphology_CID3233;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacRhythms;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ECGFindings;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ECGPatientStateValues;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_EctopicBeatMorphology;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RestStress;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_STSegmentFindings;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_STSegmentLocation;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_STSegmentMorphology;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StressECGSummary;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StressSymptoms;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_StressTestMeasurementGroup;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_StressECGSummary;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_StressTestMeasurementGroup;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.DeviceObserverIdentifyingAttributes_TID1004;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Measurement_TID300;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents StressECGSummary_TID3313
 */
	public class StressECGSummary_TID3313 extends Template
{
	/**
	 * Object of ECGFindings_CID3230
	 */
	private ECGFindings_CID3230 objECGFindingsCID3230;
	
	/**
	 * Object of ECGPatientStateValues_CID3262
	 */
	private ECGPatientStateValues_CID3262 objECGPatientStateValuesCID3262;
	
	/**
	 * Object of EctopicBeatMorphology_CID3234
	 */
	private EctopicBeatMorphology_CID3234 objEctopicBeatMorphologyCID3234;
	
	/**
	 * Object of RestStress_CID3102
	 */
	private RestStress_CID3102 objRestStressCID3102;
	
	/**
	 * Object of STSegmentFindings_CID3231
	 */
	private STSegmentFindings_CID3231 objSTSegmentFindingsCID3231;
	
	/**
	 * Object of STSegmentLocation_CID3232
	 */
	private STSegmentLocation_CID3232 objSTSegmentLocationCID3232;
	
	/**
	 * Object of STSegmentMorphology_CID3233
	 */
	private STSegmentMorphology_CID3233 objSTSegmentMorphologyCID3233;

	/**
	 * Object of CardiacRhythms_CID3415
	 */
	private CardiacRhythms_CID3415 objCardiacRhythmsCID3415;
	
	/**
	 * Object of DeviceObserverIdentifyingAttributes_TID1004
	 */
	private DeviceObserverIdentifyingAttributes_TID1004 objDeviceObserverIdentifyingAttributesTID1004;
	
	/**
	 * Object of Measurement_TID300
	 */
	private Measurement_TID300 objMeasurementTID300;
	
	/**
	 * Instantiates a new StressECGSummary_TID3313 Template.
	 * @param objTree Object of SRTree.
	 */
	public StressECGSummary_TID3313(SRTree objTree)
	{
		super(objTree);
	}

	/**
	 * Retrieves Measurement.
	 * @return Measurement_TID300 Object of Measurement_TID300 
	 */
	public Measurement_TID300 getMeasurement()
	{
		if(null == this.objMeasurementTID300)
			this.objMeasurementTID300 = new Measurement_TID300(getSRTree());
		return this.objMeasurementTID300;
	}
	
	/**
	 * Retrieves Device Observer Identifying Attributes.
	 * @return objDeviceObserverIdentifyingAttributesTID1004 Object of DeviceObserverIdentifyingAttributes_TID1004 
	 */
	public DeviceObserverIdentifyingAttributes_TID1004 getDeviceObserverIdentifyingAttributes()
	{
		if(null == this.objDeviceObserverIdentifyingAttributesTID1004)
			this.objDeviceObserverIdentifyingAttributesTID1004 = new DeviceObserverIdentifyingAttributes_TID1004(getSRTree());
		return this.objDeviceObserverIdentifyingAttributesTID1004;
	}
	
	/**
	 * Sets the value for ST Segment Finding.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue 
	 */
	public void setSTSegmentFinding(int[] arrPosition, String[] arrNumericValue, EnumCM_STSegmentFindings enumSTSegmentFindings)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.ST_SEGMENT_FINDING.getValue();
		String strCodeValue = EnumCV_StressECGSummary.ST_SEGMENT_FINDING_F_38035.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objSTSegmentFindingsCID3231)
			this.objSTSegmentFindingsCID3231 = new STSegmentFindings_CID3231();
		this.objSTSegmentFindingsCID3231.setSTSegmentFindings(enumSTSegmentFindings);

		String strCM = objSTSegmentFindingsCID3231.getCodeMeaning();
		String strCV = objSTSegmentFindingsCID3231.getCodeValue();
		String strCSD = objSTSegmentFindingsCID3231.getCodingSchemeDesignator();
		String strSNOMEDCTID = objSTSegmentFindingsCID3231.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 Finding Site.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setFindingSite(int[] arrPosition, EnumCM_STSegmentLocation enumSTSegmentLocation)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.FINDING_SITE.getValue();
		String strCodeValue = EnumCV_StressECGSummary.FINDING_SITE_G_C0E3.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objSTSegmentLocationCID3232)
			this.objSTSegmentLocationCID3232 = new STSegmentLocation_CID3232();
		this.objSTSegmentLocationCID3232.setSTSegmentLocation(enumSTSegmentLocation);

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

	/**
	 * Sets the value for Number of Ectopic Beats.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue 
	 */
	public void setNumberOfEctopicBeats(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.NUMBER_OF_ECTOPIC_BEATS.getValue();
		String strCodeValue = EnumCV_StressECGSummary.NUMBER_OF_ECTOPIC_BEATS_122707.getValue();
		String strCSD = 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, strCSD, arrNumericValue, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Cardiac Rhythm.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setCardiacRhythm(int[] arrPosition, EnumCM_CardiacRhythms enumCardiacRhythms)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.CARDIAC_RHYTHM.getValue();
		String strCodeValue = EnumCV_StressECGSummary.CARDIAC_RHYTHM_8884_9.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objCardiacRhythmsCID3415)
			this.objCardiacRhythmsCID3415 = new CardiacRhythms_CID3415();
		this.objCardiacRhythmsCID3415.setCardiacRhythms(enumCardiacRhythms);

		String strCM = objCardiacRhythmsCID3415.getCodeMeaning();
		String strCV = objCardiacRhythmsCID3415.getCodeValue();
		String strCSD = objCardiacRhythmsCID3415.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,strCM, strCSDesg,strCV,strCSD,"");
		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, EnumCM_StressSymptoms enumStressSymptoms)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.FINDING.getValue();
		String strCodeValue = EnumCV_StressECGSummary.FINDING_F_00033.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 Associated Morphology.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setAssociatedMorphology(int[] arrPosition, EnumCM_STSegmentMorphology enumSTSegmentMorphology)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.ASSOCIATED_MORPHOLOGY.getValue();
		String strCodeValue = EnumCV_StressECGSummary.ASSOCIATED_MORPHOLOGY_G_C504.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objSTSegmentMorphologyCID3233)
			this.objSTSegmentMorphologyCID3233 = new STSegmentMorphology_CID3233();
		this.objSTSegmentMorphologyCID3233.setSTSegmentMorpholog(enumSTSegmentMorphology);

		String strCM = objSTSegmentMorphologyCID3233.getCodeMeaning();
		String strCV = objSTSegmentMorphologyCID3233.getCodeValue();
		String strCSD = objSTSegmentMorphologyCID3233.getCodingSchemeDesignator();
		String strSNOMEDCTID = objSTSegmentMorphologyCID3233.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 Associated Morphology.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setAssociatedMorphology(int[] arrPosition, EnumCM_EctopicBeatMorphology enumEctopicBeatMorphology)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.ASSOCIATED_MORPHOLOGY.getValue();
		String strCodeValue = EnumCV_StressECGSummary.ASSOCIATED_MORPHOLOGY_G_C504.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objEctopicBeatMorphologyCID3234)
			this.objEctopicBeatMorphologyCID3234 = new EctopicBeatMorphology_CID3234();
		this.objEctopicBeatMorphologyCID3234.setEctopicBeatMorphology(enumEctopicBeatMorphology);

		String strCM = objEctopicBeatMorphologyCID3234.getCodeMeaning();
		String strCV = objEctopicBeatMorphologyCID3234.getCodeValue();
		String strCSD = objEctopicBeatMorphologyCID3234.getCodingSchemeDesignator();
		String strSNOMEDCTID = objEctopicBeatMorphologyCID3234.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 Patient State.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setPatientState(int[] arrPosition, EnumCM_ECGPatientStateValues enumECGPatientStateValues)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.PATIENT_STATE.getValue();
		String strCodeValue = EnumCV_StressECGSummary.PATIENT_STATE_109054.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objECGPatientStateValuesCID3262)
			this.objECGPatientStateValuesCID3262 = new ECGPatientStateValues_CID3262();
		this.objECGPatientStateValuesCID3262.setECGPatientStateValues(enumECGPatientStateValues);

		String strCM = objECGPatientStateValuesCID3262.getCodeMeaning();
		String strCV = objECGPatientStateValuesCID3262.getCodeValue();
		String strCSD = objECGPatientStateValuesCID3262.getCodingSchemeDesignator();
		String strSNOMEDCTID = objECGPatientStateValuesCID3262.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 Patient State.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setPatientState(int[] arrPosition, EnumCM_RestStress enumRestStress)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.PATIENT_STATE.getValue();
		String strCodeValue = EnumCV_StressECGSummary.PATIENT_STATE_109054.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objRestStressCID3102)
			this.objRestStressCID3102 = new RestStress_CID3102();
		this.objRestStressCID3102.setRestStress(enumRestStress);

		String strCM = objRestStressCID3102.getCodeMeaning();
		String strCV = objRestStressCID3102.getCodeValue();
		String strCSD = objRestStressCID3102.getCodingSchemeDesignator();
		String strSNOMEDCTID = objRestStressCID3102.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 ECGFinding.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent 
	 */
	public void setECGFinding(int[] arrPosition, EnumCM_ECGFindings enumECGFindings)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressTestMeasurementGroup.ECG_FINDING.getValue();
		String strCodeValue = EnumCV_StressTestMeasurementGroup.ECG_FINDING_F_00033.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objECGFindingsCID3230)
			this.objECGFindingsCID3230 = new ECGFindings_CID3230();
		this.objECGFindingsCID3230.setECGFindings(enumECGFindings);

		String strCM = objECGFindingsCID3230.getCodeMeaning();
		String strCV = objECGFindingsCID3230.getCodeValue();
		String strCSD = objECGFindingsCID3230.getCodingSchemeDesignator();
		String strSNOMEDCTID = objECGFindingsCID3230.getSNOMEDCTID();
		/**
		 * Creating a node of Value Type CODE and adding this node as root of a tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, strCM, strCV,strCSD,strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);

	}
	/**
	 * Sets the value for Observer Type.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setObserverType(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.OBSERVER_TYPE.getValue();
		String strCodeValue = EnumCV_StressECGSummary.OBSERVER_TYPE_121005.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type CODE and adding this node as root of a tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, "", "","","");
		getSRTree().addChild(objContentSequenceItem);
		
	}
	/**
	 * Sets the value for Device.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setDevice(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_StressECGSummary.DEVICE.getValue();
		String strCodeValue = EnumCV_StressECGSummary.DEVICE_121007.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type CODE and adding this node as root of a tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, "", "","","");
		getSRTree().addChild(objContentSequenceItem);
		
	}

}
