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

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.UIDTypes_CID10001;
import cdac.medinfo.sdk.dcm30_04.templates.cid.SourceOfCTDoseInformation_CID10021;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ScopeOfAccumulation_CID10000;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ProcedureIntent_CID3629;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CTRadiationDose;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ProcedureIntent;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RadiosensitiveOrgans;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ScopeOfAccumulation;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_SourceOfCTDoseInformation;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_CTRadiationDose;
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 CTRadiationDose_TID10011
 */
public class CTRadiationDose_TID10011 extends Template{
	
	/**
	 * Object of PersonParticipant_TID1020
	 */
	
	private PersonParticipant_TID1020 objPersonParticipant_TID1020 ;
	/**
	 * Object of CTAccumulatedDoseData_TID10012
	 */
	
	private CTAccumulatedDoseData_TID10012 objCTAccumulatedDoseData_TID10012 ;
	
	/**
	 * Object of CTIrradiationEventData_TID10013
	 */
	
	private CTIrradiationEventData_TID10013 objCTIrradiationEventData_TID10013 ;
	/**
	 * Object of UIDTypes_CID10001
	 */
	private UIDTypes_CID10001 objUIDTypes_CID10001 ;
	/**
	 * Object of SourceOfCTDoseInformation_CID10021
	 */
	private SourceOfCTDoseInformation_CID10021 objSourceOfCTDoseInformation_CID10021 ;
	/**
	 * Object of ScopeOfAccumulation_CID10000
	 */
	private ScopeOfAccumulation_CID10000 objScopeOfAccumulation_CID10000 ;
	/**
	 * Object of ObserverContext_TID1002
	 */
	private ObserverContext_TID1002 objObserverContext_TID1002 ;
	private ProcedureIntent_CID3629 objProcedureIntent_CID3629;
	
	/**
	 * Instantiates a new CTRadiationDose_TID10011 Template.
	 * @param objTree Object of SRTree.
	 */
	public CTRadiationDose_TID10011(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves CTAccumulatedDoseData_TID10012 
	 * @return objCTAccumulatedDoseData_TID10012 Object of CTAccumulatedDoseData_TID10012 
	 */
	public CTAccumulatedDoseData_TID10012 getCTAccumulatedDoseData() 
	{
		if(null == this.objCTAccumulatedDoseData_TID10012)
			this.objCTAccumulatedDoseData_TID10012 = new CTAccumulatedDoseData_TID10012(getSRTree());
		return this.objCTAccumulatedDoseData_TID10012;
	}
	
	/**
	 * Retrieves CTIrradiationEventData_TID10013 
	 * @return objCTIrradiationEventData_TID10013 Object of CTIrradiationEventData_TID10013 
	 */
	public CTIrradiationEventData_TID10013 getCTIrradiationEventData() 
	{
		if(null == this.objCTIrradiationEventData_TID10013)
			this.objCTIrradiationEventData_TID10013 = new CTIrradiationEventData_TID10013(getSRTree());
		return this.objCTIrradiationEventData_TID10013;
	}
	/**
	 * 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 ObserverContext_TID1002 
	 * @return objObserverContext_TID1002 Object of ObserverContext_TID1002 
	 */
	public ObserverContext_TID1002 getObserverContext() 
	{
		if(null == this.objObserverContext_TID1002)
			this.objObserverContext_TID1002 = new ObserverContext_TID1002(getSRTree());
		return this.objObserverContext_TID1002;
	}
	/**
	 * Sets the value for OrganDoseInformation 
	 * @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_CTRadiationDose.XRAY_RADIATION_DOSE_REPORT.getValue();
		String strCodeValue = EnumCV_CTRadiationDose.XRAY_RADIATION_DOSE_REPORT_113701.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type Container and adding this node at specified identifier in the SR Tree.
		 */
		SRDocumentContentModule objDocumentContentModule = getSRTree().getSRDocumentContentModule();
		getSRTree().createRoot(objDocumentContentModule,strCodeMeaning,strCodeValue , strCSD, enumContinuityOfContent);	
	}
	public void setProcedureReported(int[] arrPosition, EnumCM_RadiosensitiveOrgans enumValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTRadiationDose.PROCEDURE_REPORTED.getValue();
		String strCodeValue = EnumCV_CTRadiationDose.PROCEDURE_REPORTED_121058.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD;
		
		
		 strCM = EnumCM_CTRadiationDose.COMPUTED_TOMOGRAPHY_XRAY.getValue();
		 strCV = EnumCV_CTRadiationDose.COMPUTED_TOMOGRAPHY_XRAY_P5_08000.getValue();
		 strCSD = EnumCodingSchemeDesignator.SRT.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, strCV, strCSD, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	public void setHasIntent(int[] arrPosition,EnumCM_ProcedureIntent enumProcedureIntent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTRadiationDose.HAS_INTENT.getValue();
		String strCodeValue = EnumCV_CTRadiationDose.HAS_INTENT_G_C0E8.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;
		if(null== this.objProcedureIntent_CID3629)
			this.objProcedureIntent_CID3629 = new ProcedureIntent_CID3629();
		this.objProcedureIntent_CID3629.setProcedureIntent(enumProcedureIntent);
		
		 strCM = objProcedureIntent_CID3629.getCodeMeaning();
		 strCV = objProcedureIntent_CID3629.getCodeValue();
		 strCSD = objProcedureIntent_CID3629.getCodingSchemeDesignator();
		 strSNMDCTID = objProcedureIntent_CID3629.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 setStartOfXRayIrradiation(int[] arrPosition, String strStartOfXRayIrradiation)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTRadiationDose.START_OF_XRAY_IRRADIATION.getValue();
		String strCodeValue = EnumCV_CTRadiationDose.START_OF_XRAY_IRRADIATION_113809.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type DateTime and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createDateTimeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strStartOfXRayIrradiation);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	public void setEndOfXRayIrradiation(int[] arrPosition, String strEndOfXRayIrradiation)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTRadiationDose.END_OF_XRAY_IRRADIATION.getValue();
		String strCodeValue = EnumCV_CTRadiationDose.END_OF_XRAY_IRRADIATION_113810.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type DateTime and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createDateTimeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strEndOfXRayIrradiation);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setScopeofAccumulation(int[] arrPosition,EnumCM_ScopeOfAccumulation enumScopeOfAccumulation)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTRadiationDose.SCOPE_OF_ACCUMULATION.getValue();
		String strCodeValue = EnumCV_CTRadiationDose.SCOPE_OF_ACCUMULATION_113705.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD;

		
		if(null== this.objScopeOfAccumulation_CID10000)
			this.objScopeOfAccumulation_CID10000 = new ScopeOfAccumulation_CID10000();
		this.objScopeOfAccumulation_CID10000.setScopeOfAccumulation(enumScopeOfAccumulation);
			 strCM = objScopeOfAccumulation_CID10000.getCodeMeaning();
			 strCV = objScopeOfAccumulation_CID10000.getCodeValue();
			 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 setSourceOfDoseInformation(int[] arrPosition,EnumCM_SourceOfCTDoseInformation enumSourceOfCTDoseInformation)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTRadiationDose.SOURCE_OF_DOSE_INFORMATION.getValue();
		String strCodeValue = EnumCV_CTRadiationDose.SOURCE_OF_DOSE_INFORMATION_113854.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD;

		
		if(null== this.objSourceOfCTDoseInformation_CID10021)
			this.objSourceOfCTDoseInformation_CID10021 = new SourceOfCTDoseInformation_CID10021();
		this.objSourceOfCTDoseInformation_CID10021.setSourceOfCTDoseInformation(enumSourceOfCTDoseInformation);
			 strCM = objSourceOfCTDoseInformation_CID10021.getCodeMeaning();
			 strCV = objSourceOfCTDoseInformation_CID10021.getCodeValue();
			 strCSD = objSourceOfCTDoseInformation_CID10021.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 setUIDTypes(int[] arrPosition, String strTrackingUniqueIdentifier)
	{
		/**
		 * 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, strTrackingUniqueIdentifier);
		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_CTRadiationDose.COMMENT.getValue();
		String strCodeValue = EnumCV_CTRadiationDose.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);
	}
	
	
}
