Работа над интерактивным обучением для дежурного и мед. сестры
This commit is contained in:
@@ -7,8 +7,11 @@ import {format} from "date-fns";
|
||||
import {router, usePage} from "@inertiajs/vue3";
|
||||
import AppPanel from "../../../Components/AppPanel.vue"
|
||||
import AppSearchAddress from '../../../Components/AppSearchAddress.vue';
|
||||
import {useOnboardingStore} from "../../../Stores/onboarding.js";
|
||||
|
||||
const show = defineModel('show', { default: false })
|
||||
|
||||
const onboarding = useOnboardingStore()
|
||||
const currentStep = ref(1)
|
||||
const currentStatus = ref('process')
|
||||
const isFinallyStep = computed(() => currentStep.value === 2)
|
||||
@@ -224,10 +227,16 @@ const onAfterLeave = () => {
|
||||
currentStep.value = 1
|
||||
searchOptions.value = []
|
||||
}
|
||||
|
||||
const onUpdatePatientSource = (v) => {
|
||||
if (v === 'mis') onboarding.emit('newPatientModal:patientTypeSelected')
|
||||
if (v === 'special') onboarding.emit('newPatientModal:patientTypeSelected')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NModal v-model:show="show"
|
||||
id="create-new-patient-modal"
|
||||
segmented
|
||||
preset="card"
|
||||
title="Добавление пациента"
|
||||
@@ -243,7 +252,7 @@ const onAfterLeave = () => {
|
||||
</NSteps>
|
||||
<NTabs tab-class="hidden!" :value="currentStep">
|
||||
<NTabPane :name="1" class="mt-4">
|
||||
<NRadioGroup class="w-full space-y-2!" v-model:value="form.patient_source">
|
||||
<NRadioGroup class="w-full space-y-2!" v-model:value="form.patient_source" @update:value="v => onUpdatePatientSource(v)">
|
||||
<AppRadio title="МИС" value="mis" description="Выберите, если пациента можно найти в системе МИС" />
|
||||
<AppRadio title="Спец. контингент" value="special" description="Выберите, если пациента нет в системе МИС" />
|
||||
</NRadioGroup>
|
||||
|
||||
@@ -17,6 +17,7 @@ import ActionsColumnDataTable from "../Components/ActionsColumnDataTable.vue";
|
||||
import {useAppDialog} from "../../../Composables/useAppDialog.js";
|
||||
import {format} from "date-fns";
|
||||
import DatePickerQuery from "../../../Components/DatePickerQuery.vue";
|
||||
import {useOnboardingStore} from "../../../Stores/onboarding.js";
|
||||
|
||||
const props = defineProps({
|
||||
patients: {
|
||||
@@ -53,6 +54,7 @@ const props = defineProps({
|
||||
|
||||
const canEdit = computed(() => props.canSaveReport || props.canEditPastReport)
|
||||
|
||||
const onboarding = useOnboardingStore()
|
||||
const showAddMedicalHistoryModal = shallowRef(false)
|
||||
const showEditMedicalHistoryModal = shallowRef(false)
|
||||
const editHistoryId = ref(null)
|
||||
@@ -210,18 +212,23 @@ const submit = () => {
|
||||
|
||||
const reportCreator = computed(() => {
|
||||
if (props.latestReport === null) return ''
|
||||
if (props.latestReport.doctor.LPUDoctorID === 0) return 'Отчет создан системой'
|
||||
if (props.latestReport.doctor?.LPUDoctorID === 0) return 'Отчет создан системой'
|
||||
else return `Отчет создан: ${props.latestReport.doctor.FAM_V} ${props.latestReport.doctor.IM_V} ${props.latestReport.doctor.OT_V}`
|
||||
})
|
||||
const reportCreatorType = computed(() => {
|
||||
if (props.latestReport === null) return 'warning'
|
||||
if (props.latestReport.doctor.LPUDoctorID === 0) return 'error'
|
||||
if (props.latestReport.doctor?.LPUDoctorID === 0) return 'error'
|
||||
else return 'warning'
|
||||
})
|
||||
|
||||
const formattedLabel = (word, count) => {
|
||||
return `${word} (${count})`
|
||||
}
|
||||
|
||||
const onShowCreatePatientModal = () => {
|
||||
showAddMedicalHistoryModal.value = true
|
||||
onboarding.emit('createNewPatientModal:opened')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -237,19 +244,19 @@ const formattedLabel = (word, count) => {
|
||||
{{ reportCreator }}
|
||||
</NTag>
|
||||
</NSpace>
|
||||
<DatePickerQuery :date="dates" :is-head-or-admin="true" class="text-lg!" hint />
|
||||
<DatePickerQuery id="date-selector" :date="dates" :is-head-or-admin="true" class="text-lg!" hint />
|
||||
</NFlex>
|
||||
</AppPanel>
|
||||
<AppPanel header="Журнал пациентов" header-include-body>
|
||||
<template v-if="canEdit" #header-extra>
|
||||
<NButton secondary :loading="loading" @click="showAddMedicalHistoryModal = true">
|
||||
<NButton id="add-new-patient" secondary :loading="loading" @click="onShowCreatePatientModal">
|
||||
<template #icon>
|
||||
<TbCirclePlus />
|
||||
</template>
|
||||
Добавить пациента
|
||||
</NButton>
|
||||
</template>
|
||||
<NTabs type="line">
|
||||
<NTabs id="view-tabs" type="line">
|
||||
<NTabPane name="all"
|
||||
:tab="formattedLabel('В отделении', patientsByGroup.in_department.length)"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user