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

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.Laterality_CID244;
import cdac.medinfo.sdk.dcm30_04.templates.cid.VascularUltrasoundAnatomicLocation_CID12103;
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_Laterality;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_NoBCIDSpecified;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_UltrasoundGraftSection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_DefinedTerms;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_UltrasoundGraftSection;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents UltrasoundGraftSection - TID5105
 */
public class UltrasoundGraftSection_TID5105 extends Template
{
	/**
	 * Object of Laterality_CID244
	 */
	private Laterality_CID244 objLaterality_CID244;


	/**
	 * Object of VascularUltrasoundAnatomicLocation_CID12103
	 */
	private VascularUltrasoundAnatomicLocation_CID12103 objVascularUltrasoundAnatomicLocationCID12103;

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

	/**
	 * 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_UltrasoundGraftSection.FINDINGS.getValue();
		String strCodeValue = EnumCV_UltrasoundGraftSection.FINDINGS_121070.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type CONTAINER 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.
	 */
	public void setFindingSite(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_UltrasoundGraftSection.FINDING_SITE.getValue();
		String strCodeValue = EnumCV_UltrasoundGraftSection.FINDING_SITE_G_C0E3.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Arterial Lesion Location
		 */
		String strCM = EnumCM_DefinedTerms.VASCULAR_GRAFT.getValue();
		String strCV = EnumCV_DefinedTerms.VASCULAR_GRAFT_T_D000F.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 the value for Laterality.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumLaterality Enum value for Laterality
	 */
	public void setLaterality(int[] arrPosition, EnumCM_Laterality enumLaterality)
	{
		/**
		 * Sets the value for InterventionActionsAndStatus.
		 */
		if(null== this.objLaterality_CID244)
			this.objLaterality_CID244 = new Laterality_CID244();
		this.objLaterality_CID244.setLaterality(enumLaterality);

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

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_UltrasoundGraftSection.LATERALITY.getValue();
		String strCodeValue = EnumCV_UltrasoundGraftSection.LATERALITY_G_C171.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,strSNMDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Proximal anastomosis.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumValue This value can be one of the three Enum - EnumCM_ExtracranialArteries, EnumIntracranialCerebralVessels
	 * EnumCM_IntracranialCerebralVesselsUnilateral, EnumCM_UpperExtremityArteries,EnumCM_UpperExtremityVeins,EnumCM_LowerExtremityArteries
	 * EnumCM_LowerExtremityVeins, EnumCM_AbdominalArteriesLateral,EnumCM_AbdominalArteriesUnilateral, EnumCM_AbdominalVeinsLateral,
	 * EnumCM_AbdominalVeinsUnilateral, EnumCM_RenalVessels.
	 */
	public void setProximalAnastomosis(int[] arrPosition, Enum enumValue)
	{
		/**
		 * Sets the value for InterventionActionsAndStatus.
		 */
		if(null== this.objVascularUltrasoundAnatomicLocationCID12103)
			this.objVascularUltrasoundAnatomicLocationCID12103 = new VascularUltrasoundAnatomicLocation_CID12103();
		this.objVascularUltrasoundAnatomicLocationCID12103.setVascularUltrasoundAnatomicLocation(enumValue);

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

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_UltrasoundGraftSection.PROXIMAL_ANASTOMOSIS.getValue();
		String strCodeValue = EnumCV_UltrasoundGraftSection.PROXIMAL_ANASTOMOSIS_G_D871.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,strSNMDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Distal Anastomosis.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumValue This value can be one of the three Enum - EnumCM_ExtracranialArteries, EnumIntracranialCerebralVessels
	 * EnumCM_IntracranialCerebralVesselsUnilateral, EnumCM_UpperExtremityArteries,EnumCM_UpperExtremityVeins,EnumCM_LowerExtremityArteries
	 * EnumCM_LowerExtremityVeins, EnumCM_AbdominalArteriesLateral,EnumCM_AbdominalArteriesUnilateral, EnumCM_AbdominalVeinsLateral,
	 * EnumCM_AbdominalVeinsUnilateral, EnumCM_RenalVessels.
	 */
	public void setDistalAnastomosis(int[] arrPosition, Enum enumValue)
	{
		/**
		 * Sets the value for InterventionActionsAndStatus.
		 */
		if(null== this.objVascularUltrasoundAnatomicLocationCID12103)
			this.objVascularUltrasoundAnatomicLocationCID12103 = new VascularUltrasoundAnatomicLocation_CID12103();
		this.objVascularUltrasoundAnatomicLocationCID12103.setVascularUltrasoundAnatomicLocation(enumValue);

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = this.objVascularUltrasoundAnatomicLocationCID12103.getCodeMeaning();
		String strCV = this.objVascularUltrasoundAnatomicLocationCID12103.getCodeValue();
		String strCSD1 = this.objVascularUltrasoundAnatomicLocationCID12103.getCodingSchemeDesignator();
		String strSNMDCTID = this.objVascularUltrasoundAnatomicLocationCID12103.getSNOMEDCTID();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_UltrasoundGraftSection.DISTAL_ANASTOMOSIS.getValue();
		String strCodeValue = EnumCV_UltrasoundGraftSection.DISTAL_ANASTOMOSIS_G_D872.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,strSNMDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Graft Type.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setGraftType(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 = EnumCM_NoBCIDSpecified.NO_VALUE.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_UltrasoundGraftSection.DISTAL_ANASTOMOSIS.getValue();
		String strCodeValue = EnumCV_UltrasoundGraftSection.DISTAL_ANASTOMOSIS_G_D872.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);
		getSRTree().addChild(objContentSequenceItem);
	}
}
