Package ca.cdr.api.consent
Class ConsentLookupContext
java.lang.Object
ca.cdr.api.consent.ConsentLookupContext
Represents the relevant context information to run Consent resource derived consent logic.
This is also used as a cache-key for reusing consent for the given Patient compartment within a single request.
-
Constructor Summary
ConstructorsConstructorDescriptionConsentLookupContext
(ConsentEvaluationEventType theConsentEvaluationEventType, IdDt theClinicalPatientId) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
boolean
Whether theConsentFetchQueries
from theCdrPointcut.CONSENT_FETCH_QUERIES
pointcut and theConsentActiveResourceResolutionRequest
from theCdrPointcut.CONSENT_ACTIVE_CONSENT_RESOURCES_RESOLVE
pointcut should be cached if the clinical patient id and theConsentEvaluationEventType
are the same for multiple resources in a given request.void
setCacheable
(boolean theCacheable) By default, theConsentFetchQueries
from theCdrPointcut.CONSENT_FETCH_QUERIES
pointcut and theConsentActiveResourceResolutionRequest
from theCdrPointcut.CONSENT_ACTIVE_CONSENT_RESOURCES_RESOLVE
pointcut will be cached if the clinical patient id and theConsentEvaluationEventType
are the same for multiple resources in a given request.
-
Constructor Details
-
ConsentLookupContext
public ConsentLookupContext(@Nonnull ConsentEvaluationEventType theConsentEvaluationEventType, @Nullable IdDt theClinicalPatientId)
-
-
Method Details
-
getClinicalPatientId
-
getConsentEvaluationEventType
-
isCacheable
Whether theConsentFetchQueries
from theCdrPointcut.CONSENT_FETCH_QUERIES
pointcut and theConsentActiveResourceResolutionRequest
from theCdrPointcut.CONSENT_ACTIVE_CONSENT_RESOURCES_RESOLVE
pointcut should be cached if the clinical patient id and theConsentEvaluationEventType
are the same for multiple resources in a given request.- Returns:
- true if caching should be used
-
setCacheable
By default, theConsentFetchQueries
from theCdrPointcut.CONSENT_FETCH_QUERIES
pointcut and theConsentActiveResourceResolutionRequest
from theCdrPointcut.CONSENT_ACTIVE_CONSENT_RESOURCES_RESOLVE
pointcut will be cached if the clinical patient id and theConsentEvaluationEventType
are the same for multiple resources in a given request. -
equals
-
hashCode
-