hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2k stars 1.31k forks source link

[Bug] HAPI RuleBuilder ignoring filter on second matching permissions #3915

Open JasonRoberts-smile opened 2 years ago

JasonRoberts-smile commented 2 years ago

Issue

Currently, the RuleBuilder is ignoring filters on matching permissions.

Eg. FHIR_READ_ALL_IN_COMPARTMENT/Patient/lob1patient?code=foo and FHIR_READ_ALL_IN_COMPARTMENT/Patient/lob2patient?code=bar get merged into one and RuleBuilder just ignores the second filter.

Use Case

For multi-lob we need redaction to happen per lob i.e. filter should work for multiple permissions.

fil512 commented 2 years ago

See https://github.com/hapifhir/hapi-fhir/pull/3916