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

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
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.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Laterality;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OBGYNPelvicVascularUltrasoundMeasurementGroup;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_OBGYNPelvicVascularUltrasoundMeasurementGroup;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Measurement_TID300;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents OBGYNPelvicVascularUltrasoundMeasurementGroup - TID5026
 */
public class OBGYNPelvicVascularUltrasoundMeasurementGroup_TID5026 extends Template
{
	/**
	 * Object of Laterality_CID244
	 */
	private Laterality_CID244 objLaterality_CID244;
	/**
	 * Object of Measurement_TID300
	 */

	private Measurement_TID300 objMeasurement_TID300;
	/**
	 * Instantiates OBGYNPelvicVascularUltrasoundMeasurementGroup_TID5026 Template.
	 * @param objTree Object of SRTree.
	 */
	public OBGYNPelvicVascularUltrasoundMeasurementGroup_TID5026(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves the object of Measurement_TID300
	 * @return objMeasurement_TID300 object of Measurement_TID300
	 */
	public Measurement_TID300 getMeasurement() 
	{
		if(null == objMeasurement_TID300)
			objMeasurement_TID300 = new Measurement_TID300(getSRTree());
		return objMeasurement_TID300;
	}
	/**
	 * 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_OBGYNPelvicVascularUltrasoundMeasurementGroup.LATERALITY.getValue();
		String strCodeValue = EnumCV_OBGYNPelvicVascularUltrasoundMeasurementGroup.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 Anatomic Identifier
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strAnatomicIdentifier String value for Anatomic Identifier.
	 */
	public void setAnatomicIdentifier(int[] arrPosition, String strAnatomicIdentifier)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OBGYNPelvicVascularUltrasoundMeasurementGroup.ANATOMIC_IDENTIFIER.getValue();
		String strCodeValue = EnumCV_OBGYNPelvicVascularUltrasoundMeasurementGroup.ANATOMIC_IDENTIFIER_112050.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, strAnatomicIdentifier);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for MeasurementOrientation.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setMeasurementOrientation(int[] arrPosition)
	{
		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OBGYNPelvicVascularUltrasoundMeasurementGroup.MEASUREMENT_ORIENTATION.getValue();
		String strCodeValue = EnumCV_OBGYNPelvicVascularUltrasoundMeasurementGroup.MEASUREMENT_ORIENTATION_125105.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, "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Doppler Angle
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setDopplerAngle(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.DEGREE.getValue();
		String strCVForUnit = EnumCV_Unit.DEGREE.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OBGYNPelvicVascularUltrasoundMeasurementGroup.DOPPLER_ANGLE.getValue();
		String strCodeValue = EnumCV_OBGYNPelvicVascularUltrasoundMeasurementGroup.DOPPLER_ANGLE_125106.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Sample Volume Depth
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setSampleVolumeDepth(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.CM.getValue();
		String strCVForUnit = EnumCV_Unit.CM.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OBGYNPelvicVascularUltrasoundMeasurementGroup.SAMPLE_VOLUME_DEPTH.getValue();
		String strCodeValue = EnumCV_OBGYNPelvicVascularUltrasoundMeasurementGroup.SAMPLE_VOLUME_DEPTH_125107.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
}
