fixing add prescription
This commit is contained in:
@@ -70,4 +70,8 @@ class Livechat extends Model
|
||||
{
|
||||
return $this->belongsTo(Healthcare::class, 'nIDHealthCare', 'nID');
|
||||
}
|
||||
|
||||
public function summary(){
|
||||
return $this->belongsTo(LivechatSummary::class, 'nID', 'nIDLivechat');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ class Prescription extends Model
|
||||
|
||||
protected $table = 'tx_prescriptions';
|
||||
|
||||
protected $primaryKey = 'nID';
|
||||
|
||||
// protected $appends = [
|
||||
// 'status_name',
|
||||
// ];
|
||||
|
||||
@@ -48,4 +48,5 @@ class PrescriptionItem extends Model
|
||||
'dTanggalResep' => 'datetime',
|
||||
];
|
||||
|
||||
protected $primaryKey = 'nID';
|
||||
}
|
||||
|
||||
18
app/Models/Prescription.php
Normal file
18
app/Models/Prescription.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\Blameable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Prescription extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $fillable = [
|
||||
'livechat_id',
|
||||
'organization_id',
|
||||
'icd_code'
|
||||
];
|
||||
}
|
||||
19
app/Models/PrescriptionItem.php
Normal file
19
app/Models/PrescriptionItem.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PrescriptionItem extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $fillable = [
|
||||
'prescription_id',
|
||||
'drug_id',
|
||||
'qty',
|
||||
'unit_id',
|
||||
'note',
|
||||
'signa'
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user