Рефакторинг
Some checks failed
Build and Push Docker Image / test (push) Failing after 3s
Build and Push Docker Image / build (push) Has been cancelled

This commit is contained in:
brusnitsyn
2026-02-27 15:36:32 +09:00
parent b72a7f0ee1
commit 47543fedba
2 changed files with 2 additions and 4 deletions

View File

@@ -47,8 +47,6 @@ class IndexController extends Controller
$pageSize
);
// dd($data);
$statuses = ArchiveStatus::all()->map(function ($status) {
return [
'value' => $status->id,

View File

@@ -23,7 +23,7 @@ class MedicalHistoryController extends Controller
else $patient = MisSttMedicalHistory::where('MedicalHistoryID', $id)->first();
if($patient instanceof MisSttMedicalHistory) {
if ($patient->archiveHistory->count() === 0) {
if ($patient->archiveHistory->count() === 0 && $patient->archiveInfo->foxpro_history_id) {
$foxproCardId = $patient->archiveInfo->foxpro_history_id;
$foxproPatient = SiSttMedicalHistory::where('keykarta', $foxproCardId)->first();
@@ -44,7 +44,7 @@ class MedicalHistoryController extends Controller
...PatientInfoResource::make($patient)->toArray(request()),
'can_be_issued' => $patient->canBeIssued()
],
'journal' => ArchiveHistoryResource::collection($journalHistory),
'journal' => $journalHistory ? ArchiveHistoryResource::collection($journalHistory) : [],
'archiveInfo' => $archiveInfo ? ArchiveInfoResource::make($archiveInfo) : null
];