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

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.FiducialFeature_CID3837;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Laterality_CID244;
import cdac.medinfo.sdk.dcm30_04.templates.cid.MinMaxMean_CID3488;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_FiducialFeature;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Laterality;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_MinMaxMean;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_VesselMeasurements;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_VesselMeasurements;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.ImageOrSpatialCoordinates_TID320;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents VesselMeasurements_TID3907
 */
public class VesselMeasurements_TID3907 extends Template
{
	private static final String strCM = null;
	
	/**
	 * Object of ImageOrSpatialCoordinates_TID320
	 */
	private ImageOrSpatialCoordinates_TID320 objImageOrSpatialCoordinatesTID320;
	
	/**
	 * Object of Laterality_CID244
	 */
	private Laterality_CID244 objLateralityCID244;
	
	/**
	 * Object of FiducialFeature_CID3837
	 */
	private FiducialFeature_CID3837 objFiducialFeatureCID3837;
	
	/**
	 * Object of MinMaxMean_CID3488
	 */
	private MinMaxMean_CID3488 objMinMaxMeanCID3488;

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

	/**
	 * Retrieves ImageOrSpatialCoordinates.
	 * @return objImageOrSpatialCoordinatesTID320 Object of ImageOrSpatialCoordinates_TID320 
	 */
	public ImageOrSpatialCoordinates_TID320 getImageOrSpatialCoordinates()
	{
		if(null == this.objImageOrSpatialCoordinatesTID320)
			this.objImageOrSpatialCoordinatesTID320 = new ImageOrSpatialCoordinates_TID320(getSRTree());
		return this.objImageOrSpatialCoordinatesTID320;
	}
	
	/**
	 * Sets the value for Lumen Diameter Stenosis.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue t 
	 */
	public void setLumenDiameterStenosis(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VesselMeasurements.LUMEN_DIAMETER_STENOSIS.getValue();
		String strCodeValue = EnumCV_VesselMeasurements.LUMEN_DIAMETER_STENOSIS_R_101BB.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 *Creating a node of Value Type NUM and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, arrNumericValue, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Lumen Area Stenosis.Distance"
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue t 
	 */
	public void setLumenAreaStenosis(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VesselMeasurements.LUMEN_AREA_STENOSIS.getValue();
		String strCodeValue = EnumCV_VesselMeasurements.LUMEN_AREA_STENOSIS_R_101BA.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 *Creating a node of Value Type NUM and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, arrNumericValue, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Distance.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue t 
	 */
	public void setDistance(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VesselMeasurements.DISTANCE.getValue();
		String strCodeValue = EnumCV_VesselMeasurements.DISTANCE_121206.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 *Creating a node of Value Type NUM and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, arrNumericValue, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Laterality.Finding Site
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setLaterality(int[] arrPosition, EnumCM_Laterality enumLaterality)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VesselMeasurements.LATERALITY.getValue();
		String strCodeValue = EnumCV_VesselMeasurements.LATERALITY_G_C171.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objLateralityCID244)
			this.objLateralityCID244 = new Laterality_CID244();
		this.objLateralityCID244.setLaterality(enumLaterality);

		String strCM = objLateralityCID244.getCodeMeaning();
		String strCV = objLateralityCID244.getCodeValue();
		String strCSD = objLateralityCID244.getCodingSchemeDesignator();
		String strSNOMEDCTID = objLateralityCID244.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, strCSD, strCSDesg, strCM, strCV, strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}
		
	/**
	 * Sets the value for Vessel Lumen Diameter.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue 
	 */
	public void setVesselLumenDiameter(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VesselMeasurements.VESSEL_LUMEN_DIAMETER.getValue();
		String strCodeValue = EnumCV_VesselMeasurements.VESSEL_LUMEN_DIAMETER_G_0364.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		
		/**
		 *Creating a node of Value Type NUM and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, arrNumericValue, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Derivation.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setDerivation(int[] arrPosition, EnumCM_MinMaxMean enumMinMaxMean)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VesselMeasurements.DERIVATION.getValue();
		String strCodeValue = EnumCV_VesselMeasurements.DERIVATION_121401.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objMinMaxMeanCID3488)
			this.objMinMaxMeanCID3488 = new MinMaxMean_CID3488();
		this.objMinMaxMeanCID3488.setMinMaxMean(enumMinMaxMean);

		String strCM = objMinMaxMeanCID3488.getCodeMeaning();
		String strCV = objMinMaxMeanCID3488.getCodeValue();
		String strCSD = objMinMaxMeanCID3488.getCodingSchemeDesignator();
		String strSNOMEDCTID = objMinMaxMeanCID3488.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, strCM, strCSDesg,strCV ,strCSD ,strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Relative Position.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue 
	 */
	public void setRelativePosition(int[] arrPosition, String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VesselMeasurements.RELATIVE_POSITION.getValue();
		String strCodeValue = EnumCV_VesselMeasurements.RELATIVE_POSITION_122337.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 *Creating a node of Value Type NUM and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, arrNumericValue, "", "", "", "", "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Fiducial Feature.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setFiducialFeature(int[] arrPosition, EnumCM_FiducialFeature enumFiducialFeature)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VesselMeasurements.FIDUCIAL_FEATURE.getValue();
		String strCodeValue = EnumCV_VesselMeasurements.FIDUCIAL_FEATURE_122340.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objFiducialFeatureCID3837)
			this.objFiducialFeatureCID3837 = new FiducialFeature_CID3837();
		this.objFiducialFeatureCID3837.setFiducialFeature(enumFiducialFeature);

		String strCM = objFiducialFeatureCID3837.getCodeMeaning();
		String strCV = objFiducialFeatureCID3837.getCodeValue();
		String strCSD = objFiducialFeatureCID3837.getCodingSchemeDesignator();
		String strSNOMEDCTID = objFiducialFeatureCID3837.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, strCSD, strCSDesg, strCM ,strCV, strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}

}
