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

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.cathlabclinicalreporttemplate.CardiovascularPatientHistory_TID3802;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_GeneralRelevantPatientInformation;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_GeneralRelevantPatientInformation;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.LanguageOfContentItemAndDescendants_TID1204;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.PreviousReports_TID351;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;
import cdac.medinfo.sdk.dcm30_04.templates.procedurelogiodtemplates.PatientAssessment_TID3114;

/**
 * This class represents GeneralRelevantPatientInformation - TID9007
 */
public class GeneralRelevantPatientInformation_TID9007 extends Template
{
	/**
	 * Object of PreviousReports_TID351
	 */

	private PreviousReports_TID351 objPreviousReportsTID351;
	
	/**
	 * Object of LanguageOfContentItemAndDescendants_TID1204
	 */

	private LanguageOfContentItemAndDescendants_TID1204 objLanguageOfContentItemAndDescendantsTID1204;
	
	/**
	 * Object of PatientAssessment_TID3114
	 */

	private PatientAssessment_TID3114 objPatientAssessmentTID3114;

	/**
	 * Object of MedicationSubstanceEnvironmentalExposure_TID9002
	 */

	private MedicationSubstanceEnvironmentalExposure_TID9002 objEnvironmentalExposureTID9002;

	/**
	 * Object of PreviousProcedure_TID9003
	 */

	private PreviousProcedure_TID9003 objPreviousProcedureTID9003;

	/**
	 * Object of IndicatedProblem_TID9004
	 */

	private IndicatedProblem_TID9004 objIndicatedProblemTID9004;

	/**
	 * Object of RiskFactor_TID9005
	 */

	private RiskFactor_TID9005 objRiskFactorTID9005;

	/**
	 * Object of GynecologicalHistory_TID9001
	 */

	private GynecologicalHistory_TID9001 objGynecologicalHistoryTID9001;

	/**
	 * Object of ObstetricHistory_TID9006
	 */

	private ObstetricHistory_TID9006 objObstetricHistoryTID9006;

	/**
	 * Object of CardiovascularPatientHistory_TID3802
	 */

	private CardiovascularPatientHistory_TID3802 objPatientHistoryCathTID3802;

	/**
	 * Instantiates GeneralRelevantPatientInformation_TID9007 Template.
	 * @param objTree Object of SRTree.
	 */
	public GeneralRelevantPatientInformation_TID9007(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 PreviousReports  
	 * @return objPreviousReportsTID351 Object of PreviousReports_TID351 
	 */
	public PreviousReports_TID351 getPreviousReports() 
	{
		if(null == this.objPreviousReportsTID351)
			this.objPreviousReportsTID351 = new PreviousReports_TID351(getSRTree());
		return this.objPreviousReportsTID351;
	}
	
	/**
	 * Retrieves PatientAssessment 
	 * @return objPatientAssessmentTID3114 Object of PatientAssessment_TID3114 
	 */
	public PatientAssessment_TID3114 getPatientAssessment() 
	{
		if(null == this.objPatientAssessmentTID3114)
			this.objPatientAssessmentTID3114 = new PatientAssessment_TID3114(getSRTree());
		return this.objPatientAssessmentTID3114;
	}

	/**
	 * Retrieves MedicationSubstanceEnvironmentalExposure 
	 * @return objEnvironmentalExposureTID9002 Object of MedicationSubstanceEnvironmentalExposure_TID9002 
	 */
	public MedicationSubstanceEnvironmentalExposure_TID9002 getMedicationSubstanceEnvironmentalExposure() 
	{
		if(null == this.objEnvironmentalExposureTID9002)
			this.objEnvironmentalExposureTID9002 = new MedicationSubstanceEnvironmentalExposure_TID9002(getSRTree());
		return this.objEnvironmentalExposureTID9002;
	}

	/**
	 * Retrieves PreviousProcedure 
	 * @return objPreviousProcedureTID9003 Object of PreviousProcedure_TID9003 
	 */
	public PreviousProcedure_TID9003 getPreviousProcedure() 
	{
		if(null == this.objPreviousProcedureTID9003)
			this.objPreviousProcedureTID9003 = new PreviousProcedure_TID9003(getSRTree());
		return this.objPreviousProcedureTID9003;
	}

	/**
	 * Retrieves IndicatedProblem
	 * @return objIndicatedProblemTID9004 Object of IndicatedProblem_TID9004 
	 */
	public IndicatedProblem_TID9004 getIndicatedProblem() 
	{
		if(null == this.objIndicatedProblemTID9004)
			this.objIndicatedProblemTID9004 = new IndicatedProblem_TID9004(getSRTree());
		return this.objIndicatedProblemTID9004;
	}

	/**
	 * Retrieves RiskFactor 
	 * @return objRiskFactorTID9005 Object of RiskFactor_TID9005 
	 */
	public RiskFactor_TID9005 getRiskFactor() 
	{
		if(null == this.objRiskFactorTID9005)
			this.objRiskFactorTID9005 = new RiskFactor_TID9005(getSRTree());
		return this.objRiskFactorTID9005;
	}

	/**
	 * Retrieves GynecologicalHistory 
	 * @return objGynecologicalHistoryTID9001 Object of GynecologicalHistory_TID9001 
	 */
	public GynecologicalHistory_TID9001 getGynecologicalHistory() 
	{
		if(null == this.objGynecologicalHistoryTID9001)
			this.objGynecologicalHistoryTID9001 = new GynecologicalHistory_TID9001(getSRTree());
		return this.objGynecologicalHistoryTID9001;
	}

	/**
	 * Retrieves ObstetricHistory 
	 * @return objObstetricHistoryTID9006 Object of ObstetricHistory_TID9006 
	 */
	public ObstetricHistory_TID9006 getObstetricHistory() 
	{
		if(null == this.objObstetricHistoryTID9006)
			this.objObstetricHistoryTID9006 = new ObstetricHistory_TID9006(getSRTree());
		return this.objObstetricHistoryTID9006;
	}

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

	/**
	 * Sets the value for Relevant Patient Information
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setRelevantPatientInformation(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_GeneralRelevantPatientInformation.RELEVANT_PATIENT_INFORMATION.getValue();
		String strCodeValue = EnumCV_GeneralRelevantPatientInformation.RELEVANT_PATIENT_INFORMATION_111517.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);
	}
}
