/*******************************************************************************
 *  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.CardiacUltrasoundReportTitles_CID12245;
import cdac.medinfo.sdk.dcm30_04.templates.cid.CardiacUltrasoundIndicationForStudy_CID12246;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacUltrasoundIndicationForStudy;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Laterality;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OrganDoseTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PediatricFetalAndCongenitalCardiacUltrasoundReports;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_OrganDoseTemplates;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_PediatricFetalAndCongenitalCardiacUltrasoundReports;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.LanguageOfContentItemAndDescendants_TID1204;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.ObservationContext_TID1001;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;


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

	/**
	 * Object of LanguageOfContentItemAndDescendants_TID1204
	 */
	private LanguageOfContentItemAndDescendants_TID1204 objLanguageOfContentItemAndDescendants_TID1204 ;
	
	private CardiacUltrasoundReportTitles_CID12245 objCardiacUltrasoundReportTitles_CID12245;
	
	/**
	 * Object of ObservationContext_TID1001
	 */
	private ObservationContext_TID1001 objObservationContext_TID1001 ;
	
	/**
	 * Object of CardiacUltrasoundFetalCharacteristics_TID5225
	 */
	private CardiacUltrasoundFetalCharacteristics_TID5225 objCardiacUltrasoundFetalCharacteristics_TID5225 ;
	
	/**
	 * Object of CardiacUltrasoundSummarySection_TID5226
	 */
	private CardiacUltrasoundSummarySection_TID5226 objCardiacUltrasoundSummarySection_TID5226 ;
	/**
	 * Object of CardiacUltrasoundPediatricEchoMeasurementSection_TID5221
	 */
	private CardiacUltrasoundPediatricEchoMeasurementSection_TID5221 objCardiacUltrasoundPediatricEchoMeasurementSection_TID5221 ;
	
	/**
	 * Object of CardiacUltrasoundFetalMeasurementSection_TID5228
	 */
	private CardiacUltrasoundFetalMeasurementSection_TID5228 objCardiacUltrasoundFetalMeasurementSection_TID5228 ;
	
	private CardiacUltrasoundIndicationForStudy_CID12246 objCardiacUltrasoundIndicationForStudy_CID12246;
	
	/**
	 * Instantiates PediatricFetalAndCongenitalCardiacUltrasoundReports_TID5220 Template.
	 * @param objTree Object of SRTree.
	 */
	public PediatricFetalAndCongenitalCardiacUltrasoundReports_TID5220(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves LanguageOfContentItemAndDescendants_TID1204 
	 * @return objLanguageOfContentItemAndDescendants_TID1204 Object of LanguageOfContentItemAndDescendants_TID1204 
	 */
	public LanguageOfContentItemAndDescendants_TID1204 getLanguageOfContentItemandDescendants() 
	{
		if(null == this.objLanguageOfContentItemAndDescendants_TID1204)
			this.objLanguageOfContentItemAndDescendants_TID1204 = new LanguageOfContentItemAndDescendants_TID1204(getSRTree());
		return this.objLanguageOfContentItemAndDescendants_TID1204;
	}
	/**
	 * Retrieves ObservationContext_TID1001 
	 * @return objObservationContext_TID1001 Object of ObservationContext_TID1001 
	 */
	public ObservationContext_TID1001 getObservationContext() 
	{
		if(null == this.objObservationContext_TID1001)
			this.objObservationContext_TID1001 = new ObservationContext_TID1001(getSRTree());
		return this.objObservationContext_TID1001;
	}
	/**
	 * Retrieves CardiacUltrasoundFetalCharacteristics_TID5225 
	 * @return objCardiacUltrasoundFetalCharacteristics_TID5225 Object of CardiacUltrasoundFetalCharacteristics_TID5225 
	 */
	public CardiacUltrasoundFetalCharacteristics_TID5225 getCardiacUltrasoundFetalCharacteristics() 
	{
		if(null == this.objCardiacUltrasoundFetalCharacteristics_TID5225)
			this.objCardiacUltrasoundFetalCharacteristics_TID5225 = new CardiacUltrasoundFetalCharacteristics_TID5225(getSRTree());
		return this.objCardiacUltrasoundFetalCharacteristics_TID5225;
	}
	/**
	 * Retrieves CardiacUltrasoundSummarySection_TID5226 
	 * @return objCardiacUltrasoundSummarySection_TID5226 Object of CardiacUltrasoundSummarySection_TID5226 
	 */
	public CardiacUltrasoundSummarySection_TID5226 getCardiacUltrasoundSummarySection() 
	{
		if(null == this.objCardiacUltrasoundSummarySection_TID5226)
			this.objCardiacUltrasoundSummarySection_TID5226 = new CardiacUltrasoundSummarySection_TID5226(getSRTree());
		return this.objCardiacUltrasoundSummarySection_TID5226;
	}
	/**
	 * Retrieves CardiacUltrasoundPediatricEchoMeasurementSection_TID5221 
	 * @return objCardiacUltrasoundPediatricEchoMeasurementSection_TID5221 Object of CardiacUltrasoundPediatricEchoMeasurementSection_TID5221 
	 */
	public CardiacUltrasoundPediatricEchoMeasurementSection_TID5221 getCardiacUltrasoundFetalSummaryCodes() 
	{
		if(null == this.objCardiacUltrasoundPediatricEchoMeasurementSection_TID5221)
			this.objCardiacUltrasoundPediatricEchoMeasurementSection_TID5221 = new CardiacUltrasoundPediatricEchoMeasurementSection_TID5221(getSRTree());
		return this.objCardiacUltrasoundPediatricEchoMeasurementSection_TID5221;
	}
	/**
	 * Retrieves CardiacUltrasoundFetalMeasurementSection_TID5228 
	 * @return objCardiacUltrasoundFetalMeasurementSection_TID5228 Object of CardiacUltrasoundFetalMeasurementSection_TID5228 
	 */
	public CardiacUltrasoundFetalMeasurementSection_TID5228 getPersonParticipant() 
	{
		if(null == this.objCardiacUltrasoundFetalMeasurementSection_TID5228)
			this.objCardiacUltrasoundFetalMeasurementSection_TID5228 = new CardiacUltrasoundFetalMeasurementSection_TID5228(getSRTree());
		return this.objCardiacUltrasoundFetalMeasurementSection_TID5228;
	}
	/**
	 * Sets the value for ImageLibrary 
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setImageLibrary(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PediatricFetalAndCongenitalCardiacUltrasoundReports.IMAGE_LIBRARY.getValue();
		String strCodeValue = EnumCV_PediatricFetalAndCongenitalCardiacUltrasoundReports.IMAGE_LIBRARY_111028.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 Indications for Procedure 
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setIndicationsForProcedure(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PediatricFetalAndCongenitalCardiacUltrasoundReports.INDICATIONS_FOR_PROCEDURE.getValue();
		String strCodeValue = EnumCV_PediatricFetalAndCongenitalCardiacUltrasoundReports.INDICATIONS_FOR_PROCEDURE_18785_6.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 Indications for Procedure 
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setCardiacUltrasoundReportTitles(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = objCardiacUltrasoundReportTitles_CID12245.getCodeMeaning();
		String strCV = objCardiacUltrasoundReportTitles_CID12245.getCodeValue();
		String strCSD = objCardiacUltrasoundReportTitles_CID12245.getCodingSchemeDesignator();

		/**
		 * Creating a node of Value Type Container and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createContainer(arrPosition, strCM, strCV, strCSD, enumContinuityOfContent);
		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 strFinding)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PediatricFetalAndCongenitalCardiacUltrasoundReports.FINDING.getValue();
		String strCodeValue = EnumCV_PediatricFetalAndCongenitalCardiacUltrasoundReports.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);
	}
	
	public void setFinding(int[] arrPosition, EnumCM_CardiacUltrasoundIndicationForStudy CardiacUltrasoundIndicationForStudy)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_OrganDoseTemplates.LATERALITY.getValue();
		String strCodeValue = EnumCV_OrganDoseTemplates.LATERALITY_GC171.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		if(null== this.objCardiacUltrasoundIndicationForStudy_CID12246)
			this.objCardiacUltrasoundIndicationForStudy_CID12246 = new CardiacUltrasoundIndicationForStudy_CID12246();
		this.objCardiacUltrasoundIndicationForStudy_CID12246.setCardiacUltrasoundIndicationForStudy(CardiacUltrasoundIndicationForStudy);
		 strCM = objCardiacUltrasoundIndicationForStudy_CID12246.getCodeMeaning();
		 strCV = objCardiacUltrasoundIndicationForStudy_CID12246.getCodeValue();
		 strCSD = objCardiacUltrasoundIndicationForStudy_CID12246.getCodingSchemeDesignator();
		 strSNMDCTID = objCardiacUltrasoundIndicationForStudy_CID12246.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);
	}
}
