/*******************************************************************************
 *  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.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.CTDoseReferenceAuthorities_CID10015;
import cdac.medinfo.sdk.dcm30_04.templates.cid.EffectiveDoseEvaluationMethod_CID10011;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CTAccumulatedDoseData;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CTDoseReferenceAuthorities;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_EffectiveDoseEvaluationMethod;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Laterality;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OrganDoseTemplates;
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_CTAccumulatedDoseData;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_OrganDoseTemplates;
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.DeviceParticipant_TID1021;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents CTAccumulatedDoseData_TID10012
 */
public class CTAccumulatedDoseData_TID10012 extends Template{

	/**
	 * Object of DeviceParticipant_TID1021
	 */
	
	private DeviceParticipant_TID1021 objDeviceParticipant_TID1021 ;
	
	private EffectiveDoseEvaluationMethod_CID10011 objEffectiveDoseEvaluationMethod_CID10011;
	
	private CTDoseReferenceAuthorities_CID10015 objCTDoseReferenceAuthorities_CID10015;
	/**
	 * Instantiates a new CTAccumulatedDoseData_TID10012 Template.
	 * @param objTree Object of SRTree.
	 */
	public CTAccumulatedDoseData_TID10012(SRTree objTree)
	{
		super(objTree);
	}
	
	/**
	 * 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;
	}
	/**
	 * Sets the value for CTAccumulated DoseData
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setCTAccumulatedDoseData(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.CT_ACCUMULATED_DOSEDATA.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.CT_ACCUMULATED_DOSEDATA_113811.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().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Radiopharmaceutical RadiationDose Report
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setConditionEffectiveDoseMeasured(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.CONDITION_EFFECTIVE_DOSE_MEASURED.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.CONDITION_EFFECTIVE_DOSE_MEASURED_113816.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().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for TotalNumber of IrradiationEvents
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setTotalNumberOfIrradiationEvents(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.EVENTS.getValue();
		String strCVForUnit = EnumCV_Unit.EVENTS.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.TOTAL_NUMBER_OF_IRRADIATION_EVENTS.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.TOTAL_NUMBER_OF_IRRADIATION_EVENTS_113812.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 CT Dose Length Product Total
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setCTDoseLengthProductTotal(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.MGY_DOT_CM.getValue();
		String strCVForUnit = EnumCV_Unit.MGY_DOT_CM.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

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

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.CT_EFFECTIVE_DOSE_TOTAL.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.CT_EFFECTIVE_DOSE_TOTAL_113814.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 ReferenceAuthority
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strReferenceAuthority String value for Comment.
	 */
	public void setReferenceAuthority(int[] arrPosition, String strReferenceAuthority)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.REFERENCE_AUTHORITY.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.REFERENCE_AUTHORITY_121406.getValue();
		String strCSDesg = 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, strCSDesg, strReferenceAuthority);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Patient Model
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strReferenceAuthority String value for Comment.
	 */
	public void setPatientModel(int[] arrPosition, String strReferenceAuthority)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.PATIENT_MODEL.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.PATIENT_MODEL_113815.getValue();
		String strCSDesg = 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, strCSDesg, strReferenceAuthority);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Effective Dose PhantomType
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strReferenceAuthority String value for Comment.
	 */
	public void setEffectiveDosePhantomType(int[] arrPosition, String strReferenceAuthority)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.EFFECTIVE_DOSE_PHANTOM_TYPE.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.EFFECTIVE_DOSE_PHANTOM_TYPE_113817.getValue();
		String strCSDesg = 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, strCSDesg, strReferenceAuthority);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Dosimeter Type
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strReferenceAuthority String value for Comment.
	 */
	public void setDosimeterType(int[] arrPosition, String strDosimeterType)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.DOSIMETER_TYPE.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.DOSIMETER_TYPE_113818.getValue();
		String strCSDesg = 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, strCSDesg, strDosimeterType);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Comment
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strReferenceAuthority String value for Comment.
	 */
	public void setComment(int[] arrPosition, String strComment)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.COMMENT.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.COMMENT_121106.getValue();
		String strCSDesg = 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, strCSDesg, strComment);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	public void setReferenceAuthority(int[] arrPosition,EnumCM_CTDoseReferenceAuthorities enumCTDoseReferenceAuthorities)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.REFERENCE_AUTHORITY.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.REFERENCE_AUTHORITY_121406.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD;

		if(null== this.objCTDoseReferenceAuthorities_CID10015)
			this.objCTDoseReferenceAuthorities_CID10015 = new CTDoseReferenceAuthorities_CID10015();
		this.objCTDoseReferenceAuthorities_CID10015.setCTDoseReferenceAuthorities(enumCTDoseReferenceAuthorities);
		 strCM = objCTDoseReferenceAuthorities_CID10015.getCodeMeaning();
		 strCV = objCTDoseReferenceAuthorities_CID10015.getCodeValue();
		 strCSD = objCTDoseReferenceAuthorities_CID10015.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 setMeasurementMethod(int[] arrPosition,EnumCM_EffectiveDoseEvaluationMethod enumEffectiveDoseEvaluationMethod)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CTAccumulatedDoseData.MEASUREMENT_METHOD.getValue();
		String strCodeValue = EnumCV_CTAccumulatedDoseData.MEASUREMENT_METHOD_G_C036.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD;

		if(null== this.objEffectiveDoseEvaluationMethod_CID10011)
			this.objEffectiveDoseEvaluationMethod_CID10011 = new EffectiveDoseEvaluationMethod_CID10011();
		this.objEffectiveDoseEvaluationMethod_CID10011.setEffectiveDoseEvaluationMethod(enumEffectiveDoseEvaluationMethod);
		 strCM = objEffectiveDoseEvaluationMethod_CID10011.getCodeMeaning();
		 strCV = objEffectiveDoseEvaluationMethod_CID10011.getCodeValue();
		 strCSD = objEffectiveDoseEvaluationMethod_CID10011.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);
	}
}
