Add ward MAR board plus nursing notes and SBAR handovers.
Deploy Ladill Care / deploy (push) Successful in 52s
Deploy Ladill Care / deploy (push) Successful in 52s
Nurses can chart given/held/refused doses from active prescriptions on placed patients, and document chronologic notes and unit shift handovers. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Concerns\BelongsToOwner;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class MarAdministration extends Model
|
||||
{
|
||||
use BelongsToOwner;
|
||||
|
||||
public const STATUS_GIVEN = 'given';
|
||||
|
||||
public const STATUS_HELD = 'held';
|
||||
|
||||
public const STATUS_REFUSED = 'refused';
|
||||
|
||||
public const STATUS_MISSED = 'missed';
|
||||
|
||||
protected $table = 'care_mar_administrations';
|
||||
|
||||
protected $fillable = [
|
||||
'owner_ref',
|
||||
'organization_id',
|
||||
'mar_order_id',
|
||||
'visit_id',
|
||||
'patient_id',
|
||||
'care_unit_id',
|
||||
'scheduled_for',
|
||||
'recorded_at',
|
||||
'status',
|
||||
'dose_given',
|
||||
'route',
|
||||
'administered_by',
|
||||
'witness_by',
|
||||
'reason',
|
||||
'notes',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'scheduled_for' => 'datetime',
|
||||
'recorded_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function order(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(MarOrder::class, 'mar_order_id');
|
||||
}
|
||||
|
||||
public function visit(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Visit::class, 'visit_id');
|
||||
}
|
||||
|
||||
public function patient(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Patient::class, 'patient_id');
|
||||
}
|
||||
|
||||
public function careUnit(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CareUnit::class, 'care_unit_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Concerns\BelongsToOwner;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class MarOrder extends Model
|
||||
{
|
||||
use BelongsToOwner, SoftDeletes;
|
||||
|
||||
public const STATUS_ACTIVE = 'active';
|
||||
|
||||
public const STATUS_PAUSED = 'paused';
|
||||
|
||||
public const STATUS_STOPPED = 'stopped';
|
||||
|
||||
protected $table = 'care_mar_orders';
|
||||
|
||||
protected $fillable = [
|
||||
'owner_ref',
|
||||
'organization_id',
|
||||
'visit_id',
|
||||
'patient_id',
|
||||
'prescription_id',
|
||||
'prescription_item_id',
|
||||
'drug_name',
|
||||
'dosage',
|
||||
'route',
|
||||
'frequency_code',
|
||||
'times_of_day',
|
||||
'is_prn',
|
||||
'status',
|
||||
'starts_at',
|
||||
'ends_at',
|
||||
'instructions',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'times_of_day' => 'array',
|
||||
'is_prn' => 'boolean',
|
||||
'starts_at' => 'datetime',
|
||||
'ends_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function visit(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Visit::class, 'visit_id');
|
||||
}
|
||||
|
||||
public function patient(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Patient::class, 'patient_id');
|
||||
}
|
||||
|
||||
public function prescription(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Prescription::class, 'prescription_id');
|
||||
}
|
||||
|
||||
public function prescriptionItem(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(PrescriptionItem::class, 'prescription_item_id');
|
||||
}
|
||||
|
||||
public function administrations(): HasMany
|
||||
{
|
||||
return $this->hasMany(MarAdministration::class, 'mar_order_id')->orderByDesc('recorded_at');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Concerns\BelongsToOwner;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class NursingNote extends Model
|
||||
{
|
||||
use BelongsToOwner, SoftDeletes;
|
||||
|
||||
protected $table = 'care_nursing_notes';
|
||||
|
||||
protected $fillable = [
|
||||
'owner_ref',
|
||||
'organization_id',
|
||||
'visit_id',
|
||||
'patient_id',
|
||||
'care_unit_id',
|
||||
'note_type',
|
||||
'shift_code',
|
||||
'body',
|
||||
'recorded_by',
|
||||
'recorded_at',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'recorded_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function visit(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Visit::class, 'visit_id');
|
||||
}
|
||||
|
||||
public function patient(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Patient::class, 'patient_id');
|
||||
}
|
||||
|
||||
public function careUnit(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CareUnit::class, 'care_unit_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Concerns\BelongsToOwner;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class WardHandover extends Model
|
||||
{
|
||||
use BelongsToOwner, SoftDeletes;
|
||||
|
||||
public const STATUS_DRAFT = 'draft';
|
||||
|
||||
public const STATUS_COMPLETED = 'completed';
|
||||
|
||||
protected $table = 'care_ward_handovers';
|
||||
|
||||
protected $fillable = [
|
||||
'owner_ref',
|
||||
'organization_id',
|
||||
'care_unit_id',
|
||||
'from_shift',
|
||||
'to_shift',
|
||||
'handed_over_at',
|
||||
'handed_over_by',
|
||||
'received_by',
|
||||
'situation',
|
||||
'background',
|
||||
'assessment',
|
||||
'recommendation',
|
||||
'patient_summaries',
|
||||
'status',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'handed_over_at' => 'datetime',
|
||||
'patient_summaries' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
public function careUnit(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CareUnit::class, 'care_unit_id');
|
||||
}
|
||||
|
||||
public function organization(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Organization::class, 'organization_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user