Patients can be admitted, transferred, and discharged from unit/bed stays with occupancy sync, so MAR and ward boards have inpatient context. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -53,6 +53,16 @@ class CareUnit extends Model
|
||||
return $this->hasMany(StaffAssignment::class, 'care_unit_id');
|
||||
}
|
||||
|
||||
public function visits(): HasMany
|
||||
{
|
||||
return $this->hasMany(Visit::class, 'care_unit_id');
|
||||
}
|
||||
|
||||
public function activeStays(): HasMany
|
||||
{
|
||||
return $this->hasMany(BedStay::class, 'care_unit_id')->where('status', BedStay::STATUS_ACTIVE);
|
||||
}
|
||||
|
||||
public function supportsBeds(): bool
|
||||
{
|
||||
return $this->kind === 'inpatient';
|
||||
|
||||
Reference in New Issue
Block a user