--- alias: meddev-feature-protocolinstancefilters render_macros: false --- # Protocol Instances Page: Context Filters ## Overview The standard **Protocol Instances** page only allows filtering Protocol Instances by properties of the instance itself or of its parent Protocol. This feature provides an enhanced **Protocol Instances** page that also allows filtering by the **context** of the Protocol Instance, namely its associated Material, Product, Step, Facility, Flow, Resource and Production Order. This makes it easier to find all the Protocol Instances related to the same issue, for example all the instances raised for a Production Order or for the Materials processed on a given Resource. ### Concept - The enhanced page (`MedDevProtocolInstancesView`) is a **clone** of the standard Protocol Instances page, extended with the new filters. The standard page is kept unchanged and remains available. - The new filters work **cumulatively** with each other and with the existing filters: a Protocol Instance is only shown if it matches all the filters applied. - A global Configuration entry defines which page is opened by **Quality > Protocol Instances**. --- ## Setting up the Protocol Instances page ### Select the page opened from the Quality menu Enable the enhanced page through the following Configuration entry: | Property | Value | |---|---| | **Entry** | `/MedDev/ProtocolInstanceFilters/Enable` | | **Type** | Boolean | | **Default value** | `False` | - `False` - **Quality > Protocol Instances** opens the standard page (`ProtocolInstancesView`). - `True` - **Quality > Protocol Instances** opens the enhanced page (`MedDevProtocolInstancesView`). !!! note The configuration is evaluated each time the page is opened, so the change takes effect the next time the user opens **Protocol Instances**. --- ## Using the filters The page shows the following filters: | Location | Filters | |---|---| | **Filter bar** | Scope, Protocol, Material, Protocol Instance (search by name) | | **Filters panel** (collapsible, on the right side of the page) | Facility, Resource, Product, Flow, Step, Production Order, Protocol Type, Creation Date From, Creation Date Until | | **Advanced filter** button | Additional filters on properties of the Protocol Instance and of its Protocol, as in the standard page | The filter bar also provides the shortcut filters **All** (default) and **My Protocols**. ### Filter descriptions | Filter | Shows Protocol Instances... | |---|---| | **Scope** | with the selected Protocol Scope. | | **Protocol** | of the selected Protocol. | | **Material** | associated with the selected Material, including instances that also have other Materials. | | **Protocol Instance** | whose name matches the text entered. | | **Facility** | whose context has the selected Facility. | | **Resource** | whose context has the selected Resource. | | **Product** | whose context has the selected Product. | | **Flow** | whose context has the selected Flow. | | **Step** | whose context has the selected Step. | | **Production Order** | whose context has the selected Production Order. See [Protocol Instance Production Order Association](protocolinstanceproductionorder.md). | | **Protocol Type** | of a Protocol with the selected Type. | | **Creation Date From / Until** | created within the selected period. | The grid shows the same columns as the standard page: Protocol Instance, Description, Protocol, Scope, Current State, Role, Created On, Modified On, Modified By and System State. In the example above, the **Production Order** is applied, meaning only Protocol Instances associated with the selected **Production Order's Materials** are shown. ![New Protocol Instances Page](features.images/new_protocol_instances_page.png) ### Combining filters All filters are combined: the more filters applied, the narrower the list. Consider the following Protocol Instances: | Instance | Materials | Step | Production Order | Created on | |---|---|---|---|---| | A | Material 1 | | 1234 | | | B | Material 1 | S | 1234 | 20/12/2025 | | C | Material 1 | S | 1234 | 10/01/2026 | | D | Material 1 | | 1234 | | | E | Material 2 | | | | | F | Material 2 | | | | | G | Material 1 and Material 2 | S | | | | Filters applied | Instances shown | |---|---| | Material = Material 1 | A, B, C, D, G | | Material = Material 1, Step = S | B, C, G | | Material = Material 1, Step = S, Production Order = 1234 | B, C | | Material = Material 1, Step = S, Production Order = 1234, Creation Date Until = 01/01/2026 | B | To remove a filter, clear its value. The list is updated and the remaining filters stay applied. The **Clear All** button of the **Filters** panel clears all the filters of the panel. !!! note A Protocol Instance without a value in the filtered context field is not shown. For example, filtering by Production Order 1234 does not show instances without a Production Order, including those opened with Materials from different Production Orders, which are not associated with any Production Order. !!! note If no Protocol Instance matches the filters, an empty list is shown. --- ## Administration ### Configuration Entry: `/MedDev/ProtocolInstanceFilters/Enable` Boolean entry, created with the value `False` if it does not exist. Defines which Protocol Instances page is opened from the **Quality** menu. See [Select the page opened from the Quality menu](#select-the-page-opened-from-the-quality-menu). ### UI Page: `MedDevProtocolInstancesView` Enhanced Protocol Instances page, opened from **Quality > Protocol Instances** when the Configuration entry is `True`. It is available through the `quality/medDevProtocolInstancesView` route and requires the same functionality as the standard page (`Quality.ProtocolInstances`).