/*******************************************************************************
 *  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.NonCoronaryTranscatheterInterventions_CID3406;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_NoBCIDSpecified;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_NonCoronaryTranscatheterInterventions;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OtherInterventionalProcedures;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_OtherInterventionalProcedures;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents OtherInterventionalProcedures - TID3809
 */
public class OtherInterventionalProcedures_TID3809 extends Template
{
	/**
	 * Object of NonCoronaryTranscatheterInterventions_CID3406
	 */
	private NonCoronaryTranscatheterInterventions_CID3406 objNonCoronaryTranscatheterInterventionsCID3406;

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

	/**
	 * Sets the value for Current Procedure Descriptions
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setCurrentProcedureDescriptions(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OtherInterventionalProcedures.CURRENT_PROCEDURE_DESCRIPTIONS.getValue();
		String strCodeValue = EnumCV_OtherInterventionalProcedures.CURRENT_PROCEDURE_DESCRIPTIONS_55111_9.getValue();
		String strCSD = EnumCodingSchemeDesignator.LN.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.
	 * @param enumNonCoronaryTranscatheterInterventions Enumerated value for NonCoronaryTranscatheterInterventions
	 */
	public void setProcedureReported(int[] arrPosition, EnumCM_NonCoronaryTranscatheterInterventions enumNonCoronaryTranscatheterInterventions)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objNonCoronaryTranscatheterInterventionsCID3406)
			this.objNonCoronaryTranscatheterInterventionsCID3406 = new NonCoronaryTranscatheterInterventions_CID3406();
		this.objNonCoronaryTranscatheterInterventionsCID3406.setNonCoronaryTranscatheterInterventions(enumNonCoronaryTranscatheterInterventions);

		String strCM = objNonCoronaryTranscatheterInterventionsCID3406.getCodeMeaning();
		String strCV = objNonCoronaryTranscatheterInterventionsCID3406.getCodeValue();
		String strCSD1 = objNonCoronaryTranscatheterInterventionsCID3406.getCodingSchemeDesignator();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OtherInterventionalProcedures.PROCEDURE_REPORTED.getValue();
		String strCodeValue = EnumCV_OtherInterventionalProcedures.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 Procedure Description
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strProcedureDescription String value for ProcedureDescription.
	 */
	public void setProcedureDescription(int[] arrPosition, String strProcedureDescription)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OtherInterventionalProcedures.PROCEDURE_DESCRIPTION.getValue();
		String strCodeValue = EnumCV_OtherInterventionalProcedures.PROCEDURE_DESCRIPTION_121065.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, strProcedureDescription);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Procedure Description.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setProcedureDescription(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = EnumCM_NoBCIDSpecified.NO_VALUE.getValue();
		String strCV = EnumCM_NoBCIDSpecified.NO_VALUE.getValue();
		String strCSD1 = EnumCodingSchemeDesignator.NO_VALUE.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OtherInterventionalProcedures.PROCEDURE_REPORTED.getValue();
		String strCodeValue = EnumCV_OtherInterventionalProcedures.PROCEDURE_DESCRIPTION_121065.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 Procedure Result
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strProcedureResult String value for ProcedureResult.
	 */
	public void setProcedureResult(int[] arrPosition, String strProcedureResult)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OtherInterventionalProcedures.PROCEDURE_RESULT.getValue();
		String strCodeValue = EnumCV_OtherInterventionalProcedures.PROCEDURE_RESULT_122177.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, strProcedureResult);
		getSRTree().addChild(objContentSequenceItem);
	}
}
