update create e-prescription

This commit is contained in:
2024-04-30 10:11:11 +07:00
parent 2c4fe723dc
commit 8aa67c1864
19 changed files with 2234 additions and 28 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Models\OLDLMS;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
class LivechatSummary extends Model
{
use HasFactory;
// public $sStatusNames = [
// 0 => 'Menunggu Konfirmasi',
// 1 => 'Diterima',
// 3 => 'Ditolak',
// 2 => 'Selesai',
// 4 => 'Expired',
// ];
public $sStatusNames = [
0 => 'Request TC',
1 => 'Accepted by Doctor but User not Payment',
3 => 'Decline by Doctor',
2 => 'Payment Success',
4 => 'Payment Expired',
5 => 'Cancel by Patient'
];
const CREATED_AT = 'dCreateOn';
const UPDATED_AT = 'dUpdateOn';
const DELETED_AT = 'dDeleteOn';
protected $connection = 'oldlms';
protected $table = 'tx_livechat_summary';
protected $primaryKey = 'nID';
}

View File

@@ -10,6 +10,20 @@ class Prescription extends Model
{
use HasFactory;
protected $fillable = [
'nIDLivechat',
'nIDLivechatSummary',
'nIDDokter',
'sDokterName',
'dTanggalResep',
'sSource',
'nIDUser',
'sRegID',
'sKodeResep',
'sDiagnose',
'sKodeRS',
];
// public $sStatusNames = [
// 0 => 'Menunggu Konfirmasi',

View File

@@ -0,0 +1,51 @@
<?php
namespace App\Models\OLDLMS;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
class PrescriptionItem extends Model
{
use HasFactory;
protected $fillable = [
'nIDPrescription',
'sItemCode',
'sOriginCode',
'sItemName',
'nQty',
'sSatuan',
'sSigna',
'sNote',
'isRacikan',
'ParentCode',
];
// public $sStatusNames = [
// 0 => 'Menunggu Konfirmasi',
// 1 => 'Diterima',
// 2 => 'Ditolak',
// 3 => 'Selesai',
// 4 => 'Expired',
// ];
const CREATED_AT = 'dCreateOn';
const UPDATED_AT = 'dUpdateOn';
const DELETED_AT = 'dDeleteOn';
protected $connection = 'oldlms';
protected $table = 'tx_prescription_items';
// protected $appends = [
// 'status_name',
// ];
protected $casts = [
'dTanggalResep' => 'datetime',
];
}