Package ca.uhn.fhir.jpa.interceptor
Class PatientCompartmentEnforcingInterceptor
java.lang.Object
ca.uhn.fhir.jpa.interceptor.PatientCompartmentEnforcingInterceptor
This interceptor can be used to block resource updates which would make resource patient compartment change.
This could be used when the JPA server has partitioning enabled, and Tenant Identification Strategy is PATIENT_ID.
-
Constructor Summary
ConstructorDescriptionPatientCompartmentEnforcingInterceptor
(ca.uhn.fhir.context.FhirContext theFhirContext, ISearchParamExtractor theSearchParamExtractor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
storagePreStorageResourceUpdated
(org.hl7.fhir.instance.model.api.IBaseResource theOldResource, org.hl7.fhir.instance.model.api.IBaseResource theResource) Blocks resource updates which would make the resource change Patient Compartment.
-
Constructor Details
-
PatientCompartmentEnforcingInterceptor
public PatientCompartmentEnforcingInterceptor(ca.uhn.fhir.context.FhirContext theFhirContext, ISearchParamExtractor theSearchParamExtractor)
-
-
Method Details
-
storagePreStorageResourceUpdated
public void storagePreStorageResourceUpdated(org.hl7.fhir.instance.model.api.IBaseResource theOldResource, org.hl7.fhir.instance.model.api.IBaseResource theResource) Blocks resource updates which would make the resource change Patient Compartment.- Parameters:
theOldResource
- the original resource statetheResource
- the updated resource state
-