Offhand I don’t know, I have only occasionally glanced at the FHIR module’s codebase. Can you share a bit more details about how I might replicate this?
It seems that the general problem is that when pulling Visit/Encounter via REST API (with both FHIR and REST clients) essential Patient data like Birthdate, names, addresses, etc. are not being retrieved and the error is caused by trying to PUT the Visit/Encounter without these data.
I would expect that FHIR and REST both reference an existing patient when you’re creating or editing a visit/encounter, so you don’t have to have the complete demographics there.
I imagine the following would fail:
GET …/visit on server A
POST this content on server B (and expect this to also create a patient record)