/*******************************************************************************
 *  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.DegreeFindings_CID3642;
import cdac.medinfo.sdk.dcm30_04.templates.cid.HemodynamicAssessments_CID3641;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Hypertension_CID3640;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Severity_CID3716;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_DefinedTerms;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_DegreeFindings;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_EV;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_HemodynamicAssessments;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_HemodynamicFindings;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Hypertension;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Severity;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_DefinedTerms;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_EV;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_HemodynamicFindings;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.NegationModifierPresenceOfFinding_TID1350;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents HemodynamicFindings - TID3812
 */
public class HemodynamicFindings_TID3812 extends Template
{
	/**
	 * Object of Hypertension_CID3640
	 */
	private Hypertension_CID3640 objHypertensionCID3640;

	/**
	 * Object of CommonFindings_TID3819
	 */

	private CommonFindings_TID3819 objCommonFindingsTID3819;

	/**
	 * Object of NegationModifierPresenceOfFinding_TID1350
	 */

	private NegationModifierPresenceOfFinding_TID1350 objNegationModifierPresenceOfFindingTID1350;

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

	/**
	 * Object of DegreeFindings_CID3642
	 */
	private DegreeFindings_CID3642 objDegreeFindingsCID3642;

	/**
	 * Object of HemodynamicAssessments_CID3641
	 */
	private HemodynamicAssessments_CID3641 objHemodynamicAssessmentsCID3641;

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

	/**
	 * Retrieves NegationModifierPresenceOfFinding 
	 * @return objNegationModifierPresenceOfFindingTID1350 Object of NegationModifierPresenceOfFinding_TID1350 
	 */
	public NegationModifierPresenceOfFinding_TID1350 getNegationModifierPresenceOfFinding() 
	{
		if(null == this.objNegationModifierPresenceOfFindingTID1350)
			this.objNegationModifierPresenceOfFindingTID1350 = new NegationModifierPresenceOfFinding_TID1350(getSRTree());
		return this.objNegationModifierPresenceOfFindingTID1350;
	}

	/**
	 * 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_HemodynamicFindings.FINDINGS.getValue();
		String strCodeValue = EnumCV_HemodynamicFindings.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.HEMODYNAMIC_MEASUREMENTS.getValue();
		String strCV = EnumCV_DefinedTerms.HEMODYNAMIC_MEASUREMENTS_PA_50030.getValue();
		String strCSD1 = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_HemodynamicFindings.PROCEDURE_REPORTED.getValue();
		String strCodeValue = EnumCV_HemodynamicFindings.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 value for Finding .
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumHypertension Enumerated value of Hypertension
	 */
	public void setFinding(int[] arrPosition, EnumCM_Hypertension enumHypertension)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_HemodynamicFindings.FINDING.getValue();
		String strCodeValue = EnumCV_HemodynamicFindings.FINDING_121071.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Findings
		 */
		if(null== this.objHypertensionCID3640)
			this.objHypertensionCID3640 = new Hypertension_CID3640();
		this.objHypertensionCID3640.setHypertension(enumHypertension);

		String strCM = objHypertensionCID3640.getCodeMeaning();
		String strCV = objHypertensionCID3640.getCodeValue();
		String strCSD = objHypertensionCID3640.getCodingSchemeDesignator();
		String strSNOMEDCTID = objHypertensionCID3640.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_HemodynamicFindings.SEVERITY.getValue();
		String strCodeValue = EnumCV_HemodynamicFindings.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 HemodynamicAssessments.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumDegreeFindings Enumerated value for DegreeFindings
	 * @param enumHemodynamicAssessments Enumerated value for HemodynamicAssessments
	 */
	public void setHemodynamicAssessments(int[] arrPosition, EnumCM_DegreeFindings enumDegreeFindings, EnumCM_HemodynamicAssessments enumHemodynamicAssessments)
	{
		/**
		 * Sets the value for Subject Sex which follows the template CID7455
		 */
		if(null== this.objDegreeFindingsCID3642)
			this.objDegreeFindingsCID3642 = new DegreeFindings_CID3642();
		this.objDegreeFindingsCID3642.setDegreeFindings(enumDegreeFindings);

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

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objHemodynamicAssessmentsCID3641)
			this.objHemodynamicAssessmentsCID3641 = new HemodynamicAssessments_CID3641();
		this.objHemodynamicAssessmentsCID3641.setHemodynamicAssessments(enumHemodynamicAssessments);
		String strCodeMeaning = objHemodynamicAssessmentsCID3641.getCodeMeaning();
		String strCodeValue = objHemodynamicAssessmentsCID3641.getCodeValue();
		String strCSD2 = objHemodynamicAssessmentsCID3641.getCodingSchemeDesignator();
		String strSNOMEDCTID1 = objHemodynamicAssessmentsCID3641.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 , strCSD2, strCV, strCSD1, strCM,strSNOMEDCTID,strSNOMEDCTID1);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets value for Condition.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setCondition(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_HemodynamicFindings.CONDITION.getValue();
		String strCodeValue = EnumCV_HemodynamicFindings.CONDITION_G_C0B2.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Condition
		 */
		String strCM = EnumCM_EV.LARGE_V_WAVE.getValue();
		String strCV = EnumCV_EV.LARGE_V_WAVE_R_102B9.getValue();
		String strCSD = 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, strCV, strCSD, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets 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_HemodynamicFindings.FINDING.getValue();
		String strCodeValue = EnumCV_HemodynamicFindings.FINDING_121071.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Findings
		 */
		String strCM = EnumCM_DefinedTerms.DIASTOLIC_PRESSURE_EQUALIZATION.getValue();
		String strCV = EnumCV_DefinedTerms.DIASTOLIC_PRESSURE_EQUALIZATION_R_102BA.getValue();
		String strCSD = 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, strCV, strCSD, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}
}
