/*******************************************************************************
 *  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.dicommodel.modules.SRDocumentContentModule;
import cdac.medinfo.sdk.dcm30_04.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.CardiacPhase_CID12233;
import cdac.medinfo.sdk.dcm30_04.templates.cid.PlaneIdentification_CID3466;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacPhase;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PlaneIdentification;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_VentricularAnalysisTemplate;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_VentricularAnalysisTemplate;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.LanguageOfContentItemAndDescendants_TID1204;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.ObserverContext_TID1002;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;
import cdac.medinfo.sdk.dcm30_04.templates.hemodynamicsreporttemplates.CardiovascularPatientCharacteristics_TID3602;
import cdac.medinfo.sdk.dcm30_04.templates.hemodynamicsreporttemplates.HemodynamicClinicalContext_TID3520;

/**
 * This class represents VentricularAnalysisTemplate - TID3202
 */
public class VentricularAnalysisTemplate_TID3202 extends Template
{
	/**
	 * Object of LanguageOfContentItemAndDescendants_TID1204
	 */

	private LanguageOfContentItemAndDescendants_TID1204 objLanguageOfContentItemAndDescendantsTID1204;
	/**
	 * Object of ObserverContext_TID1002
	 */

	private ObserverContext_TID1002 objObserverContextTID1002;

	/**
	 * Object of CardiovascularPatientCharacteristics_TID3602
	 */

	private CardiovascularPatientCharacteristics_TID3602 objCathPatientCharacteristicsTID3602; 

	/**
	 * Object of CardiacPhase_CID12233
	 */
	private CardiacPhase_CID12233 objCardiacPhaseCID12233;

	/**
	 * Object of PlaneIdentification_CID3466
	 */
	private PlaneIdentification_CID3466 objPlaneIdentificationCID3466;

	/**
	 * Object of CalibrationTemplate_TID3205
	 */

	private CalibrationTemplate_TID3205 objCalibrationTemplateTID3205;

	/**
	 * Object of HemodynamicClinicalContext_TID3520
	 */

	private HemodynamicClinicalContext_TID3520 objHemodynamicClinicalContextTID3520;

	/**
	 * Object of VAMainResultsTemplate_TID3206
	 */

	private VAMainResultsTemplate_TID3206 objMainResultsTemplateTID3206;

	/**
	 * Object of AAMainResultsTemplate_TID3207
	 */

	private AAMainResultsTemplate_TID3207 objAaMainResultsTemplateTID3207;

	/**
	 * Object of FrameToFrameResultsTemplate_TID3208
	 */

	private FrameToFrameResultsTemplate_TID3208 objFrameResultsTemplateTID3208;

	/**
	 * Object of CenterlineWallMotionTemplate_TID3209
	 */

	private CenterlineWallMotionTemplate_TID3209 objCenterlineWallMotionTemplateTID3209;

	/**
	 * Object of RadialBasedWallMotionTemplate_TID3210
	 */

	private RadialBasedWallMotionTemplate_TID3210 objBasedWallMotionTemplateTID3210;

	/**
	 * Object of LandmarkBasedWallMotionTemplate_TID3211
	 */

	private LandmarkBasedWallMotionTemplate_TID3211 objBasedWallMotionTemplateTID3211;

	/**
	 * Instantiates VentricularAnalysisTemplate_TID3202 Template.
	 * @param objTree Object of SRTree.
	 */
	public VentricularAnalysisTemplate_TID3202(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves LanguageOfContentItemAndDescendants
	 * @return objLanguageOfContentItemAndDescendantsTID1204 Object of LanguageOfContentItemAndDescendants_TID1204 
	 */
	public LanguageOfContentItemAndDescendants_TID1204 getLanguageOfContentItemAndDescendants() 
	{
		if(null == this.objLanguageOfContentItemAndDescendantsTID1204)
			this.objLanguageOfContentItemAndDescendantsTID1204 = new LanguageOfContentItemAndDescendants_TID1204(getSRTree());
		return this.objLanguageOfContentItemAndDescendantsTID1204;
	}
	/**
	 * Retrieves Observer Context 
	 * @return objObserverContext Object of ObserverContext_TID1002 
	 */
	public ObserverContext_TID1002 getObserverContext() 
	{
		if(null == this.objObserverContextTID1002)
			this.objObserverContextTID1002 = new ObserverContext_TID1002(getSRTree());
		return this.objObserverContextTID1002;
	}

	/**
	 * Retrieves Calibration 
	 * @return objCalibrationTemplateTID3205 Object of CalibrationTemplate_TID3205 
	 */
	public CalibrationTemplate_TID3205 getCalibration() 
	{
		if(null == this.objCalibrationTemplateTID3205)
			this.objCalibrationTemplateTID3205 = new CalibrationTemplate_TID3205(getSRTree());
		return this.objCalibrationTemplateTID3205;
	}

	/**
	 * Retrieves PatientCharacteristics 
	 * @return objCathPatientCharacteristicsTID3602 Object of CardiovascularPatientCharacteristics_TID3602 
	 */
	public CardiovascularPatientCharacteristics_TID3602 getPatientCharacteristics() 
	{
		if(null == this.objCathPatientCharacteristicsTID3602)
			this.objCathPatientCharacteristicsTID3602 = new CardiovascularPatientCharacteristics_TID3602(getSRTree());
		return this.objCathPatientCharacteristicsTID3602;
	}

	/**
	 * Retrieves HemodynamicClinicalContext 
	 * @return objHemodynamicClinicalContextTID3520 Object of HemodynamicClinicalContext_TID3520 
	 */
	public HemodynamicClinicalContext_TID3520 getHemodynamicClinicalContext() 
	{
		if(null == this.objHemodynamicClinicalContextTID3520)
			this.objHemodynamicClinicalContextTID3520 = new HemodynamicClinicalContext_TID3520(getSRTree());
		return this.objHemodynamicClinicalContextTID3520;
	}

	/**
	 * Retrieves VAMainResults 
	 * @return objMainResultsTemplateTID3206 Object of VAMainResultsTemplate_TID3206 
	 */
	public VAMainResultsTemplate_TID3206 getVAMainResults() 
	{
		if(null == this.objMainResultsTemplateTID3206)
			this.objMainResultsTemplateTID3206 = new VAMainResultsTemplate_TID3206(getSRTree());
		return this.objMainResultsTemplateTID3206;
	}

	/**
	 * Retrieves AAMainResults 
	 * @return objAaMainResultsTemplateTID3207 Object of AAMainResultsTemplate_TID3207 
	 */
	public AAMainResultsTemplate_TID3207 getAAMainResults() 
	{
		if(null == this.objAaMainResultsTemplateTID3207)
			this.objAaMainResultsTemplateTID3207 = new AAMainResultsTemplate_TID3207(getSRTree());
		return this.objAaMainResultsTemplateTID3207;
	}

	/**
	 * Retrieves FrameToFrameResults 
	 * @return objFrameResultsTemplateTID3208 Object of FrameToFrameResultsTemplate_TID3208 
	 */
	public FrameToFrameResultsTemplate_TID3208 getFrameToFrameResults() 
	{
		if(null == this.objFrameResultsTemplateTID3208)
			this.objFrameResultsTemplateTID3208 = new FrameToFrameResultsTemplate_TID3208(getSRTree());
		return this.objFrameResultsTemplateTID3208;
	}

	/**
	 * Retrieves CenterlineWallMotion 
	 * @return objCenterlineWallMotionTemplateTID3209 Object of CenterlineWallMotionTemplate_TID3209 
	 */
	public CenterlineWallMotionTemplate_TID3209 getCenterlineWallMotion() 
	{
		if(null == this.objCenterlineWallMotionTemplateTID3209)
			this.objCenterlineWallMotionTemplateTID3209 = new CenterlineWallMotionTemplate_TID3209(getSRTree());
		return this.objCenterlineWallMotionTemplateTID3209;
	}

	/**
	 * Retrieves RadialBasedWallMotion 
	 * @return objBasedWallMotionTemplateTID3210 Object of RadialBasedWallMotionTemplate_TID3210 
	 */
	public RadialBasedWallMotionTemplate_TID3210 getRadialBasedWallMotion() 
	{
		if(null == this.objBasedWallMotionTemplateTID3210)
			this.objBasedWallMotionTemplateTID3210 = new RadialBasedWallMotionTemplate_TID3210(getSRTree());
		return this.objBasedWallMotionTemplateTID3210;
	}

	/**
	 * Retrieves LandmarkBasedWallMotion 
	 * @return objBasedWallMotionTemplateTID3210 Object of LandmarkBasedWallMotionTemplate_TID3211 
	 */
	public LandmarkBasedWallMotionTemplate_TID3211 getLandmarkBasedWallMotion() 
	{
		if(null == this.objBasedWallMotionTemplateTID3211)
			this.objBasedWallMotionTemplateTID3211 = new LandmarkBasedWallMotionTemplate_TID3211(getSRTree());
		return this.objBasedWallMotionTemplateTID3211;
	}

	/**
	 * Sets the value for Quantitative Ventriculography Report
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setQuantitativeVentriculographyReport(EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAnalysisTemplate.QUANTITATIVE_VENTRICULOGRAPHY_REPORT.getValue();
		String strCodeValue = EnumCV_VentricularAnalysisTemplate.QUANTITATIVE_VENTRICULOGRAPHY_REPORT_122292.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type CONTAINER and adding this node as root of a tree.
		 */
		SRDocumentContentModule objDocumentContentModule = getSRTree().getSRDocumentContentModule();
		getSRTree().createRoot(objDocumentContentModule,strCodeMeaning,strCodeValue , strCSD, enumContinuityOfContent);
	}

	/**
	 * Sets the value for Quantitative Analysis
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setQuantitativeAnalysis(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAnalysisTemplate.QUANTITATIVE_ANALYSIS.getValue();
		String strCodeValue = EnumCV_VentricularAnalysisTemplate.QUANTITATIVE_ANALYSIS_122144.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 Algorithm Name
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strAlgorithmName String value for Algorithm Name.
	 */
	public void setAlgorithmName(int[] arrPosition, String strAlgorithmName)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAnalysisTemplate.ALGORITHM_NAME.getValue();
		String strCodeValue = EnumCV_VentricularAnalysisTemplate.ALGORITHM_NAME_111001.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

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

	/**
	 * Sets the value for Algorithm Version
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strAlgorithmVersion String value for Algorithm Version.
	 */
	public void setAlgorithmVersion(int[] arrPosition, String strAlgorithmVersion)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAnalysisTemplate.ALGORITHM_VERSION.getValue();
		String strCodeValue = EnumCV_VentricularAnalysisTemplate.ALGORITHM_VERSION_111003.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

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


	/**
	 * Sets the value for Algorithm Manufacturer
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strAlgorithmManufacturer String value for Algorithm Manufacturer.
	 */
	public void setAlgorithmManufacturer(int[] arrPosition, String strAlgorithmManufacturer)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAnalysisTemplate.ALGORITHM_MANUFACTURER.getValue();
		String strCodeValue = EnumCV_VentricularAnalysisTemplate.ALGORITHM_MANUFACTURER_122405.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

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

	/**
	 * Sets value for Source of Measurements
	 * @param arrPosition identifier which shows the position of the node in the SR Tree.
	 *@param strRefSOPClassUIDForCORefMacro Reference SOP Class UID for Composite Object Reference Macro.
	 * @param strRefSOPInstanceUIDForCORefMacro Reference SOP Instance UID for Composite Object Reference Macro.
	 * @param arrStrReferencedFrameNumber String Array of Referenced Frame Number.
	 * @param strRefSOPClassUID Referenced SOP Class UID.
	 * @param strRefSOPInstanceUID Referenced SOP Instance UID.
	 */
	public void setSourceOfMeasurements(int[] arrPosition, String strRefSOPClassUIDForCORefMacro, String strRefSOPInstanceUIDForCORefMacro, String[] arrStrReferencedFrameNumber, String strRefSOPClassUID, String strRefSOPInstanceUID)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAnalysisTemplate.SOURCE_OF_MEASUREMENTS.getValue();
		String strCodeValue = EnumCV_VentricularAnalysisTemplate.SOURCE_OF_MEASUREMENTS_121112.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().createImageNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strRefSOPClassUIDForCORefMacro, strRefSOPInstanceUIDForCORefMacro, arrStrReferencedFrameNumber, strRefSOPClassUID, strRefSOPInstanceUID);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets value for CardiacPhase.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumCardiacPhase Enumerated value for CardiacPhase.
	 */
	public void setCardiacPhase(int[] arrPosition, EnumCM_CardiacPhase enumCardiacPhase)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAnalysisTemplate.CARDIAC_PHASE.getValue();
		String strCodeValue = EnumCV_VentricularAnalysisTemplate.CARDIAC_PHASE_G_A60B.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for CardiacPhase
		 */
		if(null== this.objCardiacPhaseCID12233)
			this.objCardiacPhaseCID12233 = new CardiacPhase_CID12233();
		this.objCardiacPhaseCID12233.setCardiacPhase(enumCardiacPhase);

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

	/**
	 * Sets value for Image View.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumPlaneIdentification  Enumerated value for PlaneIdentification.
	 */
	public void setImageView(int[] arrPosition, EnumCM_PlaneIdentification enumPlaneIdentification)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAnalysisTemplate.IMAGE_VIEW.getValue();
		String strCodeValue = EnumCV_VentricularAnalysisTemplate.IMAGE_VIEW_111031.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Image View
		 */
		if(null== this.objPlaneIdentificationCID3466)
			this.objPlaneIdentificationCID3466 = new PlaneIdentification_CID3466();
		this.objPlaneIdentificationCID3466.setPlaneIdentification(enumPlaneIdentification);

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