/*******************************************************************************
 *  Copyright 2017-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.ivusreporttemplates;

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.dicommodel.modules.SRDocumentContentModule;
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_IVUSReport;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_IVUSReport;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.LanguageOfContentItemAndDescendants_TID1204;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.ObserverContext_TID1002;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;
import cdac.medinfo.sdk.dcm30_04.templates.hemodynamicsreporttemplates.CardiovascularPatientCharacteristics_TID3602;
import cdac.medinfo.sdk.dcm30_04.templates.hemodynamicsreporttemplates.ProcedureContext_TID3601;

/**
 * This class represents IVUSReport - TID3250
 */
public class IVUSReport_TID3250 extends Template
{
	/**
	 * Object of ObserverContext_TID1002 which represents the TID1002 Template. 
	 */

	private ObserverContext_TID1002 objObserverContext = null;

	/**
	 * Object of ObserverContext_TID1002 which represents the TID1002 Template. 
	 */

	private ProcedureContext_TID3601 objProcedureContextTID3601 = null;

	/**
	 * Object of CardiovascularPatientCharacteristics_TID3602
	 */

	private CardiovascularPatientCharacteristics_TID3602 objCathPatientCharacteristicsTID3602;
	/**
	 * Object of LanguageOfContentItemAndDescendants_TID1204  
	 */

	private LanguageOfContentItemAndDescendants_TID1204 objLanguageOfContentItemAndDescendants_TID1204 = null;

	/**
	 * Object of IVUSVessel_TID3251
	 */

	private IVUSVessel_TID3251 objIvusVesselTID3251;

	/**
	 * Instantiates IVUSReport_TID3250 Template.
	 * @param objTree Object of SRTree.
	 */
	public IVUSReport_TID3250(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves Observer Context 
	 * @return objObserverContext Object of ObserverContext_TID1002 
	 */
	public LanguageOfContentItemAndDescendants_TID1204 getLanguageOfContentItemandDescendants() 
	{
		if(null == this.objLanguageOfContentItemAndDescendants_TID1204)
			this.objLanguageOfContentItemAndDescendants_TID1204 = new LanguageOfContentItemAndDescendants_TID1204(getSRTree());
		return this.objLanguageOfContentItemAndDescendants_TID1204;
	}
	/**
	 * Retrieves Observer Context 
	 * @return objObserverContext Object of ObserverContext_TID1002 
	 */
	public ObserverContext_TID1002 getObserverContext() 
	{
		if(null == this.objObserverContext)
			this.objObserverContext = new ObserverContext_TID1002(getSRTree());
		return this.objObserverContext;
	}

	/**
	 * Retrieves IVUSVessel 
	 * @return objIvusVesselTID3251 Object of IVUSVessel_TID3251 
	 */
	public IVUSVessel_TID3251 getIVUSVessel() 
	{
		if(null == this.objIvusVesselTID3251)
			this.objIvusVesselTID3251 = new IVUSVessel_TID3251(getSRTree());
		return this.objIvusVesselTID3251;
	}

	/**
	 * Retrieves PatientCharacteristics 
	 * @return objCathPatientCharacteristicsTID3602 Object of CardiovascularPatientCharacteristics_TID3602 
	 */
	public CardiovascularPatientCharacteristics_TID3602 getPatientCharacteristics() 
	{
		if(null == this.objCathPatientCharacteristicsTID3602)
			this.objCathPatientCharacteristicsTID3602 = new CardiovascularPatientCharacteristics_TID3602(getSRTree());
		return this.objCathPatientCharacteristicsTID3602;
	}

	/**
	 * Retrieves ProcedureContext 
	 * @return objProcedureContextTID3601 Object of ProcedureContext_TID3601 
	 */
	public ProcedureContext_TID3601 getProcedureContext() 
	{
		if(null == this.objProcedureContextTID3601)
			this.objProcedureContextTID3601 = new ProcedureContext_TID3601(getSRTree());
		return this.objProcedureContextTID3601;
	}

	/**
	 * Sets the value for IVUS Report
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setIVUSReport(EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_IVUSReport.IVUS_REPORT.getValue();
		String strCodeValue = EnumCV_IVUSReport.IVUS_REPORT_122325.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type CONTAINER and adding this node as root of a tree.
		 */
		SRDocumentContentModule objDocumentContentModule = getSRTree().getSRDocumentContentModule();
		getSRTree().createRoot(objDocumentContentModule,strCodeMeaning,strCodeValue , strCSD, enumContinuityOfContent);
	}

	/**
	 * Sets the value for Image Library
	 * @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_IVUSReport.IMAGE_LIBRARY.getValue();
		String strCodeValue = EnumCV_IVUSReport.IMAGE_LIBRARY_111028.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);
	}
}
