/*******************************************************************************
 *  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.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.DoseMeasurementDevices_CID10010;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_AccumulatedXRayDose;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_DoseMeasurementDevices;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RadiosensitiveOrgans;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_AccumulatedXRayDose;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.DeviceParticipant_TID1021;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents AccumulatedXRayDose - TID10002
 */
public class AccumulatedXRayDose_TID10002 extends Template {

	private DoseMeasurementDevices_CID10010 objDoseMeasurementDevices_CID10010;
	
	/**
	 * Object of AccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004
	 */
	private AccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004 objAccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004 ;
	/**
	 * Object of AccumulatedMammographyXRayDose_TID10005
	 */
	private AccumulatedMammographyXRayDose_TID10005 objAccumulatedMammographyXRayDose_TID10005 ;
	
	/**
	 * Object of AccumulatedCassetteBasedProjectionRadiographyDose_TID10006
	 */
	private AccumulatedCassetteBasedProjectionRadiographyDose_TID10006 objAccumulatedCassetteBasedProjectionRadiographyDose_TID10006 ;
	
	/**
	 * Object of AccumulatedTotalProjectionRadiographyDose_TID10007
	 */
	private AccumulatedTotalProjectionRadiographyDose_TID10007 objAccumulatedTotalProjectionRadiographyDose_TID10007 ;
	/**
	 * Object of DeviceParticipant_TID1021
	 */
	private DeviceParticipant_TID1021 objDeviceParticipant_TID1021 ;
	/**
	 * Instantiates a new AccumulatedXRayDose_TID10002 Template.
	 * @param objTree Object of SRTree.
	 */
	public AccumulatedXRayDose_TID10002(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves AccumulatedTotalProjectionRadiographyDose_TID10007 
	 * @return objAccumulatedTotalProjectionRadiographyDose_TID10007 Object of AccumulatedTotalProjectionRadiographyDose_TID10007 
	 */
	public AccumulatedTotalProjectionRadiographyDose_TID10007 getAccumulatedTotalProjectionRadiographyDose() 
	{
		if(null == this.objAccumulatedTotalProjectionRadiographyDose_TID10007)
			this.objAccumulatedTotalProjectionRadiographyDose_TID10007 = new AccumulatedTotalProjectionRadiographyDose_TID10007(getSRTree());
		return this.objAccumulatedTotalProjectionRadiographyDose_TID10007;
	}
	/**
	 * Retrieves DeviceParticipant_TID1021 
	 * @return objDeviceParticipant_TID1021 Object of DeviceParticipant_TID1021 
	 */
	public DeviceParticipant_TID1021 getDeviceParticipant() 
	{
		if(null == this.objDeviceParticipant_TID1021)
			this.objDeviceParticipant_TID1021 = new DeviceParticipant_TID1021(getSRTree());
		return this.objDeviceParticipant_TID1021;
	}
	/**
	 * Retrieves AccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004 
	 * @return objAccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004 Object of AccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004 
	 */
	public AccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004 getAccumulatedFluoroscopyAndAcquisitionProjectionXRayDose() 
	{
		if(null == this.objAccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004)
			this.objAccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004 = new AccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004(getSRTree());
		return this.objAccumulatedFluoroscopyAndAcquisitionProjectionXRayDose_TID10004;
	}
	/**
	 * Retrieves AccumulatedMammographyXRayDose_TID10005 
	 * @return objAccumulatedMammographyXRayDose_TID10005 Object of AccumulatedMammographyXRayDose_TID10005 
	 */
	public AccumulatedMammographyXRayDose_TID10005 getAccumulatedMammographyXRayDose() 
	{
		if(null == this.objAccumulatedMammographyXRayDose_TID10005)
			this.objAccumulatedMammographyXRayDose_TID10005 = new AccumulatedMammographyXRayDose_TID10005(getSRTree());
		return this.objAccumulatedMammographyXRayDose_TID10005;
	}
	/**
	 * Retrieves AccumulatedCassetteBasedProjectionRadiographyDose_TID10006 
	 * @return objAccumulatedCassetteBasedProjectionRadiographyDose_TID10006 Object of AccumulatedCassetteBasedProjectionRadiographyDose_TID10006 
	 */
	public AccumulatedCassetteBasedProjectionRadiographyDose_TID10006 getAccumulatedCassetteBasedProjectionRadiographyDose() 
	{
		if(null == this.objAccumulatedCassetteBasedProjectionRadiographyDose_TID10006)
			this.objAccumulatedCassetteBasedProjectionRadiographyDose_TID10006 = new AccumulatedCassetteBasedProjectionRadiographyDose_TID10006(getSRTree());
		return this.objAccumulatedCassetteBasedProjectionRadiographyDose_TID10006;
	}
	/**
	 * Sets the value for Accumulated X-RayDose Data
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setAccumulatedXRayDoseData(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedXRayDose.ACCUMULATED_X_RAYDOSE_DATA.getValue();
		String strCodeValue = EnumCV_AccumulatedXRayDose.ACCUMULATED_X_RAYDOSE_DATA_113702.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type Container and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Calibration
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setCalibration(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedXRayDose.CALIBRATION.getValue();
		String strCodeValue = EnumCV_AccumulatedXRayDose.CALIBRATION_122250.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type Container and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	public void setAcquisitionPlane(int[] arrPosition, EnumCM_RadiosensitiveOrgans enumValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedXRayDose.ACQUISITION_PLANE.getValue();
		String strCodeValue = EnumCV_AccumulatedXRayDose.ACQUISITION_PLANE_113764.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.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, strCSDesg, "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setDoseMeasurementDevice(int[] arrPosition,EnumCM_DoseMeasurementDevices enumDoseMeasurementDevices)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedXRayDose.DOSE_MEASUREMENT_DEVICE.getValue();
		String strCodeValue = EnumCV_AccumulatedXRayDose.DOSE_MEASUREMENT_DEVICE_113794.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;
		if(null== this.objDoseMeasurementDevices_CID10010)
			this.objDoseMeasurementDevices_CID10010 = new DoseMeasurementDevices_CID10010();
		this.objDoseMeasurementDevices_CID10010.setDoseMeasurementDevices(enumDoseMeasurementDevices);
		
		 strCM = objDoseMeasurementDevices_CID10010.getCodeMeaning();
		 strCV = objDoseMeasurementDevices_CID10010.getCodeValue();
		 strCSD = objDoseMeasurementDevices_CID10010.getCodingSchemeDesignator();
		 strSNMDCTID = objDoseMeasurementDevices_CID10010.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);
	}
	/**
	 * Sets the value for Calibration Factor
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setCalibrationFactor(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_AccumulatedXRayDose.CALIBRATION_FACTOR.getValue();
		String strCodeValue = EnumCV_AccumulatedXRayDose.CALIBRATION_FACTOR_122322.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 Calibration Uncertainty
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setCalibrationUncertainty(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.PERCENTAGE.getValue();
		String strCVForUnit = EnumCV_Unit.PERCENTAGE.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedXRayDose.CALIBRATION_FACTOR.getValue();
		String strCodeValue = EnumCV_AccumulatedXRayDose.CALIBRATION_FACTOR_122322.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 Calibration ResponsibleParty
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strCalibrationResponsibleParty String value for Comment.
	 */
	public void setCalibrationResponsibleParty(int[] arrPosition, String strCalibrationResponsibleParty)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedXRayDose.CALIBRATION_RESPONSIBLE_PARTY.getValue();
		String strCodeValue = EnumCV_AccumulatedXRayDose.CALIBRATION_RESPONSIBLE_PARTY_113724.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, strCalibrationResponsibleParty);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Calibration Protocol
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strCalibrationProtocol String value for Comment.
	 */
	public void setCalibrationProtocol(int[] arrPosition, String strCalibrationProtocol)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedXRayDose.CALIBRATION_PROTOCOL.getValue();
		String strCodeValue = EnumCV_AccumulatedXRayDose.CALIBRATION_PROTOCOL_113720.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, strCalibrationProtocol);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setCalibrationDate(int[] arrPosition, String strRadiopharmaceuticalStartDateTime)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_AccumulatedXRayDose.CALIBRATION_DATE.getValue();
		String strCodeValue = EnumCV_AccumulatedXRayDose.CALIBRATION_DATE_113723.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type UIDREF and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createDateTimeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strRadiopharmaceuticalStartDateTime);
		getSRTree().addChild(objContentSequenceItem);
	}
}
