From 9eecbd4973dd6425381290796d6db46d717967bc Mon Sep 17 00:00:00 2001 From: DwCay Date: Wed, 17 May 2023 16:41:02 +0300 Subject: [PATCH] =?UTF-8?q?WIP=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=84=D0=BE=D1=80=D0=BC=D1=83=20=D0=A2=D0=BE=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=82=D1=80=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Forms/MainFactorsForm.vue | 115 +++++++++++++++++ .../Forms/ThermometryForm.vue | 104 --------------- .../MedicalProtocolsInspection.vue | 4 +- .../newMedicalCard/utils/medicalConfig.js | 119 +++++++++++++----- src/store/modules/medicalCard.js | 14 ++- 5 files changed, 214 insertions(+), 142 deletions(-) create mode 100644 src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/MainFactorsForm.vue delete mode 100644 src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ThermometryForm.vue diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/MainFactorsForm.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/MainFactorsForm.vue new file mode 100644 index 0000000..d8d4385 --- /dev/null +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/MainFactorsForm.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ThermometryForm.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ThermometryForm.vue deleted file mode 100644 index 5445c44..0000000 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ThermometryForm.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - - - diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsInspection.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsInspection.vue index 7908e3e..55ae1c3 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsInspection.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsInspection.vue @@ -46,7 +46,7 @@ import MedicalFormTag from "@/pages/newMedicalCard/components/InitialInspectionP import DataForm from "@/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/DataForm.vue"; import BaseButton from "@/components/base/BaseButton.vue"; import IndexForm from "@/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/IndexForm.vue"; -import ThermometryForm from "@/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ThermometryForm.vue"; +import MainFactorsForm from "@/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/MainFactorsForm.vue"; import { protocolForms } from "@/pages/newMedicalCard/utils/medicalConfig.js"; export default { @@ -56,7 +56,7 @@ export default { DataForm, BaseButton, IndexForm, - ThermometryForm, + MainFactorsForm, }, props: { inspection: Boolean, fillInspection: Boolean }, data() { diff --git a/src/pages/newMedicalCard/utils/medicalConfig.js b/src/pages/newMedicalCard/utils/medicalConfig.js index e03d3cb..bd3daa1 100644 --- a/src/pages/newMedicalCard/utils/medicalConfig.js +++ b/src/pages/newMedicalCard/utils/medicalConfig.js @@ -673,45 +673,98 @@ export const protocolForms = [ }, { title: "Термометрия (по показаниям)", - component: "ThermometryForm", + component: "MainFactorsForm", key: "thermometry", state: "thermometry", config: { - temperature: { - cold: { - title: "Реакция на холод", - color: "var(--font-cold-color)", - bg: "var(--bg-cold-color)", - icon: "ac_unit", - }, - heat: { - title: "Реакция на тепло", - color: "var(--font-heat-color)", - bg: "var(--bg-heat-color)", - icon: "local_fire_department", + cold: { + step: 1, + title: "Реакция на холод", + label: "Температура", + shadowText: "º", + max: 100, + min: 1, + color: "var(--font-cold-color)", + bg: "var(--bg-cold-color)", + icon: "ac_unit", + colorWarning: (val) => + thermometryResultsMap.find((el) => el.value === val)?.colorWarning, + }, + heat: { + step: 1, + title: "Реакция на тепло", + label: "Температура", + shadowText: "º", + max: 100, + min: 1, + color: "var(--font-heat-color)", + bg: "var(--bg-heat-color)", + icon: "local_fire_department", + colorWarning: (val) => + thermometryResultsMap.find((el) => el.value === val)?.colorWarning, + }, + }, + }, + { + title: "Тонометрия, ЧСС (по показаниям)", + component: "MainFactorsForm", + key: "tonometry", + state: "tonometry", + config: { + pulse: { + step: 1, + label: "Пульс", + shadowText: "уд/мин", + max: 140, + min: 30, + colorWarning: (val) => { + if (!val) return val; + if (val >= 80 && val < 110) { + return "var(--bg-yellow-warning)"; + } + if ((0 <= val && val <= 60) || val >= 110) { + return "var(--border-red-color)"; + } }, }, - results: [ - { - value: "Нет реакции", - colorWarning: "var(--border-red-color)", + pressure: { + step: 1, + label: "Артериальное давление", + shadowText: "мм.рт.ст.", + max: 180, + min: 40, + colorWarning: (val) => { + if (!val) return val; + if ((val >= 130 && val < 140) || (val >= 100 && val < 110)) { + return "var(--bg-yellow-warning)"; + } + if (val >= 140 || val < 100) { + return "var(--border-red-color)"; + } }, - { - value: "Слабая реакция", - colorWarning: "var(--bg-yellow-warning)", - }, - { - value: "Реакция нормальная", - }, - { - value: "Повышенная чувствительность", - colorWarning: "var(--bg-yellow-warning)", - }, - { - value: "Непереносимость", - colorWarning: "var(--border-red-color)", - }, - ], + }, }, }, ]; + +export const thermometryResultsMap = [ + { + value: "Нет реакции", + colorWarning: "var(--border-red-color)", + }, + { + value: "Слабая реакция", + colorWarning: "var(--bg-yellow-warning)", + }, + { + value: "Реакция нормальная", + }, + { + value: "Повышенная чувствительность", + colorWarning: "var(--bg-yellow-warning)", + }, + { + value: "Непереносимость", + colorWarning: "var(--border-red-color)", + }, +]; diff --git a/src/store/modules/medicalCard.js b/src/store/modules/medicalCard.js index 515ed6f..ce926ad 100644 --- a/src/store/modules/medicalCard.js +++ b/src/store/modules/medicalCard.js @@ -132,14 +132,22 @@ const state = () => ({ KPUIndex: 6.1, thermometry: { cold: { - temperature: 22, - result: "Нет реакции", + value: 22, + result: "Реакция нормальная", }, heat: { - temperature: 50, + value: 50, result: "Повышенная чувствительность", }, }, + tonometry: { + pulse: { + value: 84, + }, + pressure: { + value: 120, + }, + }, }, });