resep dokter

This commit is contained in:
Linksehat Staging Server
2024-06-03 09:14:21 +07:00
parent 4b7337f7cb
commit 6f711b592e
3 changed files with 6 additions and 0 deletions

View File

@@ -135,6 +135,7 @@ class PrescriptionController extends Controller
'sKodeResep' => $kodeResep,
'sDiagnose' => $sDiagnosis,
'sKodeRS' => $hospital,
'sStatus' => 1, // bayar'
];
$prescription = Prescription::updateOrCreate([
@@ -164,9 +165,11 @@ class PrescriptionController extends Controller
$drugData = Drug::where('id', $value['drug_id'])->first();
$drug = '';
$drugCode = '';
$drugPrice = 0;
if ($drugData){
$drug = $drugData->name;
$drugCode = $drugData->code;
$drugPrice = $drugData->price;
}
$unitData = Unit::where('id', $value['unit_id'])->first();
$unit = '';
@@ -192,6 +195,7 @@ class PrescriptionController extends Controller
'sSatuan' => $unit,
'sSigna' => $value['signa'],
'sNote' => $value['note'],
'nHarga' => $drugPrice
];
try {
// Insert to ASO

View File

@@ -19,6 +19,7 @@ class Prescription extends Model
'sSource',
'nIDUser',
'sRegID',
'sStatus',
'sKodeResep',
'sDiagnose',
'sKodeRS',

View File

@@ -19,6 +19,7 @@ class PrescriptionItem extends Model
'sSatuan',
'sSigna',
'sNote',
'nHarga',
'isRacikan',
'ParentCode',
];