/*******************************************************************************
 *  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.CardiacUltrasoundSummaryCodes_CID12248;
import cdac.medinfo.sdk.dcm30_04.templates.cid.PediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacUltrasoundSummaryCodes;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacUltrasoundSummarySection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_EchoSection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PediatricFetalAndCongenitalCardiacSurgicalInterventions;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RadiopharmaceuticalAdministrationEventDataTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_CardiacUltrasoundSummarySection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_EchoSection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_RadiopharmaceuticalAdministrationEventDataTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents CardiacUltrasoundSummarySection_TID5226
 */
public class CardiacUltrasoundSummarySection_TID5226 extends Template{
	/**
	 * Object of PediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247
	 */
	private PediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247 objPediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247 ;
	/**
	 * Object of CardiacUltrasoundSummaryCodes_CID12248
	 */
	private CardiacUltrasoundSummaryCodes_CID12248 objCardiacUltrasoundSummaryCodes_CID12248;
	/**
	 * Instantiates CardiacUltrasoundSummarySection_TID5226 Template.
	 * @param objTree Object of SRTree.
	 */
	public CardiacUltrasoundSummarySection_TID5226(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Sets the value for Summary
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setSummary(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacUltrasoundSummarySection.SUMMARY.getValue();
		String strCodeValue = EnumCV_CardiacUltrasoundSummarySection.SUMMARY_121111.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 value for Finding
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumUltrasoundImageModes Enumerated value for UltrasoundImageModes
	 */
	public void setFinding(int[] arrPosition,EnumCM_CardiacUltrasoundSummaryCodes enumCardiacUltrasoundSummaryCodes)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacUltrasoundSummarySection.FINDING.getValue();
		String strCodeValue = EnumCV_CardiacUltrasoundSummarySection.FINDING_121071.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for Quality Assessment
		 */
		if(null== this.objCardiacUltrasoundSummaryCodes_CID12248)
			this.objCardiacUltrasoundSummaryCodes_CID12248 = new CardiacUltrasoundSummaryCodes_CID12248();
		this.objCardiacUltrasoundSummaryCodes_CID12248.setCardiacUltrasoundSummaryCodes(enumCardiacUltrasoundSummaryCodes);

		String strCM = objCardiacUltrasoundSummaryCodes_CID12248.getCodeMeaning();
		String strCV = objCardiacUltrasoundSummaryCodes_CID12248.getCodeValue();
		String strCSD = objCardiacUltrasoundSummaryCodes_CID12248.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);
	}
	public void setSurgicalProcedure(int[] arrPosition,EnumCM_PediatricFetalAndCongenitalCardiacSurgicalInterventions enumPediatricFetalAndCongenitalCardiacSurgicalInterventions)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacUltrasoundSummarySection.SURGICAL_PROCEDURE.getValue();
		String strCodeValue = EnumCV_CardiacUltrasoundSummarySection.SURGICAL_PROCEDURE_P0_009C3.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		
		if(null== this.objPediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247)
			this.objPediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247 = new PediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247();
		this.objPediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247.setPediatricFetalAndCongenitalCardiacSurgicalInterventions(enumPediatricFetalAndCongenitalCardiacSurgicalInterventions);
			 strCM = objPediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247.getCodeMeaning();
			 strCV = objPediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247.getCodeValue();
			 strCSD = objPediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247.getCodingSchemeDesignator();
			strSNMDCTID = objPediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247.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 Finding
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strMeasurementMethod String value for Comment.
	 */
	public void setFinding(int[] arrPosition, String strAcquisitionProtocol)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacUltrasoundSummarySection.FINDING.getValue();
		String strCodeValue = EnumCV_CardiacUltrasoundSummarySection.FINDING_121071.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);
	}
}
