I have been involved in a few efforts to achieve what you are wanting to do. There are lots of pieces involved in keeping something like that afloat.
Basically these kinds of needs are/can be met with a digital twin. Autodesk offers Tandem as their Digital twin platform (https://intandem.autodesk.com/) but you really need to do a deep dive to make sure your systems/procedures would be built to handle something like that.
If you are looking for a more straightforward application to your needs, the simplest solution is just to have your P&IDs loaded into a system that allows them to be text searchable and use the code reader to get the search string text. Then just search the drawings. This will lead to multiple hits but it's probably the quickest way to get close to what you want.
Do you know how the QR codes are generated and maintained? Are they using a particular system to create and generate the codes? Is it maintenance, reliability, Engineering, or site document control/ some one else that is providing the QR codes. Frequently if systems are in place to generate the codes, you can link to DWGs in those records. This would save you some of the time and effort if you could piggyback on another system.
CADnoob
