From 090c7709c03d4f0ebd4eb1177dc64912b51b4514 Mon Sep 17 00:00:00 2001 From: brusnitsyn Date: Fri, 27 Feb 2026 15:01:00 +0900 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BA=D0=BE=D0=BB=D0=BE=D0=BD=D0=BA=D1=83=20=D0=BE?= =?UTF-8?q?=D1=82=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5.=20=D0=9F?= =?UTF-8?q?=D0=BE=D0=BA=D0=B0=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=82=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20=D0=9C=D0=98?= =?UTF-8?q?=D0=A1=20#2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/IndexSttMedicalHistoryResource.php | 3 +++ app/Models/Mis/OmsDepartment.php | 11 +++++++++++ app/Models/Mis/SttMedicalHistory.php | 12 ++++++++++++ app/Models/Mis/SttMigrationPatient.php | 16 ++++++++++++++++ app/Models/Mis/SttStationarBranch.php | 16 ++++++++++++++++ resources/js/Pages/Home/DataTable/Index.vue | 12 +++++++++--- 6 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 app/Models/Mis/OmsDepartment.php create mode 100644 app/Models/Mis/SttMigrationPatient.php create mode 100644 app/Models/Mis/SttStationarBranch.php diff --git a/app/Http/Resources/IndexSttMedicalHistoryResource.php b/app/Http/Resources/IndexSttMedicalHistoryResource.php index aed22d7..8b91b42 100644 --- a/app/Http/Resources/IndexSttMedicalHistoryResource.php +++ b/app/Http/Resources/IndexSttMedicalHistoryResource.php @@ -57,6 +57,8 @@ class IndexSttMedicalHistoryResource extends JsonResource ? "$archiveInfoMisCardNumber / $archiveInfoFoxproCardNumber" : $archiveInfoMisCardNumber ?? $archiveInfoFoxproCardNumber; + $department = $historyType === 'mis' ? $model->outcomeMigration->stationarBranch->department : null; + return [ 'id' => $id, 'history_type' => $historyType, @@ -69,6 +71,7 @@ class IndexSttMedicalHistoryResource extends JsonResource 'dr' => $formattedBirthDate, 'daterecipient' => $formattedDateRecipient, 'dateextract' => $formattedDateExtract, + 'department' => $department?->DepartmentNAME, // Номера карт 'medcardnum' => $cardNumber, // MIS номер или FoxPro номер diff --git a/app/Models/Mis/OmsDepartment.php b/app/Models/Mis/OmsDepartment.php new file mode 100644 index 0000000..23fabc7 --- /dev/null +++ b/app/Models/Mis/OmsDepartment.php @@ -0,0 +1,11 @@ +hasOne(ArchiveInfo::class, 'mis_history_id', 'MedicalHistoryID'); } + public function migrations() + { + return $this->hasOne(SttMigrationPatient::class, 'rf_MedicalHistoryID', 'MedicalHistoryID'); + } + + public function outcomeMigration() + { + return $this->migrations() + ->where('rf_kl_VisitResultID', 1) + ->whereDate('DateOut', '<>', '2222-01-01'); + } + /** * Проверяет, можно ли выдать эту карту */ diff --git a/app/Models/Mis/SttMigrationPatient.php b/app/Models/Mis/SttMigrationPatient.php new file mode 100644 index 0000000..ad479de --- /dev/null +++ b/app/Models/Mis/SttMigrationPatient.php @@ -0,0 +1,16 @@ +hasOne(SttStationarBranch::class, 'StationarBranchID', 'rf_StationarBranchID'); + } +} diff --git a/app/Models/Mis/SttStationarBranch.php b/app/Models/Mis/SttStationarBranch.php new file mode 100644 index 0000000..6506fae --- /dev/null +++ b/app/Models/Mis/SttStationarBranch.php @@ -0,0 +1,16 @@ +hasOne(OmsDepartment::class, 'DepartmentID', 'rf_DepartmentID'); + } +} diff --git a/resources/js/Pages/Home/DataTable/Index.vue b/resources/js/Pages/Home/DataTable/Index.vue index f7090e8..548bb89 100644 --- a/resources/js/Pages/Home/DataTable/Index.vue +++ b/resources/js/Pages/Home/DataTable/Index.vue @@ -56,21 +56,27 @@ const columns = ref([ { title: 'Дата рождения', key: 'dr', - width: 130, + width: 100, render: (row) => h(NEllipsis, null, { default: () => row.dr }) }, { title: 'Дата поступления', key: 'daterecipient', - width: 150, + width: 100, render: (row) => h(NEllipsis, null, { default: () => row.daterecipient }) }, { title: 'Дата выписки', key: 'dateextract', - width: 130, + width: 100, render: (row) => h(NEllipsis, null, { default: () => row.dateextract }) }, + { + title: 'Отделение', + key: 'department', + width: 180, + render: (row) => h(NEllipsis, null, { default: () => row.department }) + }, { title: '№ архива', key: 'card_num',