Class StudyRootQueryInformationModel

java.lang.Object
com.pixelmed.query.QueryInformationModel
com.pixelmed.query.StudyRootQueryInformationModel

public class StudyRootQueryInformationModel extends QueryInformationModel

The StudyRootQueryInformationModel supports query and retrieval using the DICOM Study Root information model.

Specifically, all patient attributes are included at the level of the study, and below the study level are series and instance (image) levels.

For example, an application might instantiate a StudyRootQueryInformationModel, and then actually perform a query (with debugging messages on) using a list of attributes as follows:

        final QueryInformationModel model = new StudyRootQueryInformationModel("remotehost",104,"THEIRAET","OURAET",1);
        final QueryTreeModel tree = model.performHierarchicalQuery(identifier);
        System.err.println("Tree="+tree);
 

The attribute list supplied must contain both matching and response keys. By way of example, one could construct an identifier for a query of all the instances for a particular patient named "Smith^Mary" as follows

        AttributeList identifier = new AttributeList();
        { AttributeTag t = TagFromName.PatientName; Attribute a = new PersonNameAttribute(t,specificCharacterSet); a.addValue("Smith^Mary"); filter.put(t,a); }
        { AttributeTag t = TagFromName.PatientID; Attribute a = new ShortStringAttribute(t,specificCharacterSet); filter.put(t,a); }
        { AttributeTag t = TagFromName.PatientBirthDate; Attribute a = new DateAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.PatientSex; Attribute a = new CodeStringAttribute(t); filter.put(t,a); }

        { AttributeTag t = TagFromName.StudyID; Attribute a = new ShortStringAttribute(t,specificCharacterSet); filter.put(t,a); }
        { AttributeTag t = TagFromName.StudyDescription; Attribute a = new LongStringAttribute(t,specificCharacterSet); filter.put(t,a); }
        { AttributeTag t = TagFromName.ModalitiesInStudy; Attribute a = new CodeStringAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.StudyDate; Attribute a = new DateAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.StudyTime; Attribute a = new TimeAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.PatientAge; Attribute a = new AgeStringAttribute(t); filter.put(t,a); }

        { AttributeTag t = TagFromName.SeriesDescription; Attribute a = new LongStringAttribute(t,specificCharacterSet); filter.put(t,a); }
        { AttributeTag t = TagFromName.SeriesNumber; Attribute a = new IntegerStringAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.Modality; Attribute a = new CodeStringAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.SeriesDate; Attribute a = new DateAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.SeriesTime; Attribute a = new TimeAttribute(t); filter.put(t,a); }

        { AttributeTag t = TagFromName.InstanceNumber; Attribute a = new IntegerStringAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.ContentDate; Attribute a = new DateAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.ContentTime; Attribute a = new TimeAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.ImageType; Attribute a = new CodeStringAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.NumberOfFrames; Attribute a = new IntegerStringAttribute(t); filter.put(t,a); }

        { AttributeTag t = TagFromName.StudyInstanceUID; Attribute a = new UniqueIdentifierAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.SeriesInstanceUID; Attribute a = new UniqueIdentifierAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.SOPInstanceUID; Attribute a = new UniqueIdentifierAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.SOPClassUID; Attribute a = new UniqueIdentifierAttribute(t); filter.put(t,a); }
        { AttributeTag t = TagFromName.SpecificCharacterSet; Attribute a = new CodeStringAttribute(t); filter.put(t,a); a.addValue("ISO_IR 100"); }
 

The resulting tree will contain all the returned information at the study, series and instance (image) returned which match a PatientName of "Smith^Mary". If one wanted to filer the list of studies and series returned by a Modality of CT, then one could instead have created an identifier containing:

        { AttributeTag t = TagFromName.ModalitiesInStudy; Attribute a = new CodeStringAttribute(t); a.addValue("CT"); filter.put(t,a); }
        { AttributeTag t = TagFromName.Modality; Attribute a = new CodeStringAttribute(t); a.addValue("CT"); filter.put(t,a); }
 

Note that since ModalitiesInStudy is an optional matching key in DICOM, not all SCPs will support it, so one should also filter at the series level with Modality. In those cases "empty" study responses will be included when the study matches but there are no modality-specific series.

Note also that no "client side" filtering is performed ... that is the values for matching keys will be sent to the SCP, but if the SCP doesn't match on them and returns responses anyway, this class does not filter out those responses before returning them to the user (including them in the returned tree).

In a real application, the FilterPanel class can be used to provide a user interface for editing the values in the request identifier attribute list.

See Also: