--- alias: meddev-feature-materialdefectprotocolinstance render_macros: false --- # Material Defect and Protocol Instance Association ## Overview Material Defects can be linked to Protocol Instances to connect a defect with its investigation or exception-management process. The association can be made when recording the defect or afterwards through **Manage Protocol**. A defect can use a new Protocol Instance or an existing open instance of the selected Protocol. When a Protocol Instance is associated, the defect cannot be _closed_ until that instance is closed. This means actions that close the Defect become restricted. Pressing **Mark as False**, **Mark as Accepted**, **Mark as not Fixable** and **Repair** cannot be executed. MES will show an error message if the user attempts them. ## Prerequisites - A Defect Reason is associated with the Material's current Step. - A Protocol is available for the investigation. - The user has permission to perform the relevant defect and Protocol Instance operations. Updating or removing an existing association requires the appropriate permissions. ## Associating a Protocol when recording a defect 1. Go to **Business Data > Material**, search for the Material and open it. 2. Select **Views > Defects**. 3. Select **Record > Record Using no Drawing** to open **Record Material Defects**. 4. Use the **+** icon to add a defect and select its **Reason**. Complete any other applicable defect details. 5. Select a **Protocol**. 6. Choose how to associate the **Protocol Instance**, as described in the following table. 7. Select **Record** to save the defect and its association. | Selection | Result | |---|---| | Leave both Protocol fields empty | The defect is recorded without a Protocol Instance association. A Protocol can be associated later. | | Select a Protocol and leave Protocol Instance empty | MES creates a new instance of the selected Protocol and associates the defect and Material with it. The instance context is automatically populated from the Material. | | Select a Protocol and an existing Protocol Instance | MES associates the defect with the selected instance and adds the Material to it. The existing instance context is not updated. Note that after the Protocol is first selected, only instances from that Protocol definition can be selected. | ## Viewing the association Select the defect in the Material's **Defects** view. The **Defect Details** section displays the associated **Protocol Instance** as a link. Right-click the instance name and select **Open in New Page** to open the instance in another MES tab while keeping the Material page available. ![Material Defects view showing the linked Protocol Instance and Manage Protocol ribbon action](features.images/material_defect_protocol_details.png) ## Managing the association after recording !!! note The user must be assigned to the `MedDev.MaterialDefect.ManageProtocol` functionality to have access to the **Manage Protocol** wizard. 1. Open the Material's **Defects** view and select the defect. 2. Select **Manage Protocol** in the ribbon. 3. Review the **Protocol** and **Protocol Instance** fields. If an association already exists, the wizard displays the current values. 4. To add an association, select a Protocol and either select an open instance or leave the instance empty to create a new one (check selection scenarios in the "_Associating a Protocol when recording a defect_" section above). 5. To replace or remove an existing association, change or clear the selection. 6. Select **Update** to apply the change. ![Manage Protocol wizard displaying the current Protocol and Protocol Instance](features.images/material_defect_manage_protocol.png) Updating or removing an existing association is permission-controlled. Users without the required permissions cannot change or remove the current Protocol or Protocol Instance. When a permitted change replaces or removes an association, the Material is removed from the old instance and added to the new one, if applicable. ## Closing the Protocol Instance and completing the defect Complete and close the Protocol Instance before performing the appropriate defect closure operation. ### Example workflow 1. From **Defect Details**, right-click the **Protocol Instance** link and select **Open in New Page**. 2. On the Protocol Instance page, perform the necessary actions and then **Close** it. 3. Return to the Material's **Defects** view. Refresh if needed and select the original defect. 4. Select **Mark as Accepted**, enter a **Closing Remark** if applicable, and confirm. 5. Verify that the defect state is **Accepted** and that **Additional Information** includes a **Close Date**. ![Defect marked Accepted with its Close Date after closing the associated Protocol Instance](features.images/material_defect_protocol_accepted.png)