/*******************************************************************************
 *  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.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Laterality_CID244;
import cdac.medinfo.sdk.dcm30_04.templates.cid.RadiopharmaceuticalOrganDoseReferenceAuthority_CID10040;
import cdac.medinfo.sdk.dcm30_04.templates.cid.RadiosensitiveOrgans_CID10044;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
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_RadiopharmaceuticalOrganDoseReferenceAuthority;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RadiosensitiveOrgans;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_OrganDoseTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;
/**
 * This class represents OrganDoseTemplates- TID10023
 */
public class OrganDoseTemplates_TID10023 extends Template {

	
	private RadiosensitiveOrgans_CID10044 objRadiosensitiveOrgans_CID10044;
	private RadiopharmaceuticalOrganDoseReferenceAuthority_CID10040 objRadiopharmaceuticalOrganDoseReferenceAuthority_CID10040;
	
	private Laterality_CID244 objLaterality_CID244;
	public OrganDoseTemplates_TID10023(SRTree objTree) {
		super(objTree);
	}
	/**
	 * 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 setOrganDoseInformation(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OrganDoseTemplates.ORGAN_DOSE_INFORMATION.getValue();
		String strCodeValue = EnumCV_OrganDoseTemplates.ORGAN_DOSE_INFORMATION_113517.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.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, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setFindingSite(int[] arrPosition, EnumCM_RadiosensitiveOrgans enumValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OrganDoseTemplates.FINDING_SITE.getValue();
		String strCodeValue = EnumCV_OrganDoseTemplates.FINDING_SITE_GC0E3.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;
		if(null== this.objRadiosensitiveOrgans_CID10044)
			this.objRadiosensitiveOrgans_CID10044 = new RadiosensitiveOrgans_CID10044();
		this.objRadiosensitiveOrgans_CID10044.setRadiosensitiveOrgans(enumValue);
		
		 strCM = objRadiosensitiveOrgans_CID10044.getCodeMeaning();
		 strCV = objRadiosensitiveOrgans_CID10044.getCodeValue();
		 strCSD = objRadiosensitiveOrgans_CID10044.getCodingSchemeDesignator();
		 strSNMDCTID = objRadiosensitiveOrgans_CID10044.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 setLaterality(int[] arrPosition, EnumCM_Laterality enumLaterality)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OrganDoseTemplates.LATERALITY.getValue();
		String strCodeValue = EnumCV_OrganDoseTemplates.LATERALITY_GC171.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		if(null== this.objLaterality_CID244)
			this.objLaterality_CID244 = new Laterality_CID244();
		this.objLaterality_CID244.setLaterality(enumLaterality);
		 strCM = objLaterality_CID244.getCodeMeaning();
		 strCV = objLaterality_CID244.getCodeValue();
		 strCSD = objLaterality_CID244.getCodingSchemeDesignator();
		 strSNMDCTID = objLaterality_CID244.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 Mass
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setMass(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.GRAMS.getValue();
		String strCVForUnit = EnumCV_Unit.GRAMS.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OrganDoseTemplates.MASS.getValue();
		String strCodeValue = EnumCV_OrganDoseTemplates.MASS_GD701.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for MeasurementMethod
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strMeasurementMethod String value for Comment.
	 */
	public void setMeasurementMethod(int[] arrPosition, String strMeasurementMethod)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OrganDoseTemplates.MEASUREMENT_METHOD.getValue();
		String strCodeValue = EnumCV_OrganDoseTemplates.MEASUREMENT_METHOD_GC036.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, strMeasurementMethod);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for OrganDose
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setOrganDose(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.MGY.getValue();
		String strCVForUnit = EnumCV_Unit.MGY.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OrganDoseTemplates.ORGAN_DOSE.getValue();
		String strCodeValue = EnumCV_OrganDoseTemplates.ORGAN_DOSE_113518.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_OrganDoseTemplates.REFERENCE_AUTHORITY.getValue();
		String strCodeValue = EnumCV_OrganDoseTemplates.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);
	}	
		
	public void setReferenceAuthority(int[] arrPosition, EnumCM_RadiopharmaceuticalOrganDoseReferenceAuthority enumRadiopharmaceuticalOrganDoseReferenceAuthority)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OrganDoseTemplates.REFERENCE_AUTHORITY.getValue();
		String strCodeValue = EnumCV_OrganDoseTemplates.REFERENCE_AUTHORITY_121406.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		if(null== this.objRadiopharmaceuticalOrganDoseReferenceAuthority_CID10040)
			this.objRadiopharmaceuticalOrganDoseReferenceAuthority_CID10040 = new RadiopharmaceuticalOrganDoseReferenceAuthority_CID10040();
		this.objRadiopharmaceuticalOrganDoseReferenceAuthority_CID10040.setRadiopharmaceuticalOrganDoseReferenceAuthority(enumRadiopharmaceuticalOrganDoseReferenceAuthority);
		String strCM = objRadiopharmaceuticalOrganDoseReferenceAuthority_CID10040.getCodeMeaning();
		 String strCV = objRadiopharmaceuticalOrganDoseReferenceAuthority_CID10040.getCodeValue();
		 String strCSD = objRadiopharmaceuticalOrganDoseReferenceAuthority_CID10040.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);
	}
	
}
