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

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_SubjectContextFetus;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_SubjectContextFetus;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_Unit;

/**
 * This class represents SubjectContextFetus - TID1008
 */
public class SubjectContextFetus_TID1008 extends Template
{
	
	
	/**
	 * Instantiates a new SubjectContextFetus_TID1008 Template.
	 * @param objTree Object of SRTree.
	 */
	public SubjectContextFetus_TID1008(SRTree objTree)
	{
		super(objTree);
	}
	
	/**
	 * Sets the value for Mother of fetus.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strMotherOfFetus String value for Mother of fetus.
	 */
	public void setMotherOfFetus(int[] arrPosition, String strMotherOfFetus)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_SubjectContextFetus.MOTHER_OF_FETUS.getValue();
		String strCodeValue = EnumCV_SubjectContextFetus.MOTHER_OF_FETUS_121036.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type PNAME and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createPnameNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strMotherOfFetus);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Subject UID
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strSubjectUID String value for SubjectUID.
	 */
	public void setSubjectUID(int[] arrPosition, String strSubjectUID)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_SubjectContextFetus.SUBJECT_UID.getValue();
		String strCodeValue = EnumCV_SubjectContextFetus.SUBJECT_UID_121028.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().createUIDREFNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strSubjectUID);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for SubjectID.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strSubjectID String value for SubjectID
	 */
	public void setSubjectID(int[] arrPosition, String strSubjectID)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_SubjectContextFetus.SUBJECT_ID.getValue();
		String strCodeValue = EnumCV_SubjectContextFetus.SUBJECT_ID_121030.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, strSubjectID);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for FetusID.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strFetusID String value for FetusID
	 */
	public void setFetusID(int[] arrPosition, String strFetusID)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_SubjectContextFetus.FETUS_ID.getValue();
		String strCodeValue = EnumCV_SubjectContextFetus.FETUS_ID_11951_1.getValue();
		String strCSD = EnumCodingSchemeDesignator.LN.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, strFetusID);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Number of Fetuses by US
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setNumberofFetusesbyUS(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.ONE.getValue();
		String strCVForUnit = EnumCV_Unit.ONE.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_SubjectContextFetus.NUMBER_OF_FETUSES_BY_US.getValue();
		String strCodeValue = EnumCV_SubjectContextFetus.NUMBER_OF_FETUSES_BY_US_552810.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 Number of Fetuses 
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setNumberofFetuses(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.ONE.getValue();
		String strCVForUnit = EnumCV_Unit.ONE.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_SubjectContextFetus.NUMBER_OF_FETUSES.getValue();
		String strCodeValue = EnumCV_SubjectContextFetus.NUMBER_OF_FETUSES_11878_6.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
}
