Fix encounter location to provide facility data
commitad8c89a70b49bb7a98ad96fe4a5e4df007a0b820
authorStephen Nielson <snielson@discoverandchange.com>
Fri, 21 Apr 2023 15:49:52 +0000 (21 11:49 -0400)
committerStephen Nielson <snielson@discoverandchange.com>
Fri, 21 Apr 2023 15:49:52 +0000 (21 11:49 -0400)
tree57d751baf0ced34cd0caffdc9693e034defd10e4
parentdd7e4da35c346ce9c3416fae968549ea3e8964e3
Fix encounter location to provide facility data

The facility data was being excluded in a patient bound context.  If the
access token is bound to a patient context it will return the patient
location data when requesting a specific facility location id.  This was
due to the OR clause in the patient bound search.

Fixed up the search query binding so patient's get their own data or
the facility data but it still prevents access to other patient data.
src/Services/FHIR/FhirLocationService.php