diff --git a/app/Http/Controllers/Api/NurseController.php b/app/Http/Controllers/Api/NurseController.php index 24ed24b..3121220 100644 --- a/app/Http/Controllers/Api/NurseController.php +++ b/app/Http/Controllers/Api/NurseController.php @@ -86,7 +86,10 @@ class NurseController extends Controller 'visit_result_id' => 'required', 'mis_user_id' => 'nullable', 'comment' => 'nullable', - 'mis_id' => 'nullable' + 'mis_id' => 'nullable', + 'delivery_from_address' => 'nullable', + 'delivery_from_object_id' => 'nullable', + 'received_disease_at' => 'nullable', ]); $data['mis_user_id'] = $misUserId; @@ -168,6 +171,9 @@ class NurseController extends Controller 'visit_result_id' => 'nullable', 'mis_user_id' => 'nullable', 'comment' => 'nullable', + 'delivery_from_address' => 'nullable', + 'delivery_from_object_id' => 'nullable', + 'received_disease_at' => 'nullable', ]); $data['medical_history_id'] = $id; diff --git a/database/migrations/2026_07_08_082352_add_column_delivery.php b/database/migrations/2026_07_08_082352_add_column_delivery.php index 744e816..13c8fc6 100644 --- a/database/migrations/2026_07_08_082352_add_column_delivery.php +++ b/database/migrations/2026_07_08_082352_add_column_delivery.php @@ -15,6 +15,10 @@ return new class extends Migration $table->string('delivery_from_address')->nullable(); $table->unsignedBigInteger('delivery_from_object_id')->nullable(); }); + Schema::table('medical_history_nurses', function (Blueprint $table) { + $table->string('delivery_from_address')->nullable(); + $table->unsignedBigInteger('delivery_from_object_id')->nullable(); + }); Schema::table('report_nurse_patients', function (Blueprint $table) { $table->string('delivery_from_address')->nullable(); $table->unsignedBigInteger('delivery_from_object_id')->nullable(); @@ -30,6 +34,10 @@ return new class extends Migration $table->dropColumn('delivery_from_address'); $table->dropColumn('delivery_from_object_id'); }); + Schema::table('medical_history_nurses', function (Blueprint $table) { + $table->dropColumn('delivery_from_address'); + $table->dropColumn('delivery_from_object_id'); + }); Schema::table('report_nurse_patients', function (Blueprint $table) { $table->dropColumn('delivery_from_address'); $table->dropColumn('delivery_from_object_id'); diff --git a/database/migrations/2026_07_08_082852_add_column_received.php b/database/migrations/2026_07_08_082852_add_column_received.php index 43ec4db..89711dd 100644 --- a/database/migrations/2026_07_08_082852_add_column_received.php +++ b/database/migrations/2026_07_08_082852_add_column_received.php @@ -14,6 +14,9 @@ return new class extends Migration Schema::table('medical_history_corrections', function (Blueprint $table) { $table->dateTime('received_disease_at')->nullable(); }); + Schema::table('medical_history_nurses', function (Blueprint $table) { + $table->dateTime('received_disease_at')->nullable(); + }); Schema::table('report_nurse_patients', function (Blueprint $table) { $table->dateTime('received_disease_at')->nullable(); }); @@ -27,6 +30,9 @@ return new class extends Migration Schema::table('medical_history_corrections', function (Blueprint $table) { $table->dropColumn('received_disease_at'); }); + Schema::table('medical_history_nurses', function (Blueprint $table) { + $table->dropColumn('received_disease_at'); + }); Schema::table('report_nurse_patients', function (Blueprint $table) { $table->dropColumn('received_disease_at'); }); diff --git a/resources/js/Pages/Nurse/Components/AddMedicalHistoryModal.vue b/resources/js/Pages/Nurse/Components/AddMedicalHistoryModal.vue index 7399983..e1ac663 100644 --- a/resources/js/Pages/Nurse/Components/AddMedicalHistoryModal.vue +++ b/resources/js/Pages/Nurse/Components/AddMedicalHistoryModal.vue @@ -13,6 +13,8 @@ const currentStep = ref(1) const currentStatus = ref('process') const isFinallyStep = computed(() => currentStep.value === 2) const buttonLoading = ref(false) +const isReceivedDisease = ref(false) +const disableReceivedDisease = computed(() => !!isReceivedDisease.value) const form = ref({ patient_source: 'mis', @@ -25,8 +27,9 @@ const form = ref({ recipient_date: format(new Date(), 'yyyy-MM-dd HH:mm:ss'), death_date: null, extract_date: null, - deliveriFromAddress: null, - deliveryFromObjectId: null, + delivery_from_address: null, + delivery_from_object_id: null, + received_disease_at: null, mis_id: null }) @@ -42,8 +45,9 @@ const resetForm = () => { recipient_date: format(new Date(), 'yyyy-MM-dd HH:mm:ss'), death_date: null, extract_date: null, - deliveriFromAddress: null, - deliveryFromObjectId: null, + delivery_from_address: null, + delivery_from_object_id: null, + received_disease_at: null, mis_id: null } } @@ -183,6 +187,9 @@ const onChangeSearch = (historyId) => { form.value.death_date = res.data.death_date form.value.extract_date = res.data.extract_date form.value.recipient_date = res.data.recipient_date + form.value.delivery_from_address = res.data.delivery_from_address + form.value.delivery_from_object_id = res.data.delivery_from_object_id + form.value.received_disease_at = res.data.received_disease_at }).finally((e) => { loadingChangeSelect.value = false }) @@ -192,6 +199,11 @@ watch(() => currentStep.value, (val) => { if (val === 1) resetForm() }) +watch(() => isReceivedDisease.value, (value) => { + if (value) form.value.received_disease_at = null +}) + + const canShowExtractDateField = ref(false) const canShowDeathDateField = ref(false) watch(() => form.value.visit_result_id, (newVisitResultId, oldVisitResultId) => { @@ -278,17 +290,27 @@ const onAfterLeave = () => { - + - + Неизвестно - + diff --git a/resources/js/Pages/Nurse/Components/EditMedicalHistoryModal.vue b/resources/js/Pages/Nurse/Components/EditMedicalHistoryModal.vue index cbdb5bf..b14b21e 100644 --- a/resources/js/Pages/Nurse/Components/EditMedicalHistoryModal.vue +++ b/resources/js/Pages/Nurse/Components/EditMedicalHistoryModal.vue @@ -47,9 +47,12 @@ const form = ref({ recipient_date: null, death_date: null, extract_date: null, - deliveriFromAddress: null, - deliveryFromObjectId: null + delivery_from_address: null, + delivery_from_object_id: null, + received_disease_at: null }) +const isReceivedDisease = ref(false) +const disableReceivedDisease = computed(() => !!isReceivedDisease.value) const loading = ref(true) const buttonLoading = ref(false) @@ -147,6 +150,9 @@ const fetchPatient = async (historyId) => { form.value.death_date = res.data.death_date form.value.extract_date = res.data.extract_date form.value.recipient_date = res.data.recipient_date + form.value.delivery_from_address = res.data.delivery_from_address + form.value.delivery_from_object_id = res.data.delivery_from_object_id + form.value.received_disease_at = res.data.received_disease_at }) .finally((e) => { loading.value = false @@ -157,6 +163,10 @@ watch(() => props.historyId, async (newHistoryId, historyId) => { await fetchPatient(newHistoryId) }) +watch(() => isReceivedDisease.value, (value) => { + if (value) form.value.received_disease_at = null +}) + const canShowExtractDateField = ref(false) const canShowDeathDateField = ref(false) watch(() => form.value.visit_result_id, (newVisitResultId, oldVisitResultId) => { @@ -210,17 +220,27 @@ watch(() => form.value.visit_result_id, (newVisitResultId, oldVisitResultId) => - + - + Неизвестно - +