/*******************************************************************************
 *  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.EnumGraphicType;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.DiagnosticImagingReportPurposesOfReference_CID7003;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_DiagnosticImagingReportPurposesOfReference;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ReferencesToSupportingEvidence;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_ReferencesToSupportingEvidence;

/**
 * Identifies (and optionally describes) a patient who is the subject.
 */
/**
 * This class represents ReferencesToSupportingEvidence_TID350 
 */
public class ReferencesToSupportingEvidence_TID350 extends Template {
	
	/**
	 * Object of DiagnosticImagingReportPurposesofReference_CID7003. 
	 */
	private DiagnosticImagingReportPurposesOfReference_CID7003 objDiagnosticImagingReportPurposesofReference;
	
	/**
	 * Instantiates a new ReferencesToSupportingEvidence_TID350 Template.
	 * @param objTree Object of SRTree.
	 */
	public ReferencesToSupportingEvidence_TID350(SRTree objTree)
	{
		super(objTree);
	}
	
	/**
	 * Sets the value for Subject Name.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strRefSOPClassUIDForCORefMacro 
	 * @param strRefSOPInstanceUIDForCORefMacro 
	 * @param string 
	 * @param strRefSOPClassUID 
	 * @param arrFlGraphicData 
	 * @param enumGraphicType 
	 * @param strRefSOPInstanceUID 
	 * @param arrStrReferencedFrameNumber 
	 * @param strSubjectName String value for SubjectName
	 */
	public void setDiagnosticImagingReportPurposesOfReference(int[] arrPosition, EnumCM_DiagnosticImagingReportPurposesOfReference enumDiagnosticImagingReportPurposesOfReference, String strRefSOPClassUIDForCORefMacro, String strRefSOPInstanceUIDForCORefMacro, String[] string, String strRefSOPClassUID, float[] arrFlGraphicData, EnumGraphicType enumGraphicType, String strRefSOPInstanceUID, String[] arrStrReferencedFrameNumber)
	{

		/**
		 * Setting value for ComplicationOfProcedure
		 */
		if(null== this.objDiagnosticImagingReportPurposesofReference)
			this.objDiagnosticImagingReportPurposesofReference = new DiagnosticImagingReportPurposesOfReference_CID7003();
		this.objDiagnosticImagingReportPurposesofReference.setDiagnosticImagingReportPurposesOfReference(enumDiagnosticImagingReportPurposesOfReference);

		String strCM = objDiagnosticImagingReportPurposesofReference.getCodeMeaning();
		String strCV = objDiagnosticImagingReportPurposesofReference.getCodeValue();
		String strCSD = objDiagnosticImagingReportPurposesofReference.getCodingSchemeDesignator();
		//String strCSV = objDiagnosticImagingReportPurposesofReference.getCodingSchemeVersion();

		/**
		 * Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createImageNode(arrPosition, strCM, strCV, strCSD, strRefSOPClassUIDForCORefMacro, strRefSOPInstanceUIDForCORefMacro, arrStrReferencedFrameNumber, strRefSOPClassUID, strRefSOPInstanceUID);
		getSRTree().addChild(objContentSequenceItem);
		/**
		 * Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem1 = getSRTree().createSCOORDNode(arrPosition, strCM, strCV, strCSD, arrFlGraphicData, enumGraphicType);
		getSRTree().addChild(objContentSequenceItem1);
	}

	/**
	 * Sets the value for Current Procedure Evidence.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strReferencedSOPInstanceUIDstr 
	 * @param strReferencedSOPClassUID 
	 * @param strSubjectBirthDate String value for Subject Birth Date
	 */
	public void setCurrentProcedureEvidence(int[] arrPosition, String strReferencedSOPInstanceUIDstr, String strReferencedSOPClassUID)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ReferencesToSupportingEvidence.CURRENT_PROCEDURE_EVIDENCE.getValue();
		String strCodeValue = EnumCV_ReferencesToSupportingEvidence.CURRENT_PROCEDURE_EVIDENCE_122073.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type DATE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCompositeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strReferencedSOPClassUID, strReferencedSOPInstanceUIDstr);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for Subject Birth Date.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strReferencedSOPInstanceUIDstr 
	 * @param strReferencedSOPClassUID 
	 * @param strSubjectBirthDate String value for Subject Birth Date
	 */
	public void setDocumentTitle(int[] arrPosition)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_ReferencesToSupportingEvidence.DOCUMENT_TITLE.getValue();
		String strCodeValue = EnumCV_ReferencesToSupportingEvidence.DOCUMENT_TITLE_121144.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type DATE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, "", "","","");
		getSRTree().addChild(objContentSequenceItem);
	}

}
