/*******************************************************************************
 *  Copyright 2017-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.mammographycadsriodtemplates;

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CADImageLibraryEntryTemplate;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_CADImageLibraryEntryTemplate;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents CADImageLibraryEntryTemplate - TID4020
 */
public class CADImageLibraryEntryTemplate_TID4020 extends Template
{
	/**
	 * Instantiates a new CADImageLibraryEntryTemplate_TID4020 Template.
	 * @param objTree Object of SRTree.
	 */
	public CADImageLibraryEntryTemplate_TID4020(SRTree objTree)
	{
		super(objTree);
	}
	
	/**
	 * Sets the value for Patient Orientation Row
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strPatientOrientationRow String value for Algorithm Version.
	 */
	public void setPatientOrientationRow(int[] arrPosition, String strPatientOrientationRow)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CADImageLibraryEntryTemplate.PATIENT_ORIENTATION_ROW.getValue();
		String strCodeValue = EnumCV_CADImageLibraryEntryTemplate.PATIENT_ORIENTATION_ROW_111044.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, strPatientOrientationRow);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Patient Orientation Column
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strPatientOrientationColumn String value for Algorithm Version.
	 */
	public void setPatientOrientationColumn(int[] arrPosition, String strPatientOrientationColumn)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CADImageLibraryEntryTemplate.PATIENT_ORIENTATION_COLUMN.getValue();
		String strCodeValue = EnumCV_CADImageLibraryEntryTemplate.PATIENT_ORIENTATION_COLUMN_111043.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, strPatientOrientationColumn);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Study Date.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strStudyDate String value for Subject Birth Date
	 */
	public void setStudyDate(int[] arrPosition, String strStudyDate)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CADImageLibraryEntryTemplate.STUDY_DATE.getValue();
		String strCodeValue = EnumCV_CADImageLibraryEntryTemplate.STUDY_DATE_111060.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type DATE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createDateNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strStudyDate);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Study Time.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strStudyTime String value for Subject Birth Date
	 */
	public void setStudyTime(int[] arrPosition, String strStudyTime)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CADImageLibraryEntryTemplate.STUDY_TIME.getValue();
		String strCodeValue = EnumCV_CADImageLibraryEntryTemplate.STUDY_TIME_111061.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type DATE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createTimeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strStudyTime);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Content Date.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strContentDate String value for Subject Birth Date
	 */
	public void setContentDate(int[] arrPosition, String strContentDate)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CADImageLibraryEntryTemplate.CONTENT_DATE.getValue();
		String strCodeValue = EnumCV_CADImageLibraryEntryTemplate.CONTENT_DATE_111018.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type DATE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createDateNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strContentDate);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Content Time.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strContentTime String value for Subject Birth Date
	 */
	public void setContentTime(int[] arrPosition, String strContentTime)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CADImageLibraryEntryTemplate.CONTENT_TIME.getValue();
		String strCodeValue = EnumCV_CADImageLibraryEntryTemplate.CONTENT_TIME_111019.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type DATE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createTimeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strContentTime);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Horizontal Pixel Spacing.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value. of Horizontal Pixel Spacing
	 */
	public void setHorizontalPixelSpacing(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.MICROMETER.getValue();
		String strCVForUnit = EnumCV_Unit.MICROMETER.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();
		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CADImageLibraryEntryTemplate.HORIZONTAL_PIXEL_SPACING.getValue();
		String strCodeValue = EnumCV_CADImageLibraryEntryTemplate.HORIZONTAL_PIXEL_SPACING_111026.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 Vertical Pixel Spacing.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value. of Vertical Pixel Spacing
	 */
	public void setVerticalPixelSpacing(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.MICROMETER.getValue();
		String strCVForUnit = EnumCV_Unit.MICROMETER.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();
		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CADImageLibraryEntryTemplate.VERTICAL_PIXEL_SPACING.getValue();
		String strCodeValue = EnumCV_CADImageLibraryEntryTemplate.VERTICAL_PIXEL_SPACING_111066.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 Positioner Primary Angle.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value. of Positioner Primary Angle
	 */
	public void setPositionerPrimaryAngle(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CADImageLibraryEntryTemplate.POSITIONER_PRIMARY_ANGLE.getValue();
		String strCodeValue = EnumCV_CADImageLibraryEntryTemplate.POSITIONER_PRIMARY_ANGLE_112011.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,"","","","","","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Positioner Secondary Angle.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value. of Positioner Secondary Angle
	 */
	public void setPositionerSecondaryAngle(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CADImageLibraryEntryTemplate.POSITIONER_SECONDARY_ANGLE.getValue();
		String strCodeValue = EnumCV_CADImageLibraryEntryTemplate.POSITIONER_SECONDARY_ANGLE_112012.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,"","","","","","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
}
