Activate Care workflows across check-in and financial clearance.
Deploy Ladill Care / deploy (push) Failing after 1m9s
Deploy Ladill Care / deploy (push) Failing after 1m9s
Enforce service-queue gates, cashier settlements, and clinical stage progression so patient journeys cannot bypass configured payment or authorization rules. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,9 +5,15 @@ namespace App\Services\Care;
|
||||
use App\Models\Organization;
|
||||
use App\Models\Patient;
|
||||
use App\Models\Visit;
|
||||
use App\Services\Care\Workflow\WorkflowEngine;
|
||||
|
||||
class VisitService
|
||||
{
|
||||
public function __construct(
|
||||
protected CareFeatures $features,
|
||||
protected WorkflowEngine $workflows,
|
||||
) {}
|
||||
|
||||
public function checkIn(
|
||||
Organization $organization,
|
||||
string $ownerRef,
|
||||
@@ -27,6 +33,10 @@ class VisitService
|
||||
|
||||
AuditLogger::record($ownerRef, 'visit.checked_in', $organization->id, $actorRef, Visit::class, $visit->id);
|
||||
|
||||
if ($this->features->enabled($organization, CareFeatures::WORKFLOW_ENGINE)) {
|
||||
$this->workflows->start($visit);
|
||||
}
|
||||
|
||||
return $visit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user