Authorization Check Against the Department Attribute
The authorization check happens against the department attribute of an Organization. If the user is assigned to the department of an Organization, then the user is authorized to perform RESTful interactions on the resources in that department.
The following example depicts the authorization on the department level:

In a hospital, there are multiple business users, for example, Admission Representative, Practitioner, and Nurse that can interact with the application based on the institution assignment.
The business user A is assigned to the department A, so the business user A is authorized to perform RESTful interactions on the Patient P and Encounter E resources in the department A. The Patient P refers to the Organization using the attribute managingOrganization and Encounter E refers to the Organization using the serviceProvider attribute. The business user A is not assigned to the department B, so the business user A is not authorized to perform RESTful interactions on the Patient C and Encounter D resources in the department B.
The business user B is assigned to the department B, so the business user B is authorized to perform RESTful interactions on the Patient C and Encounter D resources in the department B. The Patient C refers to the Organization using the attribute managingOrganization and Encounter D refers to the Organization using the serviceProvider attribute. The business user B is not assigned to the department A, so the business user B is not authorized to perform RESTful interactions on the Patient P and Encounter E resources in the department A.