Study Filters

Filters are used in many places in OnePacs for the purpose of selecting studies that meet certain criteria. (They are processed similar to database SQL query strings) Filters are created through a common interface, which appears as follows:


The user has the option of either creating a filter through use of the GUI-based elements at the top portion of the screen, that is, through the selection of Facilities, modalities, study description, date, and other criteria, or though use of the “Advanced Expression” text edit box at the bottom, into which a OnePacs query string can be entered. Additionally, the “Filter string” button at the bottom of the window generates the text value of the filter string generated through use of the GUI elements and allows the user to copy that string

Filters are used for the following purposes in OnePacs

Sample Advanced Filters

 

FunctionFilter stringNotes
Select all series with a workflow status of “Ready to read”, “Assigned”, or “In transmission” to the local workstation, which have completed transmission to OnePacs, which have 900 or fewer images, and which are assigned to the current user. This is the default download filter for the OnePacs Study Retriever.StudyStatusID in ('READY_TO_READ', 'ASSIGNED', 'IN_TRANSMIT') and age(CreatedTime) < '3d') and numberOfSeriesRelatedInstances < '1200' and assignedToUser = '$USER' 
Limit studies to those for whom the DICOM referring physician name field contains SCHWARZ, in all upper case lettersreferringPhysicianName like '%SCHWARZ%'Useful for a user’s access filter, in this case, to limit a referring physician named Schwarz to viewing reports only for patients s/he referred
Limit studies to those for whom the referring physician name field contains “Schwarz”, regardless of upper/lower casereferringPhysicianName contains 'schwarz' 
Study date within the past 3 days (72 hours)age(createdTime) < '3d' 
Select studies from one of three facilities (identified by the Gateway’s AE title)callingAETitle in ('A', ‘B', C’) 
Select studies for minorspatientAge < '18y' 
Patient DOB is empty( patientBirthDate is null or patientBirthDate = '' ) 

 

Keywords available for use in filters

 

LevelKeywordDescriptionType DICOM Tag Notes
patientpatientNamePatient Name in DICOM format.string(0010,0010) 
-patientIdPatient Idstring(0010,0020) 
-patientBirthDatePatient Birth Datestring(0010,0030) 
-patientSexPatient Sexstring(0010,0040) 
studyaccessionNumberStudy accession numberstring(0008,0050) 
-studyIuidStudy Uidstring(0020,000D) 
-referringPhysicianNameReferring physician name in DICOM format.string(0008,0090) 
-physicianNamesReferring physician name AND ordering physician namestring(0008,0090)plus the ordering physician specified during the confirmation process
-studyDescriptionStudy Descriptionstring(0008,1030) 
-bodyPartsInStudyBody Partsstring(0018,0015)An aggregation of the series-level bodyPartExamined.  It is recommend that queries for body part search on this study-level value for most use cases.
-studyIdStudy Idstring(0020,0010) 
-studyDateTimeStudy Performed Datedate(0008,0020) 
-normalizedStudyDateTimeStudy Performed Datedate(0008,0020)Normalized to user's time zone
-createdTimeTime study receiveddateNA
-modalitiesInStudyList of all modalities in the study separated by a slash (”/”)string(0008,0060) 
-studyStatusIdStudy StatestringNAEnumerated values of IN_TRANSMIT, READY_TO_READ, ASSIGNED, READ, DISREGARD, FOR_COMPARISON, DICTATED, TRANSCRIBED
-numberOfStudyRelatedInstancesNumber of instances in the studystring(0020,1208)
-numberOfStudyRelatedSeriesNumber of series in the studynumber(0020,1206)
-patientAge The age of the patient at time of study in yearsstring(0010,1010)May be calculated from DOB and study date.  Ex:  17y
-patientInstitutionResidence The patient's institution residence at the time of studystring(0038,0400) 
-assignedToUser The username that the study is presently assigned tostringNAMay be null if unassigned
-uploadedByThe username that manually updated the studystringNAMay be null if unassigned
-institutionNameInstitution from DICOM headerstring(0008,0080)Hint: Consider using Source AE to filter by Gateway
-statStatusThe stat status of the study.stringNAEnumerated values of STAT, SUPER_STAT (critical).  To search for non-routine cases use "statStatus is not null"
-deadlineTImeThe deadline time of the study.stringNAStudy warning/deadline times are configured at the facility level based on priority designation, turn-around-time configuration, and the received/confirmation time of the study.  Only unreported studies requiring interpretation will have a warning / deadline time.
-warnTImeThe warning time of the studydateNA
-sizeOnDiskThe size of the study in bytesnumberNAA sum of all the DICOM images in the study in present transfer syntax.  Does not include further reduction from zipping. Includes duplicates.
hasAddendaThe study has a clinical addendabooleanNA 
-requiresResultsReportingThe study requires results reportingbooleanNA 
seriesbodyPartExaminedBody Partstring(0018,0015)Use the study level bodyPartsInStudy unless explicitly trying to exclude individual series in study retriever queries.
-modalityModalitystring(0008,0060) 
-seriesIuidSeries Uidstring(0020,000E) 
-numberOfSeriesRelatedInstancesNumber of series instancesnumber(0020,1209) 
-lateralityLateralitystring(0020,0060) 
-stationNameStation Namestring(0008,1010) 
-institutionalDepartmentNameDepartment Namestring(0008,1040) 
-seriesSizeThe size of the series in bytesnumberNAA sum of all the DICOM images in the series in present transfer syntax.  Does not include further reduction from zipping.  Includes duplicates.
facilityfacilityNameThe name of the source facility.stringNA 
-facilityStateThe State code of the source facility. stringNA 
-facilityIdThe ID of the study's facility.stringNA 
-callingAETitleThe AE title of the source facility.stringNA 
reportreportCompletedTimeThe time the primary report was completed.dateNA 
-primaryReportReadTypeThe read type of the primary reportstringNAEnumerated values of PRELIMINARY, FINAL, OTHER

 

Logical operators available for use in filters

 

ComparisonCharacter
Equal=
Not Equal<> or !=
Less Than<
Less Than Or Equal
Greater Than>
Greater Than Or Equal>=
contains ABCDlike ‘%ABCD%’(note the single quotes)
contains Abcd (case insensitive)contains ‘ABCD
starts with Abcd (case insensitive)startswith ‘ABCD
ends with Abcd (case insensitive)endswith ‘ABCD
not contains Abcd (case insensitive)not contains ‘ABCD
not starts with Abcd (case insensitive)not startswith ‘ABCD
not ends with Abcd (case insensitive)not endswith ‘ABCD
Wildcard%
Comparison Grouping()
Andand
Oror
nullis null
not nullis not null

 

Functions available for use in filters

 

FunctionPurposeUsage example
property in (list)Property value is included in a list of valuescallingAETitle in ('A', ‘B', C’)
property not in (list)Property value is not included in a list of valuescallingAETitle not in ('A', ‘B', C’)
upper(property)Convert property value to all uppercase (for the purpose of making case-insensitive comparisons)upper(studyDescription) = ‘ABCD’
age(property)Returns the amount of time that has elapsed since a given time interval ('3d' for 3 days, '2h' for 2 hours, '10m' for 10 minutes, etc)age(CreatedTime) < '3d' to yield studies less than 72 hours old
timeOfDay(property)Returns the time of day for a temporal propery name in format HH:MM [(timezone)].  Timezone is optional, defaults to ETtimeOfDay(createdTime) >= '9:00 (EST)'  to filter by studies created after 9am EST
dayOfWeek(property)Returns the day of week 1-7 [(timezone)] where 1=Monday, 7=Sunday.  Timezone is optional, defaults to ET
dayOfWeek(createdTime) <= '5(EST)' to filter on cases created Monday - Friday

 

Using filters to limit users' access to studies

Examples of how to apply filters to limit users' access to studies are provided here.