Patient Ids vs Logical Identifiers

I have two systems - a PAS and a CLINICALS system. I have my patient - with an external MRN, or URNO of 123456. In the PAS, we create an internal number for the patient - which is a GUID (GuidA), in the clinicals, we create a patient, through old school HL7 and an internal number is created for that patient’s clinical data - another GUID (GuidB).

Being nice FHIR systems, I expose /Patient/GuidA on the PAS, and /Patient/GuidB on the clinicals. Inside both FHIR resources I see information relating to their URNO through the logical identifier for the patient. If I am within a mobile app that needs to get some appointment data for the patient - from the pas, and some test results from the clinical system - how do i best do that.

If I say - Appointment/GuidA - that is fine, but DiagnosticReport?subject=GuidA is not going to work becuase the GuidA is on the pas, and not the clinicals. I could say - Appointment?patient.identifier=123456, and DiagnosticReport?patient.identifier=123456

How have others solved this problem, as I don’t think it is a new one.

Have you looked at chaining?
DiagnosticReport?subject.identifier=http://somewhere.org/fhir/NamingSystem/urno|12345

That should work if the URNO is known by both systems. And of course the Identifier.system value would probably be different.