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

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.NM_PETProcedures_CID3108;
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_NM_PETProcedures;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ProcedureIntent;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RadiopharmaceuticalRadiationDoseReport;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_RadiopharmaceuticalRadiationDoseReport;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents RadiopharmaceuticalRadiationDoseTemplate -TID10021
 */
public class RadiopharmaceuticalRadiationDoseTemplate_TID10021 extends Template
{

	/**
	 * Object of RadiopharmaceuticalAdministrationEventDataTemplates_TID10022
	 */
	
	private RadiopharmaceuticalAdministrationEventDataTemplates_TID10022 objRadiopharmaceuticalAdministrationEventDataTemplates_TID10022 ;
	
	/**
	 * Object of RadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024
	 */
	
	private RadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024 objRadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024 ;
	/**
	 * Object of NM_PETProcedures_CID3108
	 */
	private NM_PETProcedures_CID3108 objNM_PETProcedures_CID3108 ;
	/**
	 * Object of ProcedureIntent_CID3629
	 */
	private ProcedureIntent_CID3629 objProcedureIntent_CID3629 ;
	
	/**
	 * Instantiates a new ChestCADCompositeFeatureBodyTemplate_TID4103 Template.
	 * @param objTree Object of SRTree.
	 */
	public RadiopharmaceuticalRadiationDoseTemplate_TID10021(SRTree objTree)
	{
		super(objTree);
	}

	/**
	 * Retrieves RadiopharmaceuticalAdministrationEventDataTemplates_TID10022 
	 * @return objRadiopharmaceuticalAdministrationEventDataTemplates_TID10022 Object of RadiopharmaceuticalAdministrationEventDataTemplates_TID10022 
	 */
	public RadiopharmaceuticalAdministrationEventDataTemplates_TID10022 getRadiopharmaceuticalAdministrationEventDataTemplates() 
	{
		if(null == this.objRadiopharmaceuticalAdministrationEventDataTemplates_TID10022)
			this.objRadiopharmaceuticalAdministrationEventDataTemplates_TID10022 = new RadiopharmaceuticalAdministrationEventDataTemplates_TID10022(getSRTree());
		return this.objRadiopharmaceuticalAdministrationEventDataTemplates_TID10022;
	}
	
	/**
	 * Retrieves RadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024 
	 * @return objRadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024 Object of RadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024 
	 */
	public RadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024 getRadiopharmaceuticalAdministrationPatientCharacteristicsTemplates() 
	{
		if(null == this.objRadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024)
			this.objRadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024 = new RadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024(getSRTree());
		return this.objRadiopharmaceuticalAdministrationPatientCharacteristicsTemplates_TID10024;
	}

	/**
	 * Sets the RadiopharmaceuticalRadiationDoseReport.
	 * @param enumContinuityOfContent object of EnumContinuityOfContent
	 */	
	public void setRadiopharmaceuticalRadiationDoseReport(EnumContinuityOfContent enumContinuityOfContent)
	{
		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadiopharmaceuticalRadiationDoseReport.RADIOPHARMACEUTICAL_RADIATION_DOSE_REPORT.getValue();
		String strCodeValue = EnumCV_RadiopharmaceuticalRadiationDoseReport.RADIOPHARMACEUTICAL_RADIATIONDOSE_REPORT_113500.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		SRDocumentContentModule objDocumentContentModule = getSRTree().getSRDocumentContentModule();
		getSRTree().createRoot(objDocumentContentModule,strCodeMeaning,strCodeValue , strCSD, enumContinuityOfContent);
	}

	/**
	 * Sets value for Associated Procedure.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumNM_PETProcedures Enumerated value for NM_PETProcedures
	 */
	public void setAssociatedProcedure(int[] arrPosition, EnumCM_NM_PETProcedures enumNM_PETProcedures)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadiopharmaceuticalRadiationDoseReport.ASSOCIATED_PROCEDURE.getValue();
		String strCodeValue = EnumCV_RadiopharmaceuticalRadiationDoseReport.ASSOCIATED_PROCEDURE_G_C2DO.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Quality Assessment
		 */
		if(null== this.objNM_PETProcedures_CID3108)
			this.objNM_PETProcedures_CID3108 = new NM_PETProcedures_CID3108();
		this.objNM_PETProcedures_CID3108.setNM_PETProcedures(enumNM_PETProcedures);

		String strCM = objNM_PETProcedures_CID3108.getCodeMeaning();
		String strCV = objNM_PETProcedures_CID3108.getCodeValue();
		String strCSD = objNM_PETProcedures_CID3108.getCodingSchemeDesignator();
		String strSNMDCTID = objNM_PETProcedures_CID3108.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 Associated Procedure.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumNM_PETProcedures Enumerated value for NM_PETProcedures
	 */
	public void setHasIntent(int[] arrPosition, EnumCM_ProcedureIntent enumProcedureIntent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_RadiopharmaceuticalRadiationDoseReport.HAS_INTENT.getValue();
		String strCodeValue = EnumCV_RadiopharmaceuticalRadiationDoseReport.HAS_INTENT_G_C0E8.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Quality Assessment
		 */
		if(null== this.objProcedureIntent_CID3629)
			this.objProcedureIntent_CID3629 =  new ProcedureIntent_CID3629();
		this.objProcedureIntent_CID3629.setProcedureIntent(enumProcedureIntent);

		String strCM = objProcedureIntent_CID3629.getCodeMeaning();
		String strCV = objProcedureIntent_CID3629.getCodeValue();
		String strCSD = objProcedureIntent_CID3629.getCodingSchemeDesignator();
		String 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);
	} 

	/**
	 * 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_RadiopharmaceuticalRadiationDoseReport.COMMENT.getValue();
		String strCodeValue = EnumCV_RadiopharmaceuticalRadiationDoseReport.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);
	}

}
