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

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.cathlabclinicalreporttemplate.CommonFindings_TID3819;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ArterialLesionLocations_CID3604;
import cdac.medinfo.sdk.dcm30_04.templates.cid.CardiovascularAnatomicLocationModifiers_CID3019;
import cdac.medinfo.sdk.dcm30_04.templates.cid.IVUSProcedurePhases_CID3480;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Laterality_CID244;
import cdac.medinfo.sdk.dcm30_04.templates.cid.VesselDescriptors_CID3712;
import cdac.medinfo.sdk.dcm30_04.templates.cid.YesNo_CID230;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiovascularAnatomicLocationModifiers;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_IVUSProcedurePhases;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_IVUSVessel;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Laterality;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_VesselDescriptors;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_YesNo;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_IVUSVessel;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents IVUSVessel - TID3251
 */
public class IVUSVessel_TID3251 extends Template
{
	/**
	 * Object of ArterialLesionLocations_CID3604
	 */
	private ArterialLesionLocations_CID3604 objArterialLesionLocations_CID3604;

	/**
	 * Object of CardiovascularAnatomicLocationModifiers_CID3019
	 */
	private CardiovascularAnatomicLocationModifiers_CID3019 objAnatomicLocationModifiersCID3019;

	/**
	 * Object of Laterality_CID244
	 */
	private Laterality_CID244 objLaterality_CID244;

	/**
	 * Object of IVUSProcedurePhases_CID3480
	 */
	private IVUSProcedurePhases_CID3480 objProcedurePhasesCID3480;

	/**
	 * Object of VesselDescriptors_CID3712
	 */
	private VesselDescriptors_CID3712 objVesselDescriptorsCID3712;

	/**
	 * Object of CommonFindings_TID3819
	 */

	private CommonFindings_TID3819 objCommonFindingsTID3819;

	/**
	 * Object of YesNo_CID230
	 */
	private YesNo_CID230 objYesNoCID230;

	/**
	 * Object of IVUSLesion_TID3252
	 */

	private IVUSLesion_TID3252 objIvusLesionTID3252;

	/**
	 * Instantiates IVUSVessel_TID3251 Template.
	 * @param objTree Object of SRTree.
	 */
	public IVUSVessel_TID3251(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;
	}

	/**
	 * Retrieves IVUSLesion 
	 * @return objIvusLesionTID3252 Object of IVUSLesion_TID3252 
	 */
	public IVUSLesion_TID3252 getIVUSLesion() 
	{
		if(null == this.objIvusLesionTID3252)
			this.objIvusLesionTID3252 = new IVUSLesion_TID3252(getSRTree());
		return this.objIvusLesionTID3252;
	}

	/**
	 * 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_IVUSVessel.FINDINGS.getValue();
		String strCodeValue = EnumCV_IVUSVessel.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 enumValue This value can be one of the three Enum - EnumCM_ArterialSourceLocations, EnumCM_CoronaryArteries
	 * or EnumCM_CoronaryArterySegments.
	 */
	public void setFindingSite(int[] arrPosition, Enum enumValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_IVUSVessel.FINDING_SITE.getValue();
		String strCodeValue = EnumCV_IVUSVessel.FINDING_SITE_G_C0E3.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Arterial Lesion Location
		 */
		if(null== this.objArterialLesionLocations_CID3604)
			this.objArterialLesionLocations_CID3604 = new ArterialLesionLocations_CID3604();
		this.objArterialLesionLocations_CID3604.setArterialLesionLocation(enumValue);

		String strCM = objArterialLesionLocations_CID3604.getCodeMeaning();
		String strCV = objArterialLesionLocations_CID3604.getCodeValue();
		String strCSD = objArterialLesionLocations_CID3604.getCodingSchemeDesignator();
		String strCSV = objArterialLesionLocations_CID3604.getCodingSchemeVersion();
		 String strSNMDCTID = objArterialLesionLocations_CID3604.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, strCSV, strCM,strSNMDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets value for Topographical modifier.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumCardiovascularAnatomicLocationModifiers Enumerated value for Topographical modifier.
	 */
	public void setTopographicalModifier(int[] arrPosition, EnumCM_CardiovascularAnatomicLocationModifiers enumCardiovascularAnatomicLocationModifiers)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_IVUSVessel.TOPOGRAPHICAL_MODIFIER.getValue();
		String strCodeValue = EnumCV_IVUSVessel.TOPOGRAPHICAL_MODIFIER_G_A1F8.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Topographical modifier
		 */
		if(null== this.objAnatomicLocationModifiersCID3019)
			this.objAnatomicLocationModifiersCID3019 = new CardiovascularAnatomicLocationModifiers_CID3019();
		this.objAnatomicLocationModifiersCID3019.setCardiovascularAnatomicLocationModifiers(enumCardiovascularAnatomicLocationModifiers);

		String strCM = objAnatomicLocationModifiersCID3019.getCodeMeaning();
		String strCV = objAnatomicLocationModifiersCID3019.getCodeValue();
		String strCSD = objAnatomicLocationModifiersCID3019.getCodingSchemeDesignator();
		 String strSNMDCTID = objAnatomicLocationModifiersCID3019.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,strSNMDCTID);
		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 = objLaterality_CID244.getSNOMEDCTID();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_IVUSVessel.LATERALITY.getValue();
		String strCodeValue = EnumCV_IVUSVessel.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 Catheterization Procedure Phase.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumCatheterizationProcedurePhase Enum value for CatheterizationProcedurePhase
	 */
	public void setCatheterizationProcedurePhase(int[] arrPosition, EnumCM_IVUSProcedurePhases enumIVUSProcedurePhases)
	{
		/**
		 * Sets the value for InterventionActionsAndStatus.
		 */
		if(null== this.objProcedurePhasesCID3480)
			this.objProcedurePhasesCID3480 = new IVUSProcedurePhases_CID3480();
		this.objProcedurePhasesCID3480.setIVUSProcedurePhases(enumIVUSProcedurePhases);

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

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

	/**
	 * Sets the value for Vessel Morphology.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumVesselMorphology Enum value for VesselMorphology
	 */
	public void setVesselMorphology(int[] arrPosition, EnumCM_VesselDescriptors enumVesselDescriptors)
	{
		/**
		 * Sets the value for InterventionActionsAndStatus.
		 */
		if(null== this.objVesselDescriptorsCID3712)
			this.objVesselDescriptorsCID3712 = new VesselDescriptors_CID3712();
		this.objVesselDescriptorsCID3712.setVesselDescriptors(enumVesselDescriptors);

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

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

	/**
	 * Sets the value for Dissection in segment.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumYesNo Enum value for Yes-No.
	 */
	public void setDissectionInSegment(int[] arrPosition, EnumCM_YesNo enumYesNo)
	{
		/**
		 * Sets the value for InterventionActionsAndStatus.
		 */
		if(null== this.objYesNoCID230)
			this.objYesNoCID230 = new YesNo_CID230();
		this.objYesNoCID230.setYesNo(enumYesNo);

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

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_IVUSVessel.DISSECTION_IN_SEGMENT.getValue();
		String strCodeValue = EnumCV_IVUSVessel.DISSECTION_IN_SEGMENT_115.getValue();
		String strCSD2 = EnumCodingSchemeDesignator.NCDR.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);
	}
}
