/*******************************************************************************
 *  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.dicommodel.modules.SRDocumentContentModule;
import cdac.medinfo.sdk.dcm30_04.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ProcedureIntent_CID3629;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ProjectionXRayAcquisitionDeviceTypes_CID10032;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ScopeOfAccumulation_CID10000;
import cdac.medinfo.sdk.dcm30_04.templates.cid.SourceOfProjectionXRayDoseInformation_CID10020;
import cdac.medinfo.sdk.dcm30_04.templates.cid.UIDTypes_CID10001;
import cdac.medinfo.sdk.dcm30_04.templates.cid.YesNo_CID230;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ProcedureIntent;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ProjectionXRayAcquisitionDeviceTypes;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ProjectionXRayRadiationDose;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ScopeOfAccumulation;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_SourceOfProjectionXRayDoseInformation;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_YesNo;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_ProjectionXRayRadiationDose;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.ObserverContext_TID1002;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.PersonParticipant_TID1020;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents ProjectionXRayRadiationDose - TID10001 
 */
public class ProjectionXRayRadiationDose_TID10001 extends Template{

	/**
	 * Object of ObserverContext_TID1002
	 */

	private ObserverContext_TID1002 objObserverContext_TID1002;
	
	/**
	 * Object of UIDTypes_CID10001
	 */
	private UIDTypes_CID10001 objUIDTypes_CID10001 ;
	/**
	 * Object of SourceOfProjectionXRayDoseInformation_CID10020
	 */
	private SourceOfProjectionXRayDoseInformation_CID10020 objSourceOfProjectionXRayDoseInformation_CID10020 ;
	/**
	 * Object of ScopeOfAccumulation_CID10000
	 */
	private ScopeOfAccumulation_CID10000 objScopeOfAccumulation_CID10000;
	/**
	 * Object of AccumulatedXRayDose_TID10002
	 */
	private AccumulatedXRayDose_TID10002 objAccumulatedXRayDose_TID10002 ;
	private YesNo_CID230 objYesNo_CID230;
	/**
	 * Object of ProjectionXRayAcquisitionDeviceTypes_CID10032
	 */
	private ProjectionXRayAcquisitionDeviceTypes_CID10032 objProjectionXRayAcquisitionDeviceTypes;
	/**
	 * Object of ProcedureIntent_CID3629
	 */
	private ProcedureIntent_CID3629 objTemporalPeriodsRelatingToProcedureOrTherapyCID12102;
	/**
	 * Object of IrradiationEventXRayData_TID10003
	 */
	private IrradiationEventXRayData_TID10003 objIrradiationEventXRayData_TID10003 ;
	
	/**
	 * Object of PersonParticipant_TID1020
	 */
	private PersonParticipant_TID1020 objPersonParticipant_TID1020 ;
	/**
	 * Instantiates a new ProjectionXRayRadiationDose_TID10001 Template.
	 * @param objTree Object of SRTree.
	 */
	public ProjectionXRayRadiationDose_TID10001(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves PersonParticipant_TID1020 
	 * @return objPersonParticipant_TID1020 Object of PersonParticipant_TID1020 
	 */
	public PersonParticipant_TID1020 getPersonParticipant() 
	{
		if(null == this.objPersonParticipant_TID1020)
			this.objPersonParticipant_TID1020 = new PersonParticipant_TID1020(getSRTree());
		return this.objPersonParticipant_TID1020;
	}
	/**
	 * Retrieves IrradiationEventXRayData_TID10003 
	 * @return objIrradiationEventXRayData_TID10003 Object of IrradiationEventXRayData_TID10003 
	 */
	public IrradiationEventXRayData_TID10003 getIrradiationEventXRayData() 
	{
		if(null == this.objIrradiationEventXRayData_TID10003)
			this.objIrradiationEventXRayData_TID10003 = new IrradiationEventXRayData_TID10003(getSRTree());
		return this.objIrradiationEventXRayData_TID10003;
	}
	/**
	 * Retrieves the object of ObserverContext_TID1002
	 * @return objObserverContext_TID1002 Object of ObserverContext_TID1002.
	 */
	public ObserverContext_TID1002 getObserverContext_TID1002() 
	{
		if(null == objObserverContext_TID1002)
			objObserverContext_TID1002 = new ObserverContext_TID1002(getSRTree());
		return objObserverContext_TID1002;
	}
	/**
	 * Retrieves AccumulatedXRayDose_TID10002 
	 * @return objAccumulatedXRayDose_TID10002 Object of AccumulatedXRayDose_TID10002 
	 */
	public AccumulatedXRayDose_TID10002 getAccumulatedXRayDose() 
	{
		if(null == this.objAccumulatedXRayDose_TID10002)
			this.objAccumulatedXRayDose_TID10002 = new AccumulatedXRayDose_TID10002(getSRTree());
		return this.objAccumulatedXRayDose_TID10002;
	}
	/**
	 * Sets the value for X-RayRadiation Dose Report
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setXRayRadiationDoseReport( EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ProjectionXRayRadiationDose.XRAY_RADIATION_DOSE_REPORT.getValue();
		String strCodeValue = EnumCV_ProjectionXRayRadiationDose.XRAY_RADIATION_DOSE_REPORT_113701.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type CONTAINER and adding this node as root of a tree.
		 */
		SRDocumentContentModule objDocumentContentModule = getSRTree().getSRDocumentContentModule();
		getSRTree().createRoot(objDocumentContentModule,strCodeMeaning,strCodeValue , strCSD, enumContinuityOfContent);
	}
	
	/**
	 * Sets value for HasIntent.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumProcedureIntent Enumerated value for TemporalPeriodsRelatingToProcedureOrTherapy.
	 */
	public void setHasIntent(int[] arrPosition,EnumCM_ProcedureIntent enumProcedureIntent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ProjectionXRayRadiationDose.HAS_INTENT.getValue();
		String strCodeValue = EnumCV_ProjectionXRayRadiationDose.HAS_INTENT_G_C0E8.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Vessel Branch
		 */
		if(null== this.objTemporalPeriodsRelatingToProcedureOrTherapyCID12102)
			this.objTemporalPeriodsRelatingToProcedureOrTherapyCID12102 = new ProcedureIntent_CID3629();
		this.objTemporalPeriodsRelatingToProcedureOrTherapyCID12102.setProcedureIntent(enumProcedureIntent);

		String strCM = objTemporalPeriodsRelatingToProcedureOrTherapyCID12102.getCodeMeaning();
		String strCV = objTemporalPeriodsRelatingToProcedureOrTherapyCID12102.getCodeValue();
		String strCSD = objTemporalPeriodsRelatingToProcedureOrTherapyCID12102.getCodingSchemeDesignator();
		String strSNMDCTID = objTemporalPeriodsRelatingToProcedureOrTherapyCID12102.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 value for Procedure reported.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumProcedureIntent Enumerated value for TemporalPeriodsRelatingToProcedureOrTherapy.
	 */
	public void setProcedurereported(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ProjectionXRayRadiationDose.PROCEDURE_REPORTED.getValue();
		String strCodeValue = EnumCV_ProjectionXRayRadiationDose.PROCEDURE_REPORTED_121058.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);
	}	
	/**
	 * Sets value for Acquisition Device Type
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumTemporalPeriodsRelatingToProcedureOrTherapy Enumerated value for TemporalPeriodsRelatingToProcedureOrTherapy.
	 */
	public void setAcquisitionDeviceType(int[] arrPosition,EnumCM_ProjectionXRayAcquisitionDeviceTypes enumProjectionXRayAcquisitionDeviceTypes)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ProjectionXRayRadiationDose.ACQUISITION_DEVICE_TYPE.getValue();
		String strCodeValue = EnumCV_ProjectionXRayRadiationDose.ACQUISITION_DEVICE_TYPE_122142.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for Vessel Branch
		 */
		if(null== this.objProjectionXRayAcquisitionDeviceTypes)
			this.objProjectionXRayAcquisitionDeviceTypes = new ProjectionXRayAcquisitionDeviceTypes_CID10032();
		this.objProjectionXRayAcquisitionDeviceTypes.setProjectionXRayAcquisitionDeviceTypes(enumProjectionXRayAcquisitionDeviceTypes);

		String strCM = objProjectionXRayAcquisitionDeviceTypes.getCodeMeaning();
		String strCV = objProjectionXRayAcquisitionDeviceTypes.getCodeValue();
		String strCSD = objProjectionXRayAcquisitionDeviceTypes.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);
	}
	/**
	 * Sets value for Scopeof Accumulation
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumScopeOfAccumulation Enumerated value for TemporalPeriodsRelatingToProcedureOrTherapy.
	 */
	public void setScopeOfAccumulation(int[] arrPosition, EnumCM_ScopeOfAccumulation enumScopeOfAccumulation)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ProjectionXRayRadiationDose.SCOPE_OF_ACCUMULATION.getValue();
		String strCodeValue = EnumCV_ProjectionXRayRadiationDose.SCOPE_OF_ACCUMULATION_113705.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Vessel Branch
		 */
		if(null== this.objScopeOfAccumulation_CID10000)
			this.objScopeOfAccumulation_CID10000 = new ScopeOfAccumulation_CID10000();
		this.objScopeOfAccumulation_CID10000.setScopeOfAccumulation(enumScopeOfAccumulation);
		String strCM = objScopeOfAccumulation_CID10000.getCodeMeaning();
		String strCV = objScopeOfAccumulation_CID10000.getCodeValue();
		String strCSD = objScopeOfAccumulation_CID10000.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);
	}
	public void setXRayDetectorDataAvailable(int[] arrPosition,EnumCM_YesNo enumYesNo)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ProjectionXRayRadiationDose.X_RAY_DETECTOR_DATA_AVAILABLE.getValue();
		String strCodeValue = EnumCV_ProjectionXRayRadiationDose.X_RAY_DETECTOR_DATA_AVAILABLE_113945.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;
		if(null== this.objYesNo_CID230)
			this.objYesNo_CID230 = new YesNo_CID230();
		this.objYesNo_CID230.setYesNo(enumYesNo);
		
		 strCM = objYesNo_CID230.getCodeMeaning();
		 strCV = objYesNo_CID230.getCodeValue();
		 strCSD = objYesNo_CID230.getCodingSchemeDesignator();
		 strSNMDCTID = objYesNo_CID230.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 setXRaySourceDataAvailable(int[] arrPosition,EnumCM_YesNo enumYesNo)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ProjectionXRayRadiationDose.X_RAYSOURCE_DATA_AVAILABLE.getValue();
		String strCodeValue = EnumCV_ProjectionXRayRadiationDose.X_RAYSOURCE_DATA_AVAILABLE_113943.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;
		if(null== this.objYesNo_CID230)
			this.objYesNo_CID230 = new YesNo_CID230();
		this.objYesNo_CID230.setYesNo(enumYesNo);
		
		 strCM = objYesNo_CID230.getCodeMeaning();
		 strCV = objYesNo_CID230.getCodeValue();
		 strCSD = objYesNo_CID230.getCodingSchemeDesignator();
		 strSNMDCTID = objYesNo_CID230.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 setXRayMechanicalDataAvailable(int[] arrPosition,EnumCM_YesNo enumYesNo)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ProjectionXRayRadiationDose.X_RAY_MECHANICAL_DATA_AVAILABLE.getValue();
		String strCodeValue = EnumCV_ProjectionXRayRadiationDose.X_RAY_MECHANICAL_DATA_AVAILABLE_113944.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;
		if(null== this.objYesNo_CID230)
			this.objYesNo_CID230 = new YesNo_CID230();
		this.objYesNo_CID230.setYesNo(enumYesNo);
		
		 strCM = objYesNo_CID230.getCodeMeaning();
		 strCV = objYesNo_CID230.getCodeValue();
		 strCSD = objYesNo_CID230.getCodingSchemeDesignator();
		 strSNMDCTID = objYesNo_CID230.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 setSourceofDoseInformation(int[] arrPosition,EnumCM_SourceOfProjectionXRayDoseInformation enumSourceOfProjectionXRayDoseInformation)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ProjectionXRayRadiationDose.SOURCE_OF_DOSE_INFORMATION.getValue();
		String strCodeValue = EnumCV_ProjectionXRayRadiationDose.SOURCE_OF_DOSE_INFORMATION_113854.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		if(null== this.objSourceOfProjectionXRayDoseInformation_CID10020)
			this.objSourceOfProjectionXRayDoseInformation_CID10020 = new SourceOfProjectionXRayDoseInformation_CID10020();
		this.objSourceOfProjectionXRayDoseInformation_CID10020.setSourceOfProjectionXRayDoseInformation(enumSourceOfProjectionXRayDoseInformation);
		 strCM = objSourceOfProjectionXRayDoseInformation_CID10020.getCodeMeaning();
		 strCV = objSourceOfProjectionXRayDoseInformation_CID10020.getCodeValue();
		 strCSD = objSourceOfProjectionXRayDoseInformation_CID10020.getCodingSchemeDesignator();
		 strSNMDCTID = objSourceOfProjectionXRayDoseInformation_CID10020.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 setUIDTypes(int[] arrPosition, String strUIDTypes)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = objUIDTypes_CID10001.getCodeMeaning();
		String strCV = objUIDTypes_CID10001.getCodeValue();
		String strCSD = objUIDTypes_CID10001.getCodingSchemeDesignator();
		/**
		 * Creating a node of Value Type UIDREF and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createUIDREFNode(arrPosition, strCM, strCV, strCSD, strUIDTypes);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Comment
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strComment String value for Comment.
	 */
	public void setComment(int[] arrPosition, String strComment)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ProjectionXRayRadiationDose.COMMENT.getValue();
		String strCodeValue = EnumCV_ProjectionXRayRadiationDose.COMMENT_121106.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);
	}
}
