/*******************************************************************************
 *  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.Side_CID6022;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_AccumulatedMammographyXRayDose;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_SideFromBI_RADS;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_AccumulatedMammographyXRayDose;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

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

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedMammographyXRayDose.ACCUMULATED_AVERAGEGLANDULAR_DOSE.getValue();
		String strCodeValue = EnumCV_AccumulatedMammographyXRayDose.ACCUMULATED_AVERAGEGLANDULAR_DOSE_111637.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setLaterality(int[] arrPosition,EnumCM_SideFromBI_RADS enumSideFromBI_RADS)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedMammographyXRayDose.LATERALITY.getValue();
		String strCodeValue = EnumCV_AccumulatedMammographyXRayDose.LATERALITY_G_C171.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		
		if(null== this.objSide_CID6022)
			this.objSide_CID6022 = new Side_CID6022();
		this.objSide_CID6022.setSide(enumSideFromBI_RADS);
			 strCM = objSide_CID6022.getCodeMeaning();
			 strCV = objSide_CID6022.getCodeValue();
			 strCSD = objSide_CID6022.getCodingSchemeDesignator();
			strSNMDCTID = objSide_CID6022.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);
	}
}
