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, IIdType theClinicalPatientId) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanWhether theConsentFetchQueriesfrom theCdrPointcut.CONSENT_FETCH_QUERIESpointcut and theConsentActiveResourceResolutionRequestfrom theCdrPointcut.CONSENT_ACTIVE_CONSENT_RESOURCES_RESOLVEpointcut should be cached if the clinical patient id and theConsentEvaluationEventTypeare the same for multiple resources in a given request.voidsetCacheable(boolean theCacheable) By default, theConsentFetchQueriesfrom theCdrPointcut.CONSENT_FETCH_QUERIESpointcut and theConsentActiveResourceResolutionRequestfrom theCdrPointcut.CONSENT_ACTIVE_CONSENT_RESOURCES_RESOLVEpointcut will be cached if the clinical patient id and theConsentEvaluationEventTypeare the same for multiple resources in a given request.
-
Constructor Details
-
ConsentLookupContext
public ConsentLookupContext(@Nonnull ConsentEvaluationEventType theConsentEvaluationEventType, @Nullable IIdType theClinicalPatientId)
-
-
Method Details
-
getClinicalPatientId
-
getConsentEvaluationEventType
-
isCacheable
Whether theConsentFetchQueriesfrom theCdrPointcut.CONSENT_FETCH_QUERIESpointcut and theConsentActiveResourceResolutionRequestfrom theCdrPointcut.CONSENT_ACTIVE_CONSENT_RESOURCES_RESOLVEpointcut should be cached if the clinical patient id and theConsentEvaluationEventTypeare the same for multiple resources in a given request.- Returns:
- true if caching should be used
-
setCacheable
By default, theConsentFetchQueriesfrom theCdrPointcut.CONSENT_FETCH_QUERIESpointcut and theConsentActiveResourceResolutionRequestfrom theCdrPointcut.CONSENT_ACTIVE_CONSENT_RESOURCES_RESOLVEpointcut will be cached if the clinical patient id and theConsentEvaluationEventTypeare the same for multiple resources in a given request. -
equals
-
hashCode
-