Querying Patient Information by Modality
It is possible to query for Patient Information using a DICOM C-FIND operation with Modality as a filter, in order to find all patients who have ever had a series with a particular modality. This can be done by a STUDY root STUDY level C-FIND query. A DoRawQuery(QueryDataSet) method in COM version of DicomObjects or Find(QueryDataSet) method in .NET version is required with (0008,0061) being explicitly added as a modality to search for.
Note that you may only specify one modality in the filter (asking for all studies which include this modality), but you may get multiple values back in this field (all the modalities in the study). Also, if a patient has multiple studies which match the modality then you will get one result for each study which includes that modality.
Some sample vb 6 code to start with:
Dim Query As New DicomQuery Dim QueryDataSet As New DicomDataSet Dim QueryResults As DicomDataSets Query.Node = "localhost" Query.Port = 104 Query.callingAE = "SCU" Query.calledAE = "SCP" Query.Root = "STUDY" Query.Level = "STUDY" Query.PatientID = "1234" QueryDataSet.Attributes.Add &H0008, &H0061, "PS" QueryResults = Query.DoRawQuery(QueryDataSet)