ABAC, because the decision depends on attributes of the user, the resource and the environment
ABAC (attribute-based access control) fits best. It checks attributes in a policy, such as user.department, record.department and the current time. This matches the rule directly.
"RBAC, by giving all doctors a viewRecords role" is wrong. RBAC is role-based access control. A doctor role can't express department matching or time of day. You would need a huge number of roles, like cardiology-doctor-on-shift.
Read more