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
- Limiting user access to cases. For example, a filter can be applied to a user account to restrict a user to only see cases for which their name is listed as the referring physician in the DICOM data. This may be useful for creating accounts to give to clinicians, so that they may only view their own patients. Examples of how to apply filters to limit users' access to studies are provided here.
- Determining which studies will be pre-fetched by the OnePacs workstation software
- Determining which studies will be automatically placed into study folders as they arrive to OnePacs
- Quickly finding a case on the worklist
- Setting up which cases will send out case notifications
- Setting up which cases will be automatically assigned to interpreting physicians.
Sample Advanced Filters
Function | Filter string | Notes |
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 letters | referringPhysicianName 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 case | referringPhysicianName 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 minors | patientAge < '18y' | |
Patient DOB is empty | ( patientBirthDate is null or patientBirthDate = '' ) |
Keywords available for use in filters
Level | Keyword | Description | Type | DICOM Tag | Notes |
patient | patientName | Patient Name in DICOM format. | string | (0010,0010) | |
- | patientId | Patient Id | string | (0010,0020) | |
- | patientBirthDate | Patient Birth Date | string | (0010,0030) | |
- | patientSex | Patient Sex | string | (0010,0040) | |
study | accessionNumber | Study accession number | string | (0008,0050) | |
- | facilityPk | Identifier for the OnePacs facility the study was stored to | integer | N/A | |
- | studyIuid | Study Uid | string | (0020,000D) | |
- | referringPhysicianName | Referring physician name in DICOM format. | string | (0008,0090) | |
- | physicianNames | Referring physician name AND ordering physician name | string | (0008,0090) | plus the ordering physician specified during the confirmation process |
- | studyDescription | Study Description | string | (0008,1030) | |
- | bodyPartsInStudy | Body Parts | string | (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. |
- | studyId | Study Id | string | (0020,0010) | |
- | studyDateTime | Study Performed Date | date | (0008,0020) | |
- | normalizedStudyDateTime | Study Performed Date | date | (0008,0020) | Normalized to user's time zone |
- | createdTime | Time the study was sent to OnePacs. | date | N/A | |
- | receivedTime | Time the study was recieved by OnePacs. | date | N/A | |
- | confirmationTime | The time the study was confirmed in OnePacs. | date | N/A | |
- | modalitiesInStudy | List of all modalities in the study separated by a slash (”/”) | string | (0008,0060) | |
- | studyStatusId | Study State | string | N/A | Enumerated values of IN_TRANSMIT, READY_TO_READ, ASSIGNED, READ, DISREGARD, FOR_COMPARISON, DICTATED, TRANSCRIBED |
- | numberOfStudyRelatedInstances | Number of instances in the study | string | (0020,1208) | |
- | numberOfStudyRelatedSeries | Number of series in the study | number | (0020,1206) | |
- | patientAge | The age of the patient at time of study in years | string | (0010,1010) | May be calculated from DOB and study date. Ex: 17y |
- | patientInstitutionResidence | The patient's institution residence at the time of study | string | (0038,0400) | |
- | assignedToUser | The username that the study is presently assigned to | string | N/A | May be null if unassigned |
- | uploadedBy | The OnePacs user id that manually updated the study | string | N/A | May be null the study was not manually uploaded via the web interface. |
- | institutionName | Institution name from DICOM header | string | (0008,0080) | Hint: Consider using Source AE to filter by Gateway |
- | statStatus | The stat status of the study. | string | N/A | Enumerated values of STAT, SUPER_STAT (critical). To search for non-routine cases use "statStatus is not null" |
- | deadlineTIme | The deadline time of the study. | date | N/A | Study target/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 target / deadline time. |
- | warnTIme | The warning/target time of the study. | date | N/A | |
- | sizeOnDisk | The size of the study in bytes | number | N/A | A sum of all the DICOM images in the study in present transfer syntax. Does not include further reduction from zipping. Includes duplicates. |
- | hasAddenda | The study has a clinical addenda | boolean | N/A | |
- | requiresResultsReporting | The study requires results reporting | boolean | N/A | |
- | studyConfirmation | Whether or not the study has been confirmed for interpretation in OnePacs | integer | N/A | (studyConfirmation is null) will be TRUE when the study has not been confirmed (studyConfirmation is not null) will be TRUE when the study has been confirmed |
- | flagStatus | Whether or not certain flags are set for the study | enum | N/A | Values include NONE, RED, BLUE, RED_BLUE, GREEN, RED_GREEN, BLUE_GREEN, RED_BLUE_GREEN Example to identify studies with green flags: flagState in ('GREEN', 'BLUE_GREEN', 'RED_GREEN', 'RED_BLUE_GREEN') |
series | bodyPartExamined | Body Part | string | (0018,0015) | Use the study level bodyPartsInStudy unless explicitly trying to exclude individual series in study retriever queries. |
- | modality | Modality | string | (0008,0060) | |
- | seriesIuid | Series Uid | string | (0020,000E) | |
- | numberOfSeriesRelatedInstances | Number of series instances | number | (0020,1209) | |
- | laterality | Laterality | string | (0020,0060) | |
- | stationName | Station Name | string | (0008,1010) | |
- | institutionalDepartmentName | Department Name | string | (0008,1040) | |
- | seriesSize | The size of the series in bytes | integer | N/A | A sum of all the DICOM images in the series in present transfer syntax. Does not include further reduction from zipping. Includes duplicates. |
facility | facilityName | The name of the source facility. | string | N/A | |
- | facilityState | The State code of the source facility. | string | N/A | |
- | facilityId | The ID of the study's facility. | string | N/A | |
report | reportCompletedTime | The time the primary report was completed. | date | N/A | |
- | primaryReportReadType | The read type of the primary report | string | N/A | Enumerated values of PRELIMINARY, FINAL, OTHER |
Logical operators available for use in filters
Comparison | Character |
Equal | = |
Not Equal | <> or != |
Less Than | < |
Less Than Or Equal | ⇐ |
Greater Than | > |
Greater Than Or Equal | >= |
contains ABCD | like ‘%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 | () |
And | and |
Or | or |
null | is null |
not null | is not null |
Functions available for use in filters
Function | Purpose | Usage example |
property in (list) | Property value is included in a list of values | callingAETitle in ('A', ‘B', C’) |
property not in (list) | Property value is not included in a list of values | callingAETitle 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 ET | timeOfDay(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.