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

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.ChamberSize_CID3705;
import cdac.medinfo.sdk.dcm30_04.templates.cid.OverallContractility_CID3706;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ChamberSize;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_DefinedTerms;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OverallContractility;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RightVentriculographyFindings;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_DefinedTerms;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_RightVentriculographyFindings;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Measurement_TID300;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents RightVentriculographyFindings - TID3815
 */
public class RightVentriculographyFindings_TID3815 extends Template
{
	/**
	 * Object of Measurement_TID300
	 */
	private Measurement_TID300 objMeasurementTID300;
	/**
	 * Object of ChamberSize_CID3705
	 */
	private ChamberSize_CID3705 objChamberSizeCID3705;

	/**
	 * Object of OverallContractility_CID3706
	 */
	private OverallContractility_CID3706 objOverallContractilityCID3706;

	/**
	 * Object of VentricularAssessment_TID3816
	 */

	private VentricularAssessment_TID3816 objVentricularAssessmentTID3816; 

	/**
	 * Instantiates RightVentriculographyFindings_TID3815 Template.
	 * @param objTree Object of SRTree.
	 */
	public RightVentriculographyFindings_TID3815(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;
	}
	/**
	 * Retrieves VentricularAssessmen 
	 * @return objVentricularAssessmentTID3816 Object of VentricularAssessment_TID3816 
	 */
	public VentricularAssessment_TID3816 getVentricularAssessmen() 
	{
		if(null == this.objVentricularAssessmentTID3816)
			this.objVentricularAssessmentTID3816 = new VentricularAssessment_TID3816(getSRTree());
		return this.objVentricularAssessmentTID3816;
	}

	/**
	 * 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_RightVentriculographyFindings.FINDINGS.getValue();
		String strCodeValue = EnumCV_RightVentriculographyFindings.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_DefinedTerms.RIGHT_VENTRICULOGRAPHY.getValue();
		String strCV = EnumCV_DefinedTerms.RIGHT_VENTRICULOGRAPHY_P5_3003F.getValue();
		String strCSD1 = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RightVentriculographyFindings.PROCEDURE_REPORTED.getValue();
		String strCodeValue = EnumCV_RightVentriculographyFindings.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 Right Ventricular Cavity Size.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumChamberSize Enumerated value for value for enumChamberSize
	 */
	public void setRightVentricularCavitySize(int[] arrPosition, EnumCM_ChamberSize enumChamberSize)
	{
		/**
		 * Sets the value for Subject Sex which follows the template CID7455
		 */
		if(null== this.objChamberSizeCID3705)
			this.objChamberSizeCID3705 = new ChamberSize_CID3705();
		this.objChamberSizeCID3705.setChamberSize(enumChamberSize);

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = objChamberSizeCID3705.getCodeMeaning();
		String strCV = objChamberSizeCID3705.getCodeValue();
		String strCSD1 = objChamberSizeCID3705.getCodingSchemeDesignator();
		String strSNOMEDCTID = objChamberSizeCID3705.getSNOMEDCTID();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RightVentriculographyFindings.RIGHT_VENTRICULAR_CAVITY_SIZE.getValue();
		String strCodeValue = EnumCV_RightVentriculographyFindings.RIGHT_VENTRICULAR_CAVITY_SIZE_F_022A1.getValue();
		String strCSD2 = 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 , strCSD2, strCV, strCSD1, "", strCM,strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Right Ventricular Contractility.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumOverallContractility Enumerated value for value for OverallContractility
	 */
	public void setRightVentricularContractility(int[] arrPosition, EnumCM_OverallContractility enumOverallContractility)
	{
		/**
		 * Sets the value for Subject Sex which follows the template CID7455
		 */
		if(null== this.objOverallContractilityCID3706)
			this.objOverallContractilityCID3706 = new OverallContractility_CID3706();
		this.objOverallContractilityCID3706.setOverallContractility(enumOverallContractility);

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = objOverallContractilityCID3706.getCodeMeaning();
		String strCV = objOverallContractilityCID3706.getCodeValue();
		String strCSD1 = objOverallContractilityCID3706.getCodingSchemeDesignator();
		String strSNOMEDCTID = objOverallContractilityCID3706.getSNOMEDCTID();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RightVentriculographyFindings.RIGHT_VENTRICULAR_CONTRACTILITY.getValue();
		String strCodeValue = EnumCV_RightVentriculographyFindings.RIGHT_VENTRICULAR_CONTRACTILITY_F_0227A.getValue();
		String strCSD2 = 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 , strCSD2, strCV, strCSD1, "", strCM,strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}
}
