/*******************************************************************************
 *  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.services.srs.testcases.scu;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConstants;



import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


import cdac.medinfo.sdk.dcm30_04.baselibs.DataSet;
import cdac.medinfo.sdk.dcm30_04.baselibs.ImagePixelMacro;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDataSet;
import cdac.medinfo.sdk.dcm30_04.dicommodel.modules.PatientModule;
import cdac.medinfo.sdk.dcm30_04.dicommodel.modules.SOPCommonModule;
import cdac.medinfo.sdk.dcm30_04.dicommodel.modules.SRDocumentContentModule;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.BasicTextSRIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.ChestCADSRIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.ColonCADSRIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.Comprehensive3DSRIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.ComprehensiveSRIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.EnhancedSRIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.ExtensibleSRIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.ImplantationPlanSRDocumentIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.KeyObjectSelectionDocumentIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.MacularGridThicknessandVolumeReportIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.MammographyCADSRIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.ProcedureLogIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.RadiopharmaceuticalRadiationDoseSRIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.SpectaclePrescriptionReportIOD;
import cdac.medinfo.sdk.dcm30_04.dicommodel.sr.XRayRadiationDoseSRIOD;
import cdac.medinfo.sdk.dcm30_04.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.enums.EnumGraphicType;
import cdac.medinfo.sdk.dcm30_04.enums.EnumLoggingLevel;
import cdac.medinfo.sdk.dcm30_04.enums.EnumPDUType;
import cdac.medinfo.sdk.dcm30_04.enums.EnumRelationshipType;
import cdac.medinfo.sdk.dcm30_04.enums.EnumSOPClassUIDs;
import cdac.medinfo.sdk.dcm30_04.enums.EnumTemporalRangeType;

import cdac.medinfo.sdk.dcm30_04.services.association.AAbort;
import cdac.medinfo.sdk.dcm30_04.services.association.AReleaseRQorRP;
import cdac.medinfo.sdk.dcm30_04.services.association.AssociateRQ;
import cdac.medinfo.sdk.dcm30_04.services.association.DefaultAssociation;
import cdac.medinfo.sdk.dcm30_04.services.cstore.commons.CStoreRQ;
import cdac.medinfo.sdk.dcm30_04.services.cstore.commons.CStoreRSP;
import cdac.medinfo.sdk.dcm30_04.services.cstore.scu.CStoreSCU;
import cdac.medinfo.sdk.dcm30_04.services.dicomnetcommons.EnumServiceType;
import cdac.medinfo.sdk.dcm30_04.services.scu.commons.SCUSession;
import cdac.medinfo.sdk.dcm30_04.srtree.SRDocument;
import cdac.medinfo.sdk.dcm30_04.srtree.SRNode;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConfig;

/**
 * This class is implemented to test the SRS SCU.
 * 
 * In order to run the following class , please refer to this link($Link) to create the environment.
 * To implement an SCU of a particular we need to do the following things:
 * Create the SCUSession object which maintains the current session of the SCU. Its "start" method accepts
 * the SCP's IP Address and Port and tries to establish a connection with the SCP.
 * 
 * Next step is to establish association .Some ways to create an Association Request: 
 * 1)Use Default Association class to Load the association for requested serive. User can load the association 
 * by specifying the Serivce Type in loadAssociation method of Default association. For e.g. here EnumServiceType.CSTORE
 * should be specified to load Association for C-Store Serives. The association request for CSTORE 
 * is made according to  jars in the class path.
 * 2) Manually create object of AssociationRQ class and set all presentation contexts colleciton on it. 
 * More details provided in the API DOCS of AssociationRQ class.
 * 
 * After successful association is established the SCUSession stores the status of the Association with it.  
 * Create CStoreSCU object to send the CStore Request to the respective SCP. Currently the "sendMessage" method 
 * of the CStoreSCU would wait after sending the CStoreRQ until a suitable DIMSE response is received. 
 * This operation is part of Synchrnous mode request handling.  
 * Once the DIMSE response is received by the CStoreSCU it stores it into its collection
 * which then can be retrieved.
 * 
 * After this, create a A-Release-RQ in order to request for association release and send it using the
 * SCUSession object. This again is a blocking call and the SCUSession waits until a A-Release-RP is received.
 * 
 * At the end of an operation calling "close" on SCUSession would disconnect the connection made with the 
 * SCP and release all the acquired resources.
 * Instead of closing the session after a C-Store operation is compelte,we can create another association
 * and send mroe requests. 
 * Also it is possible to create multiple CStoreRQs and send them one by one on the same Association.
 */

public class StructRepStorage_SCU 
{
	public static void main(String[] args)
	{
		DicomConfig objDicomConfig = DicomConfig.createInstance();

		//enable logging,specify the path of the directory where log files are created.
		//User can specify any directory in place of 'c:\DCM_Logs'.
		//If no directory is defined by user to create logs then it is created in User Temp DIR.
		objDicomConfig.enableLogging(EnumLoggingLevel.INFO, "/home/DCM_Logs");







		/*
		 * Creates instance of StructRepStorage_SCU
		 */
		StructRepStorage_SCU objTestSRS_SCU = new StructRepStorage_SCU();

		/*
		 * Performs operation of SRS Services 
		 */
		objTestSRS_SCU.doSRS();
	}

	/**
	 * This function performs the operation for all supported services of SRS
	 * SRS operation involves following steps :-
	 * 1. Establish the connection with SCP
	 * 2. Establish the association with SCP
	 * 3. Initializes the SCU for corresponding N-Service and performs the operation using service request
	 * 4. Releases the association after successful processing of service request
	 * 5. Closes the connection with SCP. 
	 */
	public void doSRS()
	{
		try
		{
			/*
			 * *************************************************************************
			 * This block of code performs the connection process with SCP.
			 * It creates the SCUSession and connects with SCP using this session.
			 * *************************************************************************
			 */
			//Create SCUSession object
			SCUSession objSession = new SCUSession();

			/*
			 * Setting time out as 5000 milli second. It will wait 5000 mili seconds for read and write operation.
			 * If in the time specified (5000 ms) read or write operation is not performed then 
			 * session is time out.
			 */ 
			//objSession.setTimeOut(5000);

			//Start SCU Session by providing the IP address and Port of SCP.
			objSession.start("localhost", 9000);

			/*
			 * *************************************************************************
			 * This block of code initializes the DefaultAssociation information
			 * Using the DefaultAssociation it generates the Association Request and 
			 * creates association with SCP.
			 * *************************************************************************
			 */

			// Initializes the service types and loads the Default Association
			EnumServiceType[] arrenumServiceType = new EnumServiceType[1];
			arrenumServiceType[0] = EnumServiceType.CSTORE_SRS;
			DefaultAssociation objDefaultAssociation = new DefaultAssociation("SDK");
			objDefaultAssociation.loadAssociation(arrenumServiceType);

			//Create Association RQ
			AssociateRQ objAssociateRQ = objDefaultAssociation.getAssociationRQ("SDK");

			//Send the Association Request
			if(objSession.sendAssociationMessage(objAssociateRQ))
			{	
				//When associaton is successfully established the "objSession.sendAssociationMessage()" method returns true.
				System.out.println("Association established");

				/*
				 * *************************************************************************
				 * This block of code creates the NCreate SCU to perform the process of 
				 * SOP Instance creation operation for SRS.
				 * It initializes the CStore RQ and sends it to SCP.
				 * *************************************************************************
				 */
				//Create CStore SCU object using the current SCU Session.
				CStoreSCU objCStoreSCU = new CStoreSCU(objSession);

				//Genarating Dataset for SRS
				//ChestCADSRIOD objChestCADSRIOD = getChestCADSRIOD();
				IDataSet objSRSDataSet = getDataSet();

				CStoreRQ objCStoreRQ = CStoreRQ.getDefaultRQ(objSRSDataSet);
				System.out.println("C-Store Request for SRS is created");

				//sending RQ to SCP
				if(objCStoreSCU.sendMessage(objCStoreRQ)) //sending request
					System.out.println("SRS Operation performed");
				else
				{
					System.out.println("SRS Operation failed");

					//In case an ABORT is received from SCP during the SRS operation
					if(objSession.getDIMSEAssociation() instanceof AAbort)
					{
						System.out.println("Abort arrives. Closing session.");
						objSession.close();
					}
				}

				//==============display status
				CStoreRSP objCStoreRSP = new CStoreRSP(objCStoreSCU.getDIMSEResponse().elementAt(0)); 
				System.out.println("Structured Reporting Storage Status : " + objCStoreRSP.getStatus());

				/*
				 * *************************************************************************
				 * This block of code releases the association and 
				 * removes the connection with SCP.  
				 * *************************************************************************
				 */
				//Create A-Release-RQ to release the association
				AReleaseRQorRP objAReleaseRQorRP = new AReleaseRQorRP(EnumPDUType.RELEASE_RQ);

				//Send the A-Release-RQ
				if(objSession.sendAssociationMessage(objAReleaseRQorRP))
				{
					//When successful A-Release-RP is received, close the Session.
					//Please note that instead of closing the session we can create 
					//another association and send more requests. Also it is possible
					//to create multiple C-Services-RQs and send them one by one.
					objSession.close();
				}
				else
				{
					System.out.println("Association cannot be released");
				}
			}
			else
			{
				System.out.println("Association cannot be established");
			}
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
	}

	/**
	 * Gives the dataset for selected IOD.
	 * @return objDataSet Object of IDataSet
	 */
	private IDataSet getDataSet()
	{
		int i;
		IDataSet objDataSet = new DataSet();
		try
		{
			do{
			System.out.println("Enter a number for IOD to generate SR Document : " +
					"\n 1.	Basic Text SR IOD" +
					"\n 2.	Chest CAD SRI OD" +
					"\n 3.	Comprehensive SR IOD" +
					"\n 4.	Enhanced SR IOD" +
					"\n 5.	Key Object Selection Document IOD" +
					"\n 6.	Mammography CAD SR IOD"+
					"\n 7.	Implantation Plan SR Document IOD"+
					"\n 8.	Macular Grid Thickness and Volume Report IOD"+
					"\n 9.	Colon CAD SR IOD"+
					"\n 10.	Radiopharmaceutical Radiation Dose SRIOD"+
					"\n 11.	Comprehensive 3D SR IOD"+
					"\n 12.	Procedure Log IOD"+
					"\n 13. 	X Ray Radiation Dose SR IOD"+
					"\n 14.	Extensible SRI OD" +
					"\n 15.	Spectacle Prescription Report IOD"); 

			InputStreamReader input = new InputStreamReader(System.in);
			BufferedReader reader = new BufferedReader(input);
			i = Integer.parseInt(reader.readLine());

			switch (i)
			{
			case 1:
				BasicTextSRIOD objBasicTextSRIOD = getBasicTextSRIOD();
				objDataSet = objBasicTextSRIOD.getDataSet();
				break;

			case 2:
				ChestCADSRIOD objChestCADSRIOD = getChestCADSRIOD();
				objDataSet = objChestCADSRIOD.getDataSet();
				break;

			case 3:
				ComprehensiveSRIOD objComprehensiveSRIOD = getComprehensiveSRIOD();
				objDataSet = objComprehensiveSRIOD.getDataSet();
				break;

			case 4:
				EnhancedSRIOD objEnhancedSRIOD = getEnhancedSRIOD();
				objDataSet = objEnhancedSRIOD.getDataSet();
				break;

			case 5:
				KeyObjectSelectionDocumentIOD objKeyObjectSelectionDocumentIOD = getKeyObjectSelectionDocumentIOD();
				objDataSet = objKeyObjectSelectionDocumentIOD.getDataSet();
				break;

			case 6:
				MammographyCADSRIOD objMammographyCADSRIOD = getMammographyCADSRIOD();
				objDataSet = objMammographyCADSRIOD.getDataSet();
				break;
				
			case 7:
				ImplantationPlanSRDocumentIOD objImplantationPlanSRDocumentIOD = getImplantationPlanSRDocumentIOD();
				objDataSet = objImplantationPlanSRDocumentIOD.getDataSet();
				break;
			case 8:
				MacularGridThicknessandVolumeReportIOD objMacularGridThicknessandVolumeReportIOD = getMacularGridThicknessandVolumeReportIOD();
				objDataSet = objMacularGridThicknessandVolumeReportIOD.getDataSet();
				break;
			case 9:
				ColonCADSRIOD objColonCADSRIOD = getColonCADSRIOD();
				objDataSet = objColonCADSRIOD.getDataSet();
				break;
			case 10:
				RadiopharmaceuticalRadiationDoseSRIOD objRadiopharmaceuticalRadiationDoseSRIOD = getRadiopharmaceuticalRadiationDoseSRIOD();
				objDataSet = objRadiopharmaceuticalRadiationDoseSRIOD.getDataSet();
				break;
			case 11:
				Comprehensive3DSRIOD objComprehensive3DSRIOD = getComprehensive3DSRIOD();
				objDataSet = objComprehensive3DSRIOD.getDataSet();
				break;
			case 12:
				ProcedureLogIOD objProcedureLogIOD = getProcedureLogIOD();
				objDataSet = objProcedureLogIOD.getDataSet();
				break;
			case 13:
				XRayRadiationDoseSRIOD objXRayRadiationDoseSRIOD = getXRayRadiationDoseSRIOD();
				objDataSet = objXRayRadiationDoseSRIOD.getDataSet();
				break;
			case 14:
				ExtensibleSRIOD objExtensibleSRIOD = getExtensibleSRIOD();
				objDataSet = objExtensibleSRIOD.getDataSet();
				break;
			case 15:
				SpectaclePrescriptionReportIOD objSpectaclePrescriptionReportIOD = getSpectaclePrescriptionReportIOD();
				objDataSet = objSpectaclePrescriptionReportIOD.getDataSet();
				break;
			default:
				System.out.println("Enter number from list only.....!!!\n");
				break;
			}
		}while(i < 1 || i > 15);
		}	
		catch(IOException e)
		{
			e.printStackTrace();
		}

		return objDataSet;
	}

	/**
	 * Populates the dataset internally using ChestCADSRIOD object with specified values for SRS.
	 * @return objChestCADSRIOD instance of ChestCADSRIOD.
	 */
	private ChestCADSRIOD getChestCADSRIOD()
	{
		ChestCADSRIOD objChestCADSRIOD = new ChestCADSRIOD();


		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objChestCADSRIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objChestCADSRIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.CHESTCADSRIOD.getValue());

		// SET STUDY INSTANCE UID
		objChestCADSRIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.2");

		objChestCADSRIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objChestCADSRIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "1", "1", "1" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "12", "12", "21" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objChestCADSRIOD;
	}

	/**
	 * Populates the dataset internally using BasicTextSRIOD object with specified values for SRS.
	 * @return objBasicTextSRIOD instance of BasicTextSRIOD.
	 */
	private BasicTextSRIOD getBasicTextSRIOD()
	{
		BasicTextSRIOD objBasicTextSRIOD = new BasicTextSRIOD();

		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objBasicTextSRIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objBasicTextSRIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.BASICTEXTSRIOD.getValue());

		// SET STUDY INSTANCE UID
		objBasicTextSRIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.2");

		objBasicTextSRIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objBasicTextSRIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "10:57:00", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "20020510043457", "20020510043457", "20020510043457" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "1", "1", "1" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objBasicTextSRIOD;
	}

	/**
	 * Populates the dataset internally using ComprehensiveSRIOD object with specified values for SRS.
	 * @return objComprehensiveSRIOD instance of ComprehensiveSRIOD.
	 */
	private ComprehensiveSRIOD getComprehensiveSRIOD()
	{
		ComprehensiveSRIOD objComprehensiveSRIOD = new ComprehensiveSRIOD();

		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objComprehensiveSRIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objComprehensiveSRIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.COMPREHENSIVESRIOD.getValue());

		// SET STUDY INSTANCE UID
		objComprehensiveSRIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.2");

		objComprehensiveSRIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objComprehensiveSRIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "20020510043457", "20020510043457", "20020510043457" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "1", "1", "1" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objComprehensiveSRIOD;
	}

	/**
	 * Populates the dataset internally using EnhancedSRIOD object with specified values for SRS.
	 * @return objEnhancedSRIOD instance of EnhancedSRIOD.
	 */
	private EnhancedSRIOD getEnhancedSRIOD()
	{
		EnhancedSRIOD objEnhancedSRIOD = new EnhancedSRIOD();

		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objEnhancedSRIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objEnhancedSRIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.ENHANCEDSRIOD.getValue());

		// SET STUDY INSTANCE UID
		objEnhancedSRIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.2");

		objEnhancedSRIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objEnhancedSRIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "20020510043457", "20020510043457", "20020510043457" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "1", "1", "1" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "11", "11" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objEnhancedSRIOD;
	}

	/**
	 * Populates the dataset internally using KeyObjectSelectionDocumentIOD object with specified values for SRS.
	 * @return objKeyObjectSelectionDocumentIOD instance of KeyObjectSelectionDocumentIOD.
	 */
	private KeyObjectSelectionDocumentIOD getKeyObjectSelectionDocumentIOD()
	{
		KeyObjectSelectionDocumentIOD objKeyObjectSelectionDocumentIOD = new KeyObjectSelectionDocumentIOD();

		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objKeyObjectSelectionDocumentIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objKeyObjectSelectionDocumentIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.KEYOBJECTSELECTIONDOCUMENTIOD.getValue());

		// SET STUDY INSTANCE UID
		objKeyObjectSelectionDocumentIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.2");

		objKeyObjectSelectionDocumentIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objKeyObjectSelectionDocumentIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "20020510043457", "20020510043457", "20020510043457" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "1", "1", "1" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "1", "1" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objKeyObjectSelectionDocumentIOD;
	}

	/**
	 * Populates the dataset internally using MammographyCADSRIOD object with specified values for SRS.
	 * @return objMammographyCADSRIOD instance of MammographyCADSRIOD.
	 */
	private MammographyCADSRIOD getMammographyCADSRIOD()
	{
		MammographyCADSRIOD objMammographyCADSRIOD = new MammographyCADSRIOD();

		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objMammographyCADSRIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objMammographyCADSRIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.MAMMOGRAPHYCADSRIOD.getValue());

		// SET STUDY INSTANCE UID
		objMammographyCADSRIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.2");

		objMammographyCADSRIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objMammographyCADSRIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "20020510043457", "20020510043457", "20020510043457" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "1", "1", "1" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "1", "1" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objMammographyCADSRIOD;
	}
	
	/**
	 * Populates the dataset internally using ImplantationPlanSRDocumentIOD object with specified values for SRS.
	 * @return objImplantationPlanSRDocumentIOD instance of ImplantationPlanSRDocumentIOD.
	 */
	private ImplantationPlanSRDocumentIOD getImplantationPlanSRDocumentIOD()
	{
		ImplantationPlanSRDocumentIOD objImplantationPlanSRDocumentIOD = new ImplantationPlanSRDocumentIOD();


		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objImplantationPlanSRDocumentIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objImplantationPlanSRDocumentIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.IMPLANTATIONPLANSRIOD.getValue());

		// SET STUDY INSTANCE UID
		objImplantationPlanSRDocumentIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.1");

		objImplantationPlanSRDocumentIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objImplantationPlanSRDocumentIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "1", "1", "1" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "12", "12", "21" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objImplantationPlanSRDocumentIOD;
	}

	
	/**
	 * Populates the dataset internally using MacularGridThicknessandVolumeReportIOD object with specified values for SRS.
	 * @return objMacularGridThicknessandVolumeReportIOD instance of MacularGridThicknessandVolumeReportIOD.
	 */
	private MacularGridThicknessandVolumeReportIOD getMacularGridThicknessandVolumeReportIOD()
	{
		MacularGridThicknessandVolumeReportIOD objMacularGridThicknessandVolumeReportIOD = new MacularGridThicknessandVolumeReportIOD();


		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objMacularGridThicknessandVolumeReportIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objMacularGridThicknessandVolumeReportIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.MACULARGRIDTHICKNESSANDVOLUMEREPORTIOD.getValue());

		// SET STUDY INSTANCE UID
		objMacularGridThicknessandVolumeReportIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.2");

		objMacularGridThicknessandVolumeReportIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objMacularGridThicknessandVolumeReportIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "1", "1", "1" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "12", "12", "21" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objMacularGridThicknessandVolumeReportIOD;
	}
	/**
	 * Populates the dataset internally using ColonCADSRIOD object with specified values for SRS.
	 * @return objColonCADSRIOD instance of ColonCADSRIOD.
	 */
	private ColonCADSRIOD getColonCADSRIOD()
	{
		ColonCADSRIOD objColonCADSRIOD = new ColonCADSRIOD();


		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objColonCADSRIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objColonCADSRIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.COLONCADSRIOD.getValue());

		// SET STUDY INSTANCE UID
		objColonCADSRIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.3");

		objColonCADSRIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objColonCADSRIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "1", "1", "1" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "12", "12", "21" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objColonCADSRIOD;
	}
	/**
	 * Populates the dataset internally using RadiopharmaceuticalRadiationDoseSRIOD object with specified values for SRS.
	 * @return objRadiopharmaceuticalRadiationDoseSRIOD instance of RadiopharmaceuticalRadiationDoseSRIOD.
	 */
	private RadiopharmaceuticalRadiationDoseSRIOD getRadiopharmaceuticalRadiationDoseSRIOD()
	{
		RadiopharmaceuticalRadiationDoseSRIOD objRadiopharmaceuticalRadiationDoseSRIOD = new RadiopharmaceuticalRadiationDoseSRIOD();


		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objRadiopharmaceuticalRadiationDoseSRIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objRadiopharmaceuticalRadiationDoseSRIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.RADIOPHARMACEUTICALRADIATIONDOSESRIOD.getValue());

		// SET STUDY INSTANCE UID
		objRadiopharmaceuticalRadiationDoseSRIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.41");

		objRadiopharmaceuticalRadiationDoseSRIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objRadiopharmaceuticalRadiationDoseSRIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "1", "1", "1" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "12", "12", "21" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objRadiopharmaceuticalRadiationDoseSRIOD;
	}
	/**
	 * Populates the dataset internally using Comprehensive3DSRIOD object with specified values for SRS.
	 * @return objComprehensive3DSRIOD instance of Comprehensive3DSRIOD.
	 */
	private Comprehensive3DSRIOD getComprehensive3DSRIOD()
	{
		Comprehensive3DSRIOD objComprehensive3DSRIOD = new Comprehensive3DSRIOD();


		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objComprehensive3DSRIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objComprehensive3DSRIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.COMPREHENSIVE3DSRIOD.getValue());

		// SET STUDY INSTANCE UID
		objComprehensive3DSRIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.4");

		objComprehensive3DSRIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objComprehensive3DSRIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "1", "1", "1" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "12", "12", "21" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objComprehensive3DSRIOD;
	}
	
	/**
	 * Populates the dataset internally using ProcedureLogIOD object with specified values for SRS.
	 * @return objProcedureLogIOD instance of ProcedureLogIOD.
	 */
	private ProcedureLogIOD getProcedureLogIOD()
	{
		ProcedureLogIOD objProcedureLogIOD = new ProcedureLogIOD();


		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objProcedureLogIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objProcedureLogIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.PROCEDURELOGIOD.getValue());

		// SET STUDY INSTANCE UID
		objProcedureLogIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.5");

		objProcedureLogIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objProcedureLogIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "1", "1", "1" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "12", "12", "21" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objProcedureLogIOD;
	}
	
	/**
	 * Populates the dataset internally using ExtensibleSRIOD object with specified values for SRS.
	 * @return objExtensibleSRIOD instance of ExtensibleSRIOD.
	 */
	private ExtensibleSRIOD getExtensibleSRIOD()
	{
		ExtensibleSRIOD objExtensibleSRIOD = new ExtensibleSRIOD();


		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objExtensibleSRIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objExtensibleSRIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.EXTENSIBLESRIOD.getValue());

		// SET STUDY INSTANCE UID
		objExtensibleSRIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.6");

		objExtensibleSRIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objExtensibleSRIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "1", "1", "1" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "12", "12", "21" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objExtensibleSRIOD;
	}

	/**
	 * Populates the dataset internally using XRayRadiationDoseSRIOD object with specified values for SRS.
	 * @return objXRayRadiationDoseSRIOD instance of XRayRadiationDoseSRIOD.
	 */
	private XRayRadiationDoseSRIOD getXRayRadiationDoseSRIOD()
	{
		XRayRadiationDoseSRIOD objXRayRadiationDoseSRIOD = new XRayRadiationDoseSRIOD();


		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objXRayRadiationDoseSRIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objXRayRadiationDoseSRIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.XRAYRADIATIONDOSESRIOD.getValue());

		// SET STUDY INSTANCE UID
		objXRayRadiationDoseSRIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.7");

		objXRayRadiationDoseSRIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objXRayRadiationDoseSRIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "1", "1", "1" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "12", "12", "21" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objXRayRadiationDoseSRIOD;
	}

	/**
	 * Populates the dataset internally using SpectaclePrescriptionReportIOD object with specified values for SRS.
	 * @return objSpectaclePrescriptionReportIOD instance of SpectaclePrescriptionReportIOD.
	 */
	private SpectaclePrescriptionReportIOD getSpectaclePrescriptionReportIOD()
	{
		SpectaclePrescriptionReportIOD objSpectaclePrescriptionReportIOD = new SpectaclePrescriptionReportIOD();


		// TO SET HEADER INFO OF SR DOC
		@SuppressWarnings("unused")
		PatientModule objPatientModule = objSpectaclePrescriptionReportIOD.getPatientModule();
		//objPatientModule.set

		// TO SET CLASS UID 
		SOPCommonModule objCommonModule = objSpectaclePrescriptionReportIOD.getSOPCommonModule();
		objCommonModule.setSOPClassUID(EnumSOPClassUIDs.XRAYRADIATIONDOSESRIOD.getValue());

		// SET STUDY INSTANCE UID
		objSpectaclePrescriptionReportIOD.getGeneralStudyModule().setStudyInstanceUID("1.1.1.1.2.2.117");

		objSpectaclePrescriptionReportIOD.getSOPCommonModule().setSOPInstanceUID("11.11.11.11.21.21.21");

		// TO CREATE SR TREE
		SRDocumentContentModule objDocumentContentModule = objSpectaclePrescriptionReportIOD.getSRDocumentContentModule();

		SRDocument objDocument = new SRDocument();
		SRNode objRoot = objDocument.createRoot(objDocumentContentModule, EnumRelationshipType.CONTAINS, "PROCEDURE LOG", "2345", "DCM", EnumContinuityOfContent.CONTINUOUS);

		objRoot.addPnameNode("TYPE", "5678", "LN", "Device", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		SRNode objNode = objRoot.addPnameNode("Observer Name", "5678", "SRT", "XYZ", EnumRelationshipType.CONTAINS);

		objNode.addPnameNode("Observer Type 1", "2357", "DCM", "20020510043457", EnumRelationshipType.HAS_OBSERVATION_CONTEXT);
		SRNode node = objNode.addPnameNode("Observer Type 2", "2357", "DCM", "Yahoo", EnumRelationshipType.HAS_PROPERTIES);

		node.addTextNode("Observer Type 3", "2357", "DCM", "Yahoo3", EnumRelationshipType.INFERRED_FROM);
		SRNode node2 = node.addTimeNode("TIME", "78768", "SRT", "10:57:00", EnumRelationshipType.SELECTED_FROM);

		node2.addDateTimeNode("DATETIME", "36456", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		objNode.addDateTimeNode("rtert", "rte", "reter", "20020510043457", EnumRelationshipType.INFERRED_FROM);
		objNode.addUIDREFNode("UIDREF", "5675", "DCM", "20020510043457", EnumRelationshipType.INFERRED_FROM);

		SRNode containerNode = objRoot.addContainerNode("CONTAINER", "1111", "DCM", EnumContinuityOfContent.SEPARATE, EnumRelationshipType.CONTAINS);
		containerNode.addPnameNode("Pname", "578", "CSD", "LMN", EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objNode.addCodeNode("CODE", "76858", "DCM", "5667", "DCM", "v3", "code", EnumRelationshipType.CONTAINS);

		String[] arr = { "1", "1", "1" };
		objNode.addNumNode("NUM", "34545", "DCM", arr, "0780", "UL", "2b", "deg", "codemeaning", "345", "DCM", "sdf", EnumRelationshipType.CONTAINS);

		objNode.addCompositeNode("COMPOSITE", "34545", "CSD", "45.67.2.45", "678.890.345.4.4", EnumRelationshipType.CONTAINS);

		short[] arrsh ={ (short)4, (short)7, (short)24 };
		objNode.addWaveformNode("WAVEFORM", "346", "DCM", "567.95.3.3", "345.78.23.3", arrsh, EnumRelationshipType.HAS_ACQUISITION_CONTEXT);

		objRoot.addDateTimeNode("TIME", "345", "DCM", "20020510043457", EnumRelationshipType.CONTAINS);

		float[] arrf = { (float)12.45, (float)34.76, (float)889.345 };
		objRoot.addSCOORDNode("SCOORD", "345345", "SRT", arrf, EnumGraphicType.CIRCLE, EnumRelationshipType.SELECTED_FROM);

		String[] stra = { "20020510043457", "20020510043457", "20020510043457" };
		int[] larr = { 6, 7, 8 };
		String[] strb = { "12", "12", "21" };
		objRoot.addTCOORDNode("TCOORD", "67567", "DCM", stra, larr, strb, EnumTemporalRangeType.BEGIN, EnumRelationshipType.HAS_PROPERTIES);

		String[] arrst = { "12", "12" };
		short shBitsAllocated = 34;
		ImagePixelMacro objImagePixelMacro = objRoot.addImageNode("IMAGE", "45345", "DCM", "345.456.456.6.6.6", "35.5.5.5", arrst, "234.45.345", "5675.567.67567", EnumRelationshipType.CONTAINS);
		objImagePixelMacro.setBitsAllocated(shBitsAllocated);
		return objSpectaclePrescriptionReportIOD;
	}
}
