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 8e5a92f..34c3488 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsInspection.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsInspection.vue @@ -47,7 +47,7 @@ import DataForm from "@/pages/newMedicalCard/components/InitialInspectionProtoco import DiseaseForm from "@/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/DiseaseForm.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 { @@ -58,7 +58,7 @@ export default { DiseaseForm, 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 a14e791..24af6f5 100644 --- a/src/pages/newMedicalCard/utils/medicalConfig.js +++ b/src/pages/newMedicalCard/utils/medicalConfig.js @@ -710,45 +710,76 @@ 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)", - }, - ], + }, }, }, { @@ -762,3 +793,25 @@ export const protocolForms = [ }, }, ]; + +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, + }, + }, }, });