/*******************************************************************************
 *  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.hemodynamicsreporttemplates;

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_HemodynamicsReport;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_HemodynamicsReport;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.ObserverContext_TID1002;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents HemodynamicsReport - TID3500
 */
public class HemodynamicsReport_TID3500 extends Template
{
	/**
	 * Object of ObserverContext_TID1002. 
	 */

	private ObserverContext_TID1002 objObserverContext_TID1002 = 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 ProcedureEnvironmentalCharacteristics_TID3603
	 */

	private ProcedureEnvironmentalCharacteristics_TID3603 objEnvironmentalCharacteristicsTID3603;

	/**
	 * Object of HemodynamicsMeasurementGroup_TID3501
	 */

	private HemodynamicsMeasurementGroup_TID3501 objHemodynamicsMeasurementGroupTID3501;

	/**
	 * Object of SummaryHemodynamics_TID3570
	 */

	private SummaryHemodynamics_TID3570 objSummaryHemodynamicsTID3570;

	/**
	 * Instantiates a new HemodynamicsReport_TID3500 Template.
	 * @param objTree Object of SRTree.
	 */
	public HemodynamicsReport_TID3500(SRTree objTree)
	{
		super(objTree);
	}

	/**
	 * Retrieves the object of ObserverContext_TID1002 which provides the methods for setting different
	 * attributes of Observer Context.
	 */
	public ObserverContext_TID1002 getObserverContext_TID1002() 
	{
		if(null == this.objObserverContext_TID1002)
			this.objObserverContext_TID1002 = new ObserverContext_TID1002(getSRTree());
		return this.objObserverContext_TID1002;
	}

	/**
	 * 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;
	}

	/**
	 * 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 ProcedureEnvironmentalCharacteristics 
	 * @return objEnvironmentalCharacteristicsTID3603 Object of ProcedureEnvironmentalCharacteristics_TID3603 
	 */
	public ProcedureEnvironmentalCharacteristics_TID3603 getProcedureEnvironmentalCharacteristics() 
	{
		if(null == this.objEnvironmentalCharacteristicsTID3603)
			this.objEnvironmentalCharacteristicsTID3603 = new ProcedureEnvironmentalCharacteristics_TID3603(getSRTree());
		return this.objEnvironmentalCharacteristicsTID3603;
	}

	/**
	 * Retrieves HemodynamicsMeasurementGroup 
	 * @return objHemodynamicsMeasurementGroupTID3501 Object of HemodynamicsMeasurementGroup_TID3501 
	 */
	public HemodynamicsMeasurementGroup_TID3501 getHemodynamicsMeasurementGroup() 
	{
		if(null == this.objHemodynamicsMeasurementGroupTID3501)
			this.objHemodynamicsMeasurementGroupTID3501 = new HemodynamicsMeasurementGroup_TID3501(getSRTree());
		return this.objHemodynamicsMeasurementGroupTID3501;
	}

	/**
	 * Retrieves SummaryHemodynamics 
	 * @return objSummaryHemodynamicsTID3570 Object of SummaryHemodynamics_TID3570 
	 */
	public SummaryHemodynamics_TID3570 getSummaryHemodynamics() 
	{
		if(null == this.objSummaryHemodynamicsTID3570)
			this.objSummaryHemodynamicsTID3570 = new SummaryHemodynamics_TID3570(getSRTree());
		return this.objSummaryHemodynamicsTID3570;
	}

	/**
	 * Sets the value for Hemodynamics Report
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setHemodynamicsReport(EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_HemodynamicsReport.HEMODYNAMICS_REPORT.getValue();
		String strCodeValue = EnumCV_HemodynamicsReport.HEMODYNAMICS_REPORT_122120.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);
	}
}
