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

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.AcquisitionModality_CID29;
import cdac.medinfo.sdk.dcm30_04.templates.cid.DiagnosticImagingReportDocumentTitles_CID7000;
import cdac.medinfo.sdk.dcm30_04.templates.cid.DiagnosticImagingReportElements_CID7002;
import cdac.medinfo.sdk.dcm30_04.templates.cid.DiagnosticImagingReportHeadings_CID7001;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_AcquisitionModality;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_DiagnosticImagingReportDocumentTitles;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_DiagnosticImagingReportElements;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_DiagnosticImagingReportHeadings;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_TranscribedDiagnosticImagingReport;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_TranscribedDiagnosticImagingReport;

/**
 * This class represents TranscribedDiagnosticImagingReport_TID2005  
 */
public class TranscribedDiagnosticImagingReport_TID2005 extends Template{
	
	/**
	 * Object of DiagnosticImagingReportHeadings_CID7001 
	 */
	private DiagnosticImagingReportHeadings_CID7001 objDiagnosticImagingReportHeadings_CID7001 = null;
	/**
	 * Object of DiagnosticImagingReportElements_CID7002
	 */
	private DiagnosticImagingReportElements_CID7002 objDiagnosticImagingReportElements_CID7002 = null;
	/**
	 * Object of AcquisitionModality which represents the CID29 Template. 
	 */
	private AcquisitionModality_CID29 objAcquisitionModality_CID29 = null;
	/**
	 * Object of DiagnosticImagingReportDocumentTitles which represents the CID7000 Template. 
	 */
	private DiagnosticImagingReportDocumentTitles_CID7000 objDiagnosticImagingReportDocumentTitles_CID7000 = null;
	public TranscribedDiagnosticImagingReport_TID2005(SRTree objTree) {
		super(objTree);
	}
	
	public void setDiagnosticImagingReportHeadings(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent,EnumCM_DiagnosticImagingReportHeadings enumDiagnosticImagingReportHeadings)
	{
		if(objDiagnosticImagingReportHeadings_CID7001 == null )
			objDiagnosticImagingReportHeadings_CID7001 = new DiagnosticImagingReportHeadings_CID7001();

		objDiagnosticImagingReportHeadings_CID7001.setDiagnosticImagingReportHeadings(enumDiagnosticImagingReportHeadings);

		// get string values for all
		String strCodeMeaning = objDiagnosticImagingReportHeadings_CID7001.getCodeMeaning();
		String strCodeValue = objDiagnosticImagingReportHeadings_CID7001.getCodeValue();
		String strCodeSchemeDesignator = objDiagnosticImagingReportHeadings_CID7001.getCodingSchemeDesignator();
		/**
		 * 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, strCodeSchemeDesignator, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setDiagnosticImagingReportDocumentTitles(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent,EnumCM_DiagnosticImagingReportDocumentTitles enumDiagnosticImagingReportDocumentTitles)
	{
		if(objDiagnosticImagingReportDocumentTitles_CID7000 == null )
			objDiagnosticImagingReportDocumentTitles_CID7000 = new DiagnosticImagingReportDocumentTitles_CID7000();

		objDiagnosticImagingReportDocumentTitles_CID7000.setDiagnosticImagingReportDocumentTitles(enumDiagnosticImagingReportDocumentTitles);

		// get string values for all
		String strCodeMeaning = objDiagnosticImagingReportDocumentTitles_CID7000.getCodeMeaning();
		String strCodeValue = objDiagnosticImagingReportDocumentTitles_CID7000.getCodeValue();
		String strCodeSchemeDesignator = objDiagnosticImagingReportDocumentTitles_CID7000.getCodingSchemeDesignator();
		/**
		 * 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, strCodeSchemeDesignator, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setProcedurereported(int[] arrPosition)
	{
		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TranscribedDiagnosticImagingReport.PROCEDURE_REPORTED.getValue();
		String strCodeValue = EnumCV_TranscribedDiagnosticImagingReport.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, "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Acquisition Device Type.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumAcquisitionModality value for AcquisitionModality
	 * @param strCodingSchemeVersionForCode CodingSchemeVersion 
	 */
	public void setAcquisitionDeviceType(int[] arrPosition, EnumCM_AcquisitionModality enumAcquisitionModality,String strCodingSchemeVersionForCode)
	{
		/**
		 * Sets the value for Patient Status And Events which follows the template CID3402
		 */
		if(objAcquisitionModality_CID29 == null )
			this.objAcquisitionModality_CID29 = new AcquisitionModality_CID29();

		this.objAcquisitionModality_CID29.setAcquisitionModality(enumAcquisitionModality);

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = objAcquisitionModality_CID29.getCodeMeaning();
		String strCV = objAcquisitionModality_CID29.getCodeValue();
		String strCSD1 = objAcquisitionModality_CID29.getCodingSchemeDesignator();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TranscribedDiagnosticImagingReport.ACQUISITION_DEVICE_TYPE.getValue();
		String strCodeValue = EnumCV_TranscribedDiagnosticImagingReport.ACQUISITION_DEVICE_TYPE_122142.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, strCodingSchemeVersionForCode, strCM);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Target Region
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 */
	public void setTargetRegion(int[] arrPosition)
	{
		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TranscribedDiagnosticImagingReport.TARGET_REGION.getValue();
		String strCodeValue = EnumCV_TranscribedDiagnosticImagingReport.TARGET_REGION_123014.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, "", "", "", "");
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setKeyImages(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent,EnumCM_DiagnosticImagingReportDocumentTitles enumDiagnosticImagingReportDocumentTitles)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TranscribedDiagnosticImagingReport.KEY_IMAGES.getValue();
		String strCodeValue = EnumCV_TranscribedDiagnosticImagingReport.KEY_IMAGES_55113_5.getValue();
		String strCSD2 = EnumCodingSchemeDesignator.LN.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, strCSD2, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setKeyObjectDescription(int[] arrPosition, String strRoomIdentification)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_TranscribedDiagnosticImagingReport.KEY_OBJECT_DESCRIPTION.getValue();
		String strCodeValue = EnumCV_TranscribedDiagnosticImagingReport.KEY_OBJECT_DESCRIPTION_113012.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, strRoomIdentification);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setDiagnosticImagingReportElements(int[] arrPosition,EnumCM_DiagnosticImagingReportElements enumDiagnosticImagingReportElements,String strRoomIdentification)
	{
		
		if(objDiagnosticImagingReportElements_CID7002 == null )
			this.objDiagnosticImagingReportElements_CID7002 = new DiagnosticImagingReportElements_CID7002();

		this.objDiagnosticImagingReportElements_CID7002.setDiagnosticImagingReportElements(enumDiagnosticImagingReportElements);
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCM = objDiagnosticImagingReportElements_CID7002.getCodeMeaning();
		String strCV = objDiagnosticImagingReportElements_CID7002.getCodeValue();
		String strCSD1 = objDiagnosticImagingReportElements_CID7002.getCodingSchemeDesignator();

		/**
		 * Creating a node of Value Type TEXT and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createTextNode(arrPosition, strCM, strCV, strCSD1, strRoomIdentification);
		getSRTree().addChild(objContentSequenceItem);
	}
}
