0.1.0 - ci-build
collabreefhirdocumentation - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
The Payout Processor is a critical component of Collabree's adherence-as-a-service platform that automatically generates financial claims based on patient medication adherence performance. It processes adherence observations and creates FHIR Claim resources for monetary rewards.
It operates on a periodic basis, analyzing patient adherence data and generating payouts according to predefined plan definitions. It ensures that patients receive appropriate financial rewards based on their medication adherence performance while maintaining audit trails through FHIR resources.
We are not handling any real money payout mechanism is just creating a Claim entity
The Payout Processor processes adherence observations and generates payouts according to the configured plan definitions. The processor groups daily observations into payout periods, validates period completeness, creates snapshot observations for audit trails, manages coverage resources, and generates Claim resources with the calculated payout amounts.
Each payout generates a CollabreeClaim with:
activeinstitutionalfinalsnapshot version typeThe processor uses several extensions from PlanDefinition. Configuration parameters are read from PlanDefinition rather than CarePlan because PlanDefinition resources are immutable by the client, ensuring that payout calculations use the correct, unmodified parameters:
PayoutPeriodInDays: Period length (typically 30 days)NumberOfPayouts: Total payout cyclesInitialBalance: Starting reward amountLossPerDay: Penalty amountCheatDays: Grace period allowanceAdherenceThreshold: Minimum adherence requirement