When a patient is edited on the laptop that patient is marked as changed.
This is so simple... :) why didn't I think of it before. I just keep a log of "changed" patients on both machines and simply replace the old patients if there is no conflict or use a simple conflict solver for the patients that changed on both machines.
I'll just drop the idea of "external" reference for clinical episodes or transactions and simply keep everything inside the patient data.