Class ConsentOutcome

java.lang.Object
ca.uhn.fhir.rest.server.interceptor.consent.ConsentOutcome
All Implemented Interfaces:
IConsentVote

public class ConsentOutcome extends Object implements IConsentVote
  • Field Details

    • PROCEED

      public static final ConsentOutcome PROCEED
      Convenience constant containing new ConsentOutcome(ConsentOperationStatusEnum.PROCEED)
    • REJECT

      public static final ConsentOutcome REJECT
      Convenience constant containing new ConsentOutcome(ConsentOperationStatusEnum.REJECT)
    • AUTHORIZED

      public static final ConsentOutcome AUTHORIZED
      Convenience constant containing new ConsentOutcome(ConsentOperationStatusEnum.AUTHORIZED)
  • Constructor Details

  • Method Details

    • parallelReduce

      public static ConsentOutcome parallelReduce(Stream<ConsentOutcome> theOutcomes)
      Evaluate all verdicts together, allowing any to veto (i.e. REJECT) the operation.
      • If any vote is REJECT, then the result is a REJECT vote.
      • If no vote is REJECT, and any vote is AUTHORIZED, then the result is one of the AUTHORIZED votes.
      • If no vote is REJECT or AUTHORIZED, the result is a PROCEED vote.
      Returns:
      REJECT if any reject, AUTHORIZED if no REJECT and some AUTHORIZED, PROCEED if empty or all PROCEED
    • serialReduce

      public static ConsentOutcome serialReduce(Stream<ConsentOutcome> theStream)
      Evaluate verdicts in order, taking the first "decision" (i.e. first non-PROCEED) verdict.
      Returns:
      the first decisive verdict, or theSeed when empty or all PROCEED.
    • getStatus

      Description copied from interface: IConsentVote
      Get the vote
      Specified by:
      getStatus in interface IConsentVote
      Returns:
      the vote
    • getOperationOutcome

      public org.hl7.fhir.instance.model.api.IBaseOperationOutcome getOperationOutcome()
    • getResource

      public org.hl7.fhir.instance.model.api.IBaseResource getResource()