Работа над журналом для ст. мед сестер
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Infrastructure\Reports\Services;
|
||||
|
||||
use App\Models\ObservationPatient;
|
||||
|
||||
/**
|
||||
* Управляет пациентами, находящимися на контроле в отчётном интерфейсе.
|
||||
*/
|
||||
class ObservationPatientManagementService
|
||||
{
|
||||
public function removeObservationPatient(string $patientId): void
|
||||
{
|
||||
[$sourceType, $id] = explode(':', $patientId) + [null, null];
|
||||
|
||||
if ($sourceType === 'manual') {
|
||||
ObservationPatient::query()
|
||||
->where('rf_department_patient_id', $id)
|
||||
->delete();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ObservationPatient::query()
|
||||
->where('rf_medicalhistory_id', $id)
|
||||
->delete();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user