Hi,
I am using Hapi-Fhir version 5.3.0-SNAPSHOT.
1.I have enforced multiple patient compartment(patient/ABC, Patient/DEF) in search narrowing interceptor by using AuthorizedList as -
return new AuthorizedList()
.addCompartments("Patient/ABC","Patient/DEF");
This part works fine.
2.In similar fashion, I want Authorization Interceptor to enforce multiple patient compartment(Patient/ABC, Patient/DEF). My code looks like
return new RuleBuilder()
.allow().read().allResources().inCompartment("Patient", new IdType("Patient", "ABC")).andThen()
.allow().read().allResources().inCompartment("Patient",new IdType("Patient", "DEF")).andThen()
.build();
This part throws error - Access denied by default policy (no applicable rules)
My expectation is to get all Encounter resources belonging to both Patient(Patient/ABC, Patient/DEF) compartments.
What am i missing here ? How to make rules in Authorization Interceptor to access multiple compartments results at same time ?