update banyak
This commit is contained in:
@@ -54,6 +54,12 @@ class Encounter extends Model
|
||||
return $this->hasMany(EncounterParticipant::class, 'encounter_id');
|
||||
}
|
||||
|
||||
public function claim()
|
||||
{
|
||||
return $this->belongsTo(Claim::class);
|
||||
}
|
||||
|
||||
|
||||
public function doctors()
|
||||
{
|
||||
|
||||
@@ -96,6 +102,7 @@ class Encounter extends Model
|
||||
return $this->belongsTo(Service::class, 'class', 'code');
|
||||
}
|
||||
|
||||
|
||||
public function getMetaAttribute()
|
||||
{
|
||||
$orgMeta = [];
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Member;
|
||||
use App\Models\Encounter;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -120,4 +121,9 @@ class CorporateMemberService
|
||||
->selectRaw("(select sum(`claims`.`total_claim`) from `claims` where `members`.`id` = `claims`.`member_id` AND `claims`.`deleted_at` IS NULL) AS `claims_sum_total_claim`")
|
||||
->paginate($limit);
|
||||
}
|
||||
|
||||
public function getAllEncounter(int $corporateId){
|
||||
return Encounter::query()->select(['id'])->paginate(10);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user