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 @@
+
+ medical-form-wrapper(:title="data.title", :is-edit="isEdit", :open-edit="openEdit", :cancel="cancelEdit")
+ .thermometry-wrapper.grid.gap-x-20.gap-y-5
+ .flex.flex-col.gap-y-4.items-start(v-if="isEdit" v-for="(dataValue, key) in protocol[data.key]")
+ span.font-semibold.text-smm(v-if="data.key === 'thermometry'") {{ data.config[key].title }}
+ base-input-number.w-full(
+ v-model="dataValue.value",
+ :step="data.config[key].step",
+ :min="data.config[key].min",
+ :max="data.config[key].max",
+ reverse-value
+ :label="data.config[key].label",
+ outlined,
+ :shadow-text="data.config[key].shadowText",
+ :placeholder="`0${data.config[key].shadowText}`"
+ mask="###"
+ )
+ .flex.flex-col.gap-y-2.w-full(v-if="data.key === 'thermometry'")
+ base-input.w-full(
+ v-model="dataValue.result",
+ label="Результат",
+ outlined,
+ text-color="black",
+ placeholder="Введите диагноз...",
+ )
+ .results-wrapper.flex.flex-col.rounded.w-full.px-4.py-2
+ .result.flex.w-full.justify-between.items-center.h-9(v-for="result in thermometryMap")
+ .flex.gap-x-4
+ q-radio(
+ v-model="dataValue.result",
+ :val="result.value",
+ :label="result.value",
+ size="40px",
+ dense,
+ checked-icon="check_box",
+ unchecked-icon="check_box_outline_blank",
+ )
+ .alert-icon.flex.justify-center.items-center.rounded.w-6.h-6(v-if="result.colorWarning")
+ q-icon(size="13px" name="warning_amber")
+ .flex.flex-col.gap-y-2.items-start(
+ v-else,
+ :class="{'gap-y-4': data.key === 'tonometry'}"
+ )
+ .flex.flex-col.gap-y-3(v-for="(dataValue, key) in protocol[data.key]")
+ .label.font-semibold.text-smm(v-if="data.key === 'tonometry'") {{ data.config[key].label }}
+ .flex.gap-x-1.h-8(v-if="dataValue.value")
+ .flex.h-full.w-20.justify-center.items-center.gap-x-1.rounded(
+ v-if="data.key === 'thermometry'",
+ :style="{'background-color': data.config[key].bg, 'color': data.config[key].color}"
+ )
+ q-icon(size="18px", :name="data.config[key].icon")
+ span.text-smm.font-medium {{ `${dataValue.value}º` }}
+ .flex.items-center.h-full.px-3.font-medium.text-smm.rounded(
+ v-if="dataValue.result || (data.key === 'tonometry' && dataValue.value)",
+ :style="{'background-color': 'var(--bg-light-grey)'}") {{ dataValue?.result || `${dataValue.value} ${data.config[key].shadowText}` }}
+ .flex.items-center.justify-center.rounded.w-8.h-full(
+ v-if="data.config[key].colorWarning(dataValue?.result || dataValue.value)",
+ :style="{'background-color': data.config[key].colorWarning(dataValue.result || dataValue.value), 'color': 'white'}")
+ q-icon(size="20px" name="warning_amber")
+
+
+
+
+
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 @@
-
- medical-form-wrapper(:title="data.title", :is-edit="isEdit", :open-edit="openEdit", :cancel="cancelEdit")
- .thermometry-wrapper.grid.gap-x-20.gap-y-5
- .flex.flex-col.gap-y-4.items-start(v-if="isEdit" v-for="(thermometry, key) in protocol[data.key]")
- span.font-semibold.text-smm {{ data.config.temperature[key].title }}
- base-input-number.w-full(
- v-model="thermometry.temperature",
- :step="1",
- :min="1",
- :max="100",
- reverse-value
- label="Температура",
- outlined,
- shadow-text="º"
- placeholder="0º"
- )
- .flex.flex-col.gap-y-2.w-full
- base-input.w-full(
- v-model="thermometry.result",
- label="Результат"
- outlined
- text-color="black"
- placeholder="Введите диагноз..."
- )
- .results-wrapper.flex.flex-col.rounded.w-full.px-4.py-2
- .result.flex.w-full.justify-between.items-center.h-9(v-for="result in data.config.results")
- .flex.gap-x-4
- q-radio(
- v-model="thermometry.result"
- :val="result.value"
- :label="result.value"
- size="40px"
- dense
- checked-icon="check_box"
- unchecked-icon="check_box_outline_blank"
- )
- .alert-icon.flex.justify-center.items-center.rounded.w-6.h-6(v-if="result.colorWarning")
- q-icon(size="13px" name="warning_amber")
- .flex.flex-col.gap-y-2.items-start(v-else)
- .flex.gap-x-1.h-8(v-for="(thermometry, key) in protocol[data.key]")
- .flex.h-full.w-20.justify-center.items-center.gap-x-1.rounded(
- :style="{'background-color': data.config.temperature[key].bg, 'color': data.config.temperature[key].color}"
- )
- q-icon(size="18px", :name="data.config.temperature[key].icon")
- span.text-smm.font-medium {{ `${thermometry.temperature}º` }}
- .flex.items-center.h-full.px-3.font-medium.text-smm.rounded(
- v-if="thermometry.result",
- :style="{'background-color': 'var(--bg-light-grey)'}") {{ thermometry.result }}
- .flex.items-center.justify-center.rounded.w-8.h-full(
- v-if="data.config.results.find((el) => el.value === thermometry.result)?.colorWarning",
- :style="{'background-color': data.config.results.find((el) => el.value === thermometry.result).colorWarning, 'color': 'white'}")
- q-icon(size="20px" name="warning_amber")
-
-
-
-
-
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,
+ },
+ },
},
});