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

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.cid.CathProcedureType_CID3739;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CardiacCatheterizationReportRoot;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_CathProcedureType;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_CardiacCatheterizationReportRoot;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.LanguageOfContentItemAndDescendants_TID1204;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;
import cdac.medinfo.sdk.dcm30_04.templates.procedurelogiodtemplates.ProcedureContext_TID3601;

/**
 * This class represents CardiacCatheterizationReportRoot - TID3800
 */
public class CardiacCatheterizationReportRoot_TID3800 extends Template
{
	/**
	 * Object of CathProcedureType_CID3739
	 */
	private CathProcedureType_CID3739 objCathProcedureTypeCID3739;

	/**
	 * Object of ProcedureContext_TID3601
	 */

	private ProcedureContext_TID3601 objProcedureContextTID3601;

	/**
	 * Object of CardiovascularPatientHistory_TID3802
	 */

	private CardiovascularPatientHistory_TID3802 objPatientHistoryCathTID3802;

	/**
	 * Object of PatientPresentationCath_TID3803
	 */

	private PatientPresentationCath_TID3803 objPatientPresentationCathTID3803;

	/**
	 * Object of CathProcedure_TID3806
	 */

	private CathProcedure_TID3806 objCathProcedureTID3806;

	/**
	 * Object of CardiacCatheterizationFindings_TID3810
	 */

	private CardiacCatheterizationFindings_TID3810 objCardiacCatheterizationFindingsTID3810;
	
	/**
	 * Object of LanguageOfContentItemAndDescendants_TID1204
	 */

	private LanguageOfContentItemAndDescendants_TID1204 objLanguageOfContentItemAndDescendantsTID1204;

	/**
	 * Object of PercutaneousCoronaryInterventionProcedure_TID3807
	 */

	private PercutaneousCoronaryInterventionProcedure_TID3807 objPercutaneousCoronaryInterventionProcedureTID3807;

	/**
	 * Object of OtherInterventionalProcedures_TID3809
	 */

	private OtherInterventionalProcedures_TID3809 objOtherInterventionalProceduresTID3809;

	/**
	 * Object of AdverseOutcomesCath_TID3820
	 */

	private AdverseOutcomesCath_TID3820 objAdverseOutcomesCathTID3820;

	/**
	 * Object of SummaryCath_TID3824
	 */

	private SummaryCath_TID3824 objSummaryCathTID3824;

	/**
	 * Object of DischargeSummaryCath_TID3828
	 */

	private DischargeSummaryCath_TID3828 objDischargeSummaryCathTID3828;

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

	/**
	 * Retrieves LanguageOfContentItemAndDescendants 
	 * @return objLanguageOfContentItemAndDescendantsTID1204 Object of LanguageOfContentItemAndDescendants_TID1204 
	 */
	public LanguageOfContentItemAndDescendants_TID1204 getLanguageOfContentItemAndDescendants() 
	{
		if(null == this.objLanguageOfContentItemAndDescendantsTID1204)
			this.objLanguageOfContentItemAndDescendantsTID1204 = new LanguageOfContentItemAndDescendants_TID1204(getSRTree());
		return this.objLanguageOfContentItemAndDescendantsTID1204;
	}
	
	/**
	 * 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 PatientHistoryCath 
	 * @return objPatientHistoryCathTID3802 Object of CardiovascularPatientHistory_TID3802 
	 */
	public CardiovascularPatientHistory_TID3802 getPatientHistoryCath() 
	{
		if(null == this.objPatientHistoryCathTID3802)
			this.objPatientHistoryCathTID3802 = new CardiovascularPatientHistory_TID3802(getSRTree());
		return this.objPatientHistoryCathTID3802;
	}

	/**
	 * Retrieves PatientPresentationCath 
	 * @return objPatientPresentationCathTID3803 Object of PatientPresentationCath_TID3803 
	 */
	public PatientPresentationCath_TID3803 getPatientPresentationCath() 
	{
		if(null == this.objPatientPresentationCathTID3803)
			this.objPatientPresentationCathTID3803 = new PatientPresentationCath_TID3803(getSRTree());
		return this.objPatientPresentationCathTID3803;
	}

	/**
	 * Retrieves CathProcedure 
	 * @return objCathProcedureTID3806 Object of CathProcedure_TID3806 
	 */
	public CathProcedure_TID3806 getCathProcedure() 
	{
		if(null == this.objCathProcedureTID3806)
			this.objCathProcedureTID3806 = new CathProcedure_TID3806(getSRTree());
		return this.objCathProcedureTID3806;
	}

	/**
	 * Retrieves CardiacCatheterizationFindings 
	 * @return objCardiacCatheterizationFindingsTID3810 Object of CardiacCatheterizationFindings_TID3810 
	 */
	public CardiacCatheterizationFindings_TID3810 getCardiacCatheterizationFindings() 
	{
		if(null == this.objCardiacCatheterizationFindingsTID3810)
			this.objCardiacCatheterizationFindingsTID3810 = new CardiacCatheterizationFindings_TID3810(getSRTree());
		return this.objCardiacCatheterizationFindingsTID3810;
	}

	/**
	 * Retrieves PercutaneousCoronaryInterventionProcedure 
	 * @return objPercutaneousCoronaryInterventionProcedureTID3807 Object of PercutaneousCoronaryInterventionProcedure_TID3807 
	 */
	public PercutaneousCoronaryInterventionProcedure_TID3807 getPercutaneousCoronaryInterventionProcedure() 
	{
		if(null == this.objPercutaneousCoronaryInterventionProcedureTID3807)
			this.objPercutaneousCoronaryInterventionProcedureTID3807 = new PercutaneousCoronaryInterventionProcedure_TID3807(getSRTree());
		return this.objPercutaneousCoronaryInterventionProcedureTID3807;
	}

	/**
	 * Retrieves OtherInterventionalProcedures 
	 * @return objOtherInterventionalProceduresTID3809 Object of OtherInterventionalProcedures_TID3809 
	 */
	public OtherInterventionalProcedures_TID3809 getOtherInterventionalProcedures() 
	{
		if(null == this.objOtherInterventionalProceduresTID3809)
			this.objOtherInterventionalProceduresTID3809 = new OtherInterventionalProcedures_TID3809(getSRTree());
		return this.objOtherInterventionalProceduresTID3809;
	}

	/**
	 * Retrieves AdverseOutcomesCath 
	 * @return objAdverseOutcomesCathTID3820 Object of AdverseOutcomesCath_TID3820 
	 */
	public AdverseOutcomesCath_TID3820 getAdverseOutcomesCath() 
	{
		if(null == this.objAdverseOutcomesCathTID3820)
			this.objAdverseOutcomesCathTID3820 = new AdverseOutcomesCath_TID3820(getSRTree());
		return this.objAdverseOutcomesCathTID3820;
	}

	/**
	 * Retrieves SummaryCath 
	 * @return objSummaryCathTID3824 Object of SummaryCath_TID3824 
	 */
	public SummaryCath_TID3824 getSummaryCath() 
	{
		if(null == this.objSummaryCathTID3824)
			this.objSummaryCathTID3824 = new SummaryCath_TID3824(getSRTree());
		return this.objSummaryCathTID3824;
	}

	/**
	 * Retrieves DischargeSummaryCath 
	 * @return objDischargeSummaryCathTID3828 Object of DischargeSummaryCath_TID3828 
	 */
	public DischargeSummaryCath_TID3828 getDischargeSummaryCath() 
	{
		if(null == this.objDischargeSummaryCathTID3828)
			this.objDischargeSummaryCathTID3828 = new DischargeSummaryCath_TID3828(getSRTree());
		return this.objDischargeSummaryCathTID3828;
	}

	/**
	 * Sets the value for Cardiac Catheterization Report
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setCardiacCatheterizationReport(EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacCatheterizationReportRoot.CARDIAC_CATHETERIZATION_REPORT.getValue();
		String strCodeValue = EnumCV_CardiacCatheterizationReportRoot.CARDIAC_CATHETERIZATION_REPORT_18745_0.getValue();
		String strCSD = EnumCodingSchemeDesignator.LN.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 Procedure Reported.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumCathProcedureType Enumerated value for CathProcedureType
	 */
	public void setProcedureReported(int[] arrPosition, EnumCM_CathProcedureType enumCathProcedureType)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objCathProcedureTypeCID3739)
			this.objCathProcedureTypeCID3739 = new CathProcedureType_CID3739();
		this.objCathProcedureTypeCID3739.setCathProcedureType(enumCathProcedureType);

		String strCM = objCathProcedureTypeCID3739.getCodeMeaning();
		String strCV = objCathProcedureTypeCID3739.getCodeValue();
		String strCSD1 = objCathProcedureTypeCID3739.getCodingSchemeDesignator();
		String strSNOMEDCTID = objCathProcedureTypeCID3739.getSNOMEDCTID();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_CardiacCatheterizationReportRoot.PROCEDURE_REPORTED.getValue();
		String strCodeValue = EnumCV_CardiacCatheterizationReportRoot.PROCEDURE_REPORTED_121058.getValue();
		String strCSD2 = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * 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 , strCSD2, strCV, strCSD1, "", strCM,strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}
}
