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

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.OphthalmicHorizontalDirections_CID4214;
import cdac.medinfo.sdk.dcm30_04.templates.cid.OphthalmicVerticalDirections_CID4215;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OphthalmicHorizontalDirections;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OphthalmicVerticalDirections;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_TemplateForSpectaclePrescriptionDetails;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_TemplateForSpectaclePrescriptionDetails;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_Unit;

/**
 * This class represents TemplateForSpectaclePrescriptionDetails_TID2021
 */
public class TemplateForSpectaclePrescriptionDetails_TID2021 extends Template{

	/**
	 * Object of OphthalmicHorizontalDirections_CID4214
	 */
	private OphthalmicHorizontalDirections_CID4214 objOphthalmicHorizontalDirections_CID4214 ;
	/**
	 * Object of OphthalmicVerticalDirections_CID4215
	 */
	private OphthalmicVerticalDirections_CID4215 objOphthalmicVerticalDirections_CID4215 ;
	/**
	 * Instantiates a new TemplateForSpectaclePrescriptionDetails_TID2021 Template.
	 * @param objTree Object of SRTree.
	 */
	public TemplateForSpectaclePrescriptionDetails_TID2021(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Sets the value for Sphere
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setSphere(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.DIOP.getValue();
		String strCVForUnit = EnumCV_Unit.DIOP.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TemplateForSpectaclePrescriptionDetails.SPHERE.getValue();
		String strCodeValue = EnumCV_TemplateForSpectaclePrescriptionDetails.SPHERE_F_02FB4.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

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

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TemplateForSpectaclePrescriptionDetails.CYLINDER_POWER.getValue();
		String strCodeValue = EnumCV_TemplateForSpectaclePrescriptionDetails.CYLINDER_POWER_F_A2143.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Axis
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setAxis(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_TemplateForSpectaclePrescriptionDetails.AXIS.getValue();
		String strCodeValue = EnumCV_TemplateForSpectaclePrescriptionDetails.AXIS_F_02FB7.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

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

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TemplateForSpectaclePrescriptionDetails.ADD_NEAR.getValue();
		String strCodeValue = EnumCV_TemplateForSpectaclePrescriptionDetails.ADD_NEAR_111672.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 AddIntermediate
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setAddIntermediate(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.DIOP.getValue();
		String strCVForUnit = EnumCV_Unit.DIOP.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TemplateForSpectaclePrescriptionDetails.ADD_INTERMEDIATE.getValue();
		String strCodeValue = EnumCV_TemplateForSpectaclePrescriptionDetails.ADD_INTERMEDIATE_111673.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 AddOther
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setAddOther(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.DIOP.getValue();
		String strCVForUnit = EnumCV_Unit.DIOP.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TemplateForSpectaclePrescriptionDetails.ADD_OTHER.getValue();
		String strCodeValue = EnumCV_TemplateForSpectaclePrescriptionDetails.ADD_OTHER_111674.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 Horizontal Prism Power
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setHorizontalPrismPower(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.P_DIOP.getValue();
		String strCVForUnit = EnumCV_Unit.P_DIOP.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TemplateForSpectaclePrescriptionDetails.HORIZONTAL_PRISM_POWER.getValue();
		String strCodeValue = EnumCV_TemplateForSpectaclePrescriptionDetails.HORIZONTAL_PRISM_POWER_111675.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 Vertical Prism Power
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setVerticalPrismPower(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.P_DIOP.getValue();
		String strCVForUnit = EnumCV_Unit.P_DIOP.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TemplateForSpectaclePrescriptionDetails.VERTICAL_PRISM_POWER.getValue();
		String strCodeValue = EnumCV_TemplateForSpectaclePrescriptionDetails.VERTICAL_PRISM_POWER_111677.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setHorizontalPrismBase(int[] arrPosition,EnumCM_OphthalmicHorizontalDirections enumOphthalmicHorizontalDirections)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TemplateForSpectaclePrescriptionDetails.HORIZONTAL_PRISM_BASE.getValue();
		String strCodeValue = EnumCM_TemplateForSpectaclePrescriptionDetails.HORIZONTAL_PRISM_BASE.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		
		if(null== this.objOphthalmicHorizontalDirections_CID4214)
			this.objOphthalmicHorizontalDirections_CID4214 = new OphthalmicHorizontalDirections_CID4214();
		this.objOphthalmicHorizontalDirections_CID4214.setOphthalmicHorizontalDirections(enumOphthalmicHorizontalDirections);
			 strCM = objOphthalmicHorizontalDirections_CID4214.getCodeMeaning();
			 strCV = objOphthalmicHorizontalDirections_CID4214.getCodeValue();
			 strCSD = objOphthalmicHorizontalDirections_CID4214.getCodingSchemeDesignator();
			strSNMDCTID = objOphthalmicHorizontalDirections_CID4214.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);
	}
	public void setVerticalPrismBase(int[] arrPosition,EnumCM_OphthalmicVerticalDirections enumOphthalmicVerticalDirections)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TemplateForSpectaclePrescriptionDetails.VERTICAL_PRISM_BASE.getValue();
		String strCodeValue = EnumCV_TemplateForSpectaclePrescriptionDetails.VERTICAL_PRISM_BASE_111678.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		
		if(null== this.objOphthalmicVerticalDirections_CID4215)
			this.objOphthalmicVerticalDirections_CID4215 = new OphthalmicVerticalDirections_CID4215();
		this.objOphthalmicVerticalDirections_CID4215.setOphthalmicVerticalDirections(enumOphthalmicVerticalDirections);
			 strCM = objOphthalmicVerticalDirections_CID4215.getCodeMeaning();
			 strCV = objOphthalmicVerticalDirections_CID4215.getCodeValue();
			 strCSD = objOphthalmicVerticalDirections_CID4215.getCodingSchemeDesignator();
			strSNMDCTID = objOphthalmicVerticalDirections_CID4215.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);
	}
}
