/*******************************************************************************
 *  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.CardiacValvesAndTracts_CID3701;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Severity_CID3716;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ValvularAbnormalities_CID3711;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacValvesAndTracts;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Severity;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ValvularAbnormalities;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_VentricularAssessment;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_VentricularAssessment;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents VentricularAssessment - TID3816
 */
public class VentricularAssessment_TID3816 extends Template
{
	/**
	 * Object of CardiacValvesAndTracts_CID3701
	 */
	private CardiacValvesAndTracts_CID3701 objCardiacValvesAndTractsCID3701;

	/**
	 * Object of ValvularAbnormalities_CID3711
	 */
	private ValvularAbnormalities_CID3711 objValvularAbnormalitiesCID3711;

	/**
	 * Object of Severity_CID3716
	 */
	private Severity_CID3716 objSeverityCID3716;

	/**
	 * Object of CommonFindings_TID3819
	 */

	private CommonFindings_TID3819 objCommonFindingsTID3819;

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

	/**
	 * Retrieves CommonFindings 
	 * @return objCommonFindingsTID3819 Object of CommonFindings_TID3819 
	 */
	public CommonFindings_TID3819 getCommonFindings() 
	{
		if(null == this.objCommonFindingsTID3819)
			this.objCommonFindingsTID3819 = new CommonFindings_TID3819(getSRTree());
		return this.objCommonFindingsTID3819;
	}

	/**
	 * 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_VentricularAssessment.FINDINGS.getValue();
		String strCodeValue = EnumCV_VentricularAssessment.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 value for Finding Site.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumCardiacValvesAndTracts Enumerated value for CardiacValvesAndTracts
	 */
	public void setFindingSite(int[] arrPosition, EnumCM_CardiacValvesAndTracts enumCardiacValvesAndTracts)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAssessment.FINDING_SITE.getValue();
		String strCodeValue = EnumCV_VentricularAssessment.FINDING_SITE_G_C0E3.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Arterial Lesion Location
		 */
		if(null== this.objCardiacValvesAndTractsCID3701)
			this.objCardiacValvesAndTractsCID3701 = new CardiacValvesAndTracts_CID3701();
		this.objCardiacValvesAndTractsCID3701.setCardiacValvesAndTracts(enumCardiacValvesAndTracts);

		String strCM = objCardiacValvesAndTractsCID3701.getCodeMeaning();
		String strCV = objCardiacValvesAndTractsCID3701.getCodeValue();
		String strCSD = objCardiacValvesAndTractsCID3701.getCodingSchemeDesignator();
		String strSNOMEDCTID = objCardiacValvesAndTractsCID3701.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 Finding.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumValvularAbnormalities Enumerated value for ValvularAbnormalities
	 */
	public void setFinding(int[] arrPosition, EnumCM_ValvularAbnormalities enumValvularAbnormalities)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAssessment.FINDINGS.getValue();
		String strCodeValue = EnumCV_VentricularAssessment.FINDINGS_121070.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Arterial Lesion Location
		 */
		if(null== this.objValvularAbnormalitiesCID3711)
			this.objValvularAbnormalitiesCID3711 = new ValvularAbnormalities_CID3711();
		this.objValvularAbnormalitiesCID3711.setValvularAbnormalities(enumValvularAbnormalities);

		String strCM = objValvularAbnormalitiesCID3711.getCodeMeaning();
		String strCV = objValvularAbnormalitiesCID3711.getCodeValue();
		String strCSD = objValvularAbnormalitiesCID3711.getCodingSchemeDesignator();
		String strSNOMEDCTID = objValvularAbnormalitiesCID3711.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 the value for Severity.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumSeverity Enumerated value for value for Severity
	 */
	public void setSeverity(int[] arrPosition, EnumCM_Severity enumSeverity)
	{
		/**
		 * Sets the value for Subject Sex which follows the template CID7455
		 */
		if(null== this.objSeverityCID3716)
			this.objSeverityCID3716 = new Severity_CID3716();
		this.objSeverityCID3716.setSeverity(enumSeverity);

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

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAssessment.SEVERITY.getValue();
		String strCodeValue = EnumCV_VentricularAssessment.SEVERITY_G_C197.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 Score.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setScore(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VentricularAssessment.SCORE.getValue();
		String strCodeValue = EnumCV_VentricularAssessment.SCORE_G_C1E3.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,"","","","","","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
}
