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

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.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacUltrasoundFetalMeasurementSection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OrganDoseTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_CardiacUltrasoundFetalMeasurementSection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_OrganDoseTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Measurement_TID300;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.SubjectContextFetus_TID1008;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents CardiacUltrasoundFetalMeasurementSection_TID5228
 */
public class CardiacUltrasoundFetalMeasurementSection_TID5228 extends Template {
	/**
	 * Object of Measurement_TID300
	 */
	private Measurement_TID300 objMeasurement_TID300 ;
	/**
	 * Object of PediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222
	 */
	private PediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222 objPediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222 ;
	/**
	 * Object of SubjectContextFetus_TID1008
	 */
	private SubjectContextFetus_TID1008 objSubjectContextFetus_TID1008 ;
	/**
	 * Instantiates CardiacUltrasoundFetalMeasurementSection_TID5228 Template.
	 * @param objTree Object of SRTree.
	 */
	public CardiacUltrasoundFetalMeasurementSection_TID5228(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves SubjectContextFetus_TID1008 
	 * @return objSubjectContextFetus_TID1008 Object of SubjectContextFetus_TID1008 
	 */
	public SubjectContextFetus_TID1008 getObserverContext() 
	{
		if(null == this.objSubjectContextFetus_TID1008)
			this.objSubjectContextFetus_TID1008 = new SubjectContextFetus_TID1008(getSRTree());
		return this.objSubjectContextFetus_TID1008;
	}
	/**
	 * Retrieves PediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222 
	 * @return objPediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222 Object of PediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222 
	 */
	public PediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222 getPediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222() 
	{
		if(null == this.objPediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222)
			this.objPediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222 = new PediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222(getSRTree());
		return this.objPediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222;
	}
	/**
	 * Retrieves Measurement_TID300 
	 * @return objMeasurement_TID300 Object of Measurement_TID300 
	 */
	public Measurement_TID300 getMeasurement() 
	{
		if(null == this.objMeasurement_TID300)
			this.objMeasurement_TID300 = new Measurement_TID300(getSRTree());
		return this.objMeasurement_TID300;
	}
	
	/**
	 * Sets the value for FetalMeasurements 
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setFetalMeasurements(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacUltrasoundFetalMeasurementSection.FETAL_MEASUREMENTS.getValue();
		String strCodeValue = EnumCV_CardiacUltrasoundFetalMeasurementSection.FETAL_MEASUREMENTS_125016.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);
	}
}
