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

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.RadiationDoseReferencePoints_CID10025;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_AccumulatedTotalProjectionRadiographyDose;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RadiationDoseReferencePoints;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RadiopharmaceuticalAdministrationEventDataTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_AccumulatedTotalProjectionRadiographyDose;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_RadiopharmaceuticalAdministrationEventDataTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents AccumulatedTotalProjectionRadiographyDose_TID10007
 */
public class AccumulatedTotalProjectionRadiographyDose_TID10007 extends Template {
	
	private RadiationDoseReferencePoints_CID10025 objRadiationDoseReferencePoints_CID10025;
	
	/**
	 * Instantiates a new AccumulatedTotalProjectionRadiographyDose_TID10007 Template.
	 * @param objTree Object of SRTree.
	 */
	public AccumulatedTotalProjectionRadiographyDose_TID10007(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Sets the value for DoseAreaProductTotal
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setDoseAreaProductTotal(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.GY_DOT_MTwo.getValue();
		String strCVForUnit = EnumCV_Unit.GY_DOT_MTwo.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedTotalProjectionRadiographyDose.DOSE_AREA_PRODUCT_TOTAL.getValue();
		String strCodeValue = EnumCV_AccumulatedTotalProjectionRadiographyDose.DOSE_AREA_PRODUCT_TOTAL_113722.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 Dose (RP) Total
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setDoseRPTotal(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.GY.getValue();
		String strCVForUnit = EnumCV_Unit.GY.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedTotalProjectionRadiographyDose.DOSE_RP_TOTAL.getValue();
		String strCodeValue = EnumCV_AccumulatedTotalProjectionRadiographyDose.DOSE_RP_TOTAL_113725.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 Distance Source toReference Point
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setDistanceSourcetoReferencePoint(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.MM.getValue();
		String strCVForUnit = EnumCV_Unit.MM.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedTotalProjectionRadiographyDose.DISTANCE_SOURCE_TO_REFERENCE_POINT.getValue();
		String strCodeValue = EnumCV_AccumulatedTotalProjectionRadiographyDose.DISTANCE_SOURCE_TO_REFERENCE_POINT_113737.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 TotalNumber of RadiographicFrames
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setTotalNumberofRadiographicFrames(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.NOUNITS.getValue();
		String strCVForUnit = EnumCV_Unit.NOUNITS.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedTotalProjectionRadiographyDose.TOTALNUMBER_OF_RADIOGRAPHIC_FRAMES.getValue();
		String strCodeValue = EnumCV_AccumulatedTotalProjectionRadiographyDose.TOTALNUMBER_OF_RADIOGRAPHIC_FRAMES_113731.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 Reference Point Definition
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strComment String value for Comment.
	 */
	public void setReferencePointDefinition(int[] arrPosition, String strComment)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedTotalProjectionRadiographyDose.REFERENCE_POINT_DEFINITION.getValue();
		String strCodeValue = EnumCV_AccumulatedTotalProjectionRadiographyDose.REFERENCE_POINT_DEFINITION_113780.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, strComment);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setReferencePointDefinition(int[] arrPosition,EnumCM_RadiationDoseReferencePoints enumRadiationDoseReferencePoints)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadiopharmaceuticalAdministrationEventDataTemplates.LATERALITY.getValue();
		String strCodeValue = EnumCV_RadiopharmaceuticalAdministrationEventDataTemplates.LATERALITY_G_C171.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD;

		if(null== this.objRadiationDoseReferencePoints_CID10025)
			this.objRadiationDoseReferencePoints_CID10025 = new RadiationDoseReferencePoints_CID10025();
		this.objRadiationDoseReferencePoints_CID10025.setRadiationDoseReferencePoints(enumRadiationDoseReferencePoints);
		 strCM = objRadiationDoseReferencePoints_CID10025.getCodeMeaning();
		 strCV = objRadiationDoseReferencePoints_CID10025.getCodeValue();
		 strCSD = objRadiationDoseReferencePoints_CID10025.getCodingSchemeDesignator();
		
		
		/**
		 * 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);
	}
}
