←Select platform

GetDicomDataSets(string,string,string,string) Method

Summary

Retrieves a list of DicomDataSet that matches the specified PatientID, StudyInstanceUID, SeriesInstanceUID, and SOPInstanceUID from the storage source.

Syntax
C#
C++/CLI
public List<DicomDataSet> GetDicomDataSets( 
   string patientId, 
   string studyInstanceUid, 
   string seriesInstanceUid, 
   string sopInstanceUid 
) 
public:  
   List<DicomDataSet^>^ GetDicomDataSets( 
      String^ patientId, 
      String^ studyInstanceUid, 
      String^ seriesInstanceUid, 
      String^ sopInstanceUid 
   ) 

Parameters

patientId

The PatientID of the DicomDataSet to be retrieved. This value can be an empty string.

studyInstanceUid

The StudyInstanceUID of the DicomDataSet to be retrieved. This value can be an empty string.

seriesInstanceUid

The SeriesInstanceUID of the DicomDataSet to be retrieved. This value can be an empty string.

sopInstanceUid

The SOPInstanceUID of the DicomDataSet to be retrieved. This value can be an empty string.

Return Value

A List of DicomDataSet that contains the specified patientId, studyInstanceUid, seriesInstanceUid, and sopInstanceUid.

If no such DicomDataSet exists, an empty List is returned.

Remarks

The returned List of DicomDataSet must match all of the specified parameters. However, any of the parameters can be an empty string, which is equivalent to a wild card.

For example, to retrieve all DicomDataSet for a particular patient, do the following:

List<DicomDataSet> dsList; 
string patientId = "12341234"; 
dsList = agent.GetDicomDataSets(patientId, string.Empty, string.Empty, string.Empty); 
Example
C#
using Leadtools.Dicom; 
using Leadtools.DicomDemos; 
using Leadtools.Medical.DataAccessLayer; 
using Leadtools.Medical.DataAccessLayer.Catalog; 
using Leadtools.Medical.Storage.DataAccessLayer; 
using Leadtools.Medical.Storage.DataAccessLayer.Configuration; 
 
public static IStorageDataAccessAgent5 GetStorageDataAccessAgent5() 
{ 
   // Before running this sample, follow these steps: 
   // 1. Run CSPacsDatabaseConfigurationDemo.exe to create the databases 
   // 2. Run CSPACSConfigDemo.exe to create the DICOM services 
   // 3. Set 'serviceDirectory' to the DICOM service folder 
   string serviceDirectory = @"C:\LEADTOOLS22\Bin\Dotnet4\x64\L22_PACS_SCP64"; 
   string productName = "StorageServer"; 
   string serviceName = "L22_PACS_SCP64"; 
   System.Configuration.Configuration configuration = DicomDemoSettingsManager.GetGlobalPacsAddinsConfiguration(serviceDirectory); 
 
   StorageDataAccessConfigurationView view = new StorageDataAccessConfigurationView(configuration, productName, serviceName); 
   IStorageDataAccessAgent5 agent = DataAccessFactory.GetInstance(view).CreateDataAccessAgent<IStorageDataAccessAgent5>(); 
   return agent; 
} 
 
public static void GetDicomDataSetExample() 
{ 
   IStorageDataAccessAgent5 agent = GetStorageDataAccessAgent5(); 
 
   // The CSPacsDatabaseConfigurationDemo.exe stores the following two images: 
   // PatientID   LastName    FirstName   StudyInstanceUid                             SeriesInstanceUid                                        SopInstanceUid 
   // 12341234    JONES       JR          2.16.840.1.114151.4.862.39853.4041.912374    1.2.392.200036.9107.500.305.5577.557709021107405.121     1.2.392.200036.9107.500.305.5577.20090211.93715.105577 
   //                                                                                                                                           1.2.392.200036.9107.500.305.5577.20090211.93718.105577 
 
   string patientId = "12341234"; 
   string studyInstanceUid = "2.16.840.1.114151.4.862.39853.4041.912374"; 
   string sopInstanceUid1 = "1.2.392.200036.9107.500.305.5577.20090211.93715.105577"; 
   string sopInstanceUid2 = "1.2.392.200036.9107.500.305.5577.20090211.93718.105577"; 
 
   // ********* 
   // Example 1: 
   // Verify that the two instances exists 
   bool exists1 = agent.ExistsDicomDataSet(sopInstanceUid1); 
   bool exists2 = agent.ExistsDicomDataSet(sopInstanceUid2); 
   Debug.Assert(exists1 && exists2); 
 
   // ********* 
   // Example 2: 
   // Get a DicomDataSet from the data source based on SopInstanceUid 
   using (DicomDataSet ds = agent.GetDicomDataSet(sopInstanceUid1)) 
   { 
      string sID = ds.GetValue<string>(DicomTag.SOPInstanceUID, string.Empty); 
      Debug.Assert(sID == sopInstanceUid1); 
   } 
 
   // ********* 
   // Example 3: 
   // Get a DicomDataSet from the data source based on a DataSet 
   // Retrieve all DicomDataSets with PatientID == "12341234" 
   MatchingParameterCollection matchingCollection = new MatchingParameterCollection(); 
   MatchingParameterList matchingList = new MatchingParameterList(); 
   matchingCollection.Add(matchingList); 
   ICatalogEntity patientEntity = RegisteredEntities.GetPatientEntity(patientId); 
   matchingList.Add(patientEntity); 
 
   DataSet result = agent.QueryCompositeInstances(matchingCollection); 
   List<DicomDataSet> dsList = new List<DicomDataSet>(); 
   if (result != null) 
   { 
      dsList = agent.GetDicomDataSets(result); 
 
      // There should be exactly two DicomDataSets 
      Debug.Assert(dsList.Count == 2); 
   } 
 
   // ********* 
   // Example 4: 
   // Retrieve all DicomDataSets from the same StudyInstanceUID -- there will be two 
   dsList.Clear(); 
   dsList = agent.GetDicomDataSets(string.Empty, studyInstanceUid, string.Empty, string.Empty); 
   // There should be exactly two DicomDataSets 
   Debug.Assert(dsList.Count == 2); 
 
   // ********* 
   // Example 5: 
   // Retrieve all DicomDataSets using a MatchingParameterCollection 
   matchingCollection = new MatchingParameterCollection(); 
   matchingList = new MatchingParameterList(); 
   matchingCollection.Add(matchingList); 
   ICatalogEntity instanceEntity = RegisteredEntities.GetInstanceEntity(sopInstanceUid2); 
   matchingList.Add(instanceEntity); 
   dsList = agent.GetDicomDataSets(matchingCollection); 
   // There should be exactly one DicomDataSets 
   Debug.Assert(dsList.Count == 1); 
} 
Requirements

Target Platforms

Help Version 23.0.2024.5.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Medical.Storage.DataAccessLayer Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.