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

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.PregnancyStatus_CID6096;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PregnancyStatus;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RadiationExposureAndProtectionInformation;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_RadiationExposureAndProtectionInformation;

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

	/**
	 * Object of ObservationContext_TID1001
	 */
	private ObservationContext_TID1001 objObservationContext_TID1001;
	
	/**
	 * Object of PregnancyStatus_CID6096
	 */
	private PregnancyStatus_CID6096 objPregnancyStatus_CID6096;
	
	public RadiationExposureAndProtectionInformation_TID2008(SRTree objTree) {
		super(objTree);
	}
	/**
	 * Retrieves ObservationContext_TID1001 
	 * @return objObservationContext_TID1001 Object of ObservationContext_TID1001 
	 */
	public ObservationContext_TID1001 getObservationContext() 
	{
		if(null == this.objObservationContext_TID1001)
			this.objObservationContext_TID1001 = new ObservationContext_TID1001(getSRTree());
		return this.objObservationContext_TID1001;
	}
	public void setRadiationExposureAndProtectionInformation(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadiationExposureAndProtectionInformation.RADIATION_EXPOSURE_AND_PROTECTION_INFORMATION.getValue();
		String strCodeValue = EnumCV_RadiationExposureAndProtectionInformation.RADIATION_EXPOSURE_AND_PROTECTION_INFORMATION_73569_6.getValue();
		String strCSD2 = EnumCodingSchemeDesignator.LN.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, strCSD2, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
}
	public void setPregnancyObservable(int[] arrPosition,EnumCM_PregnancyStatus enumPregnancyStatus)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadiationExposureAndProtectionInformation.PREGNANCY_OBSERVABLE.getValue();
		String strCodeValue = EnumCV_RadiationExposureAndProtectionInformation.PREGNANCY_OBSERVABLE_364320009.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SCT.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		
		if(null== this.objPregnancyStatus_CID6096)
			this.objPregnancyStatus_CID6096 = new PregnancyStatus_CID6096();
		this.objPregnancyStatus_CID6096.setPregnancyStatus(enumPregnancyStatus);
			 strCM = objPregnancyStatus_CID6096.getCodeMeaning();
			 strCV = objPregnancyStatus_CID6096.getCodeValue();
			 strCSD = objPregnancyStatus_CID6096.getCodingSchemeDesignator();
			strSNMDCTID = objPregnancyStatus_CID6096.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 IndicationsForProcedure
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strIndicationsForProcedure String value for Comment.
	 */
	public void setIndicationsForProcedure(int[] arrPosition, String strIndicationsForProcedure)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadiationExposureAndProtectionInformation.INDICATIONS_FOR_PROCEDURE.getValue();
		String strCodeValue = EnumCM_RadiationExposureAndProtectionInformation.INDICATIONS_FOR_PROCEDURE.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.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, strIndicationsForProcedure);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for RadiationExposure
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strRadiationExposure String value for Comment.
	 */
	public void setRadiationExposure(int[] arrPosition, String strRadiationExposure)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadiationExposureAndProtectionInformation.RADIATION_EXPOSURE.getValue();
		String strCodeValue = EnumCV_RadiationExposureAndProtectionInformation.RADIATION_EXPOSURE_113921.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, strRadiationExposure);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for AdministrationOfRadiopharmaceutical
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strRadiationExposure String value for Comment.
	 */
	public void setAdministrationOfRadiopharmaceutical(int[] arrPosition, String strAdministrationOfRadiopharmaceutical)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadiationExposureAndProtectionInformation.ADMINISTRATION_OF_RADIOPHARMACEUTICAL.getValue();
		String strCodeValue = EnumCV_RadiationExposureAndProtectionInformation.ADMINISTRATION_OF_RADIOPHARMACEUTICAL_440252007.getValue();
		String strCSD = EnumCodingSchemeDesignator.SCT.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, strAdministrationOfRadiopharmaceutical);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setIrradiationAuthorizing(int[] arrPosition, String strPname)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadiationExposureAndProtectionInformation.IRRADIATION_AUTHORIZING.getValue();
		String strCodeValue = EnumCV_RadiationExposureAndProtectionInformation.IRRADIATION_AUTHORIZING_113850.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().createPnameNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strPname);

		getSRTree().addChild(objContentSequenceItem);
	}
}
