Hello @Yulia K and @Ksenia F,
This problem was occurring because when the patient is at a location their coordinates become relative to the objects location rather than to the model.
For example, here are the coordinates for the reception desk.

Here are the coordinates for the patient at the desk.

So the code in the visual tool Heat Map On Message Trigger needs to be altered. The line that sets the position needs to be.
Vec3 pos = fromObject.getLocation(0.5, 0.5, 0.0).project(fromObject.up, model());
Here is the updated model for you to reference.
HC Agent proximity system statistics and heat map.fsm