/*******************************************************************************
 *  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.CardiacUltrasoundFetalSummaryCodes_CID12249;
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_CardiacUltrasoundFetalSummaryCodes;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacUltrasoundFetalSummarySection;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PediatricFetalAndCongenitalCardiacSurgicalInterventions;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_CardiacUltrasoundFetalSummarySection;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.SubjectContextFetus_TID1008;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

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

	/**
	 * Object of PediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247
	 */
	private PediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247 objPediatricFetalAndCongenitalCardiacSurgicalInterventions_CID12247 ;
	/**
	 * Object of CardiacUltrasoundFetalSummaryCodes_CID12249
	 */
	private CardiacUltrasoundFetalSummaryCodes_CID12249 objCardiacUltrasoundFetalSummaryCodes_CID12249 ;
	/**
	 * Object of SubjectContextFetus_TID1008
	 */
	private SubjectContextFetus_TID1008 objSubjectContextFetus_TID1008 ;
	/**
	 * Instantiates CardiacUltrasound_TID5227 Template.
	 * @param objTree Object of SRTree.
	 */
	public CardiacUltrasoundFetalSummarySection_TID5227(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;
	}
	/**
	 * Sets the value for Fetus Summary
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setFetusSummary(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacUltrasoundFetalSummarySection.FETUS_SUMMARY.getValue();
		String strCodeValue = EnumCV_CardiacUltrasoundFetalSummarySection.FETUS_SUMMARY_125008.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().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setFinding(int[] arrPosition,EnumCM_CardiacUltrasoundFetalSummaryCodes enumCardiacUltrasoundFetalSummaryCodes)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacUltrasoundFetalSummarySection.FINDING.getValue();
		String strCodeValue = EnumCV_CardiacUltrasoundFetalSummarySection.FINDING_121071.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		if(null== this.objCardiacUltrasoundFetalSummaryCodes_CID12249)
			this.objCardiacUltrasoundFetalSummaryCodes_CID12249 = new CardiacUltrasoundFetalSummaryCodes_CID12249();
		this.objCardiacUltrasoundFetalSummaryCodes_CID12249.setCardiacUltrasoundFetalSummaryCodes(enumCardiacUltrasoundFetalSummaryCodes);
		 strCM = objCardiacUltrasoundFetalSummaryCodes_CID12249.getCodeMeaning();
		 strCV = objCardiacUltrasoundFetalSummaryCodes_CID12249.getCodeValue();
		 strCSD = objCardiacUltrasoundFetalSummaryCodes_CID12249.getCodingSchemeDesignator();
		 strSNMDCTID = objCardiacUltrasoundFetalSummaryCodes_CID12249.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 setSurgicalProcedure(int[] arrPosition, EnumCM_PediatricFetalAndCongenitalCardiacSurgicalInterventions enumPediatricFetalAndCongenitalCardiacSurgicalInterventions)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacUltrasoundFetalSummarySection.SURGICAL_PROCEDURE.getValue();
		String strCodeValue = EnumCV_CardiacUltrasoundFetalSummarySection.SURGICAL_PROCEDURE_P0_009C3.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.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 strFinding String value for Comment.
	 */
	public void setFinding(int[] arrPosition, String strFinding)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacUltrasoundFetalSummarySection.FINDING.getValue();
		String strCodeValue = EnumCV_CardiacUltrasoundFetalSummarySection.FINDING_121071.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, strFinding);
		getSRTree().addChild(objContentSequenceItem);
	}
}
