This is due to the way some healthcare providers work.
Usually your data will only be requested (just before) you come for your appointment. But sometimes also a few days earlier. This depends on the way your healthcare provider(s) works.
If you visit your pharmacy, after-hours medical centre or acting GP, they will request your details (just) before your appointment. You (usually) come either unexpectedly or with a recently made appointment. But if appointments have been made longer in advance, your healthcare provider may choose to requests your data at an earlier time. For example as soon as daily schedules have been set.
Another example: for a visit to a specialist or hospital, you usually make an appointment long in advance. Hospitals are also much larger and therefore see a lot more patients. That is why data in hospitals is usually requested as soon as the schedule for the coming day(s) has been made final. If that schedule is forwarded to the department during the night, your data will also be requested at night.