/*******************************************************************************
 *  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.cid.UltrasoundImageModes_CID12224;
import cdac.medinfo.sdk.dcm30_04.templates.cid.YesNo_CID230;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacUltrasoundSummarySection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PediatricFetalAndCongenitalCardiacSurgicalInterventions;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PediatricFetalAndCongenitalCardiacUltrasoundSection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PediatricFetalandCongenitalCardiacUltrasoundMeasurement;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RadiopharmaceuticalAdministrationEventDataTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_UltrasoundImageModes;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_YesNo;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_CardiacUltrasoundSummarySection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_PediatricFetalAndCongenitalCardiacUltrasoundSection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_RadiopharmaceuticalAdministrationEventDataTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents PediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222
 */
public class PediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222 extends Template{

	/**
	 * Object of UltrasoundImageModes_CID12224
	 */
	private UltrasoundImageModes_CID12224 objUltrasoundImageModes_CID12224 ;
	/**
	 * Object of YesNo_CID230
	 */
	private YesNo_CID230 objYesNo_CID230 ;
	/**
	 * Object of PediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223
	 */
	private PediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223 objPediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223 ;
	/**
	 * Instantiates PediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222 Template.
	 * @param objTree Object of SRTree.
	 */
	public PediatricFetalAndCongenitalCardiacUltrasoundSection_TID5222(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves PediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223 
	 * @return objPediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223 Object of PediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223 
	 */
	public PediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223 getObserverContext() 
	{
		if(null == this.objPediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223)
			this.objPediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223 = new PediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223(getSRTree());
		return this.objPediatricFetalandCongenitalCardiacUltrasoundMeasurement_TID5223;
	}
	/**
	 * Sets the value for Findings
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setFindings(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PediatricFetalAndCongenitalCardiacUltrasoundSection.FINDING.getValue();
		String strCodeValue = EnumCV_PediatricFetalAndCongenitalCardiacUltrasoundSection.FINDING_121070.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);
	}
	/**
	 * Sets the value for Measurement Group
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setMeasurementGroup(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PediatricFetalAndCongenitalCardiacUltrasoundSection.MEASUREMENT_GROUP.getValue();
		String strCodeValue = EnumCV_PediatricFetalAndCongenitalCardiacUltrasoundSection.MEASUREMENT_GROUP_125007.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);
	}
	/**
	 * Sets the value for Acquisition Protocol
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strMeasurementMethod String value for Comment.
	 */
	public void setAcquisitionProtocol(int[] arrPosition, String strAcquisitionProtocol)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PediatricFetalAndCongenitalCardiacUltrasoundSection.ACQUISITION_PROTOCOL.getValue();
		String strCodeValue = EnumCV_PediatricFetalAndCongenitalCardiacUltrasoundSection.ACQUISITION_PROTOCOL_125203.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, strAcquisitionProtocol);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	public void setHeartvalveReplacementProsthesis(int[] arrPosition,EnumCM_YesNo enumYesNo)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PediatricFetalAndCongenitalCardiacUltrasoundSection.HEART_VALVE_REPLACEMENT_PROTHESIS.getValue();
		String strCodeValue = EnumCV_PediatricFetalAndCongenitalCardiacUltrasoundSection.HEART_VALVE_REPLACEMENT_PROTHESIS_P1_32006.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		
		if(null== this.objYesNo_CID230)
			this.objYesNo_CID230 = new YesNo_CID230();
		this.objYesNo_CID230.setYesNo(enumYesNo);
			 strCM = objYesNo_CID230.getCodeMeaning();
			 strCV = objYesNo_CID230.getCodeValue();
			 strCSD = objYesNo_CID230.getCodingSchemeDesignator();
			strSNMDCTID = objYesNo_CID230.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 setImageMode(int[] arrPosition,EnumCM_UltrasoundImageModes enumUltrasoundImageModes)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PediatricFetalAndCongenitalCardiacUltrasoundSection.IMAGE_MODE.getValue();
		String strCodeValue = EnumCV_PediatricFetalAndCongenitalCardiacUltrasoundSection.IMAGE_MODE_G_0373.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		
		if(null== this.objUltrasoundImageModes_CID12224)
			this.objUltrasoundImageModes_CID12224 = new UltrasoundImageModes_CID12224();
		this.objUltrasoundImageModes_CID12224.setUltrasoundImageModes(enumUltrasoundImageModes);
			 strCM = objUltrasoundImageModes_CID12224.getCodeMeaning();
			 strCV = objUltrasoundImageModes_CID12224.getCodeValue();
			 strCSD = objUltrasoundImageModes_CID12224.getCodingSchemeDesignator();
			strSNMDCTID = objUltrasoundImageModes_CID12224.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);
	}
}
