Merge branch 'ASTRA-121' into 'master'

Resolve ASTRA-121

See merge request andrusyakka/urban-couscous!444
This commit is contained in:
Vasiliy Gavrilin
2023-06-26 14:35:20 +00:00
6 changed files with 133 additions and 90 deletions

View File

@@ -4,15 +4,16 @@
:is-edit="change",
:open-edit="openCard",
:cancel="closeCard",
:tag="fillInspection || change"
:tag="fillInspection || change",
template
)
.protocol-body.flex.flex-col
.flex.gap-x-4(:style="{height: change || fillInspection ? '300px' : ''}")
.flex.flex-col.gap-y-1(:class="{'edit-form': change || fillInspection}")
.tag-wrap.flex.gap-x-1.gap-y-1(v-if="!fillInspection && selected")
.tag-wrap.flex.gap-x-1.gap-y-1
.tag.flex.items-center.px-3.text-smm(
v-if="selected",
v-for="item in selected",
v-if="protocolData[data.state]",
v-for="item in protocolData[data.state]",
:key="item.id"
:class="{'pointer': change || fillInspection}"
) {{item.label + " - " + item.text}}
@@ -39,12 +40,7 @@
.field.flex.flex-col.overflow-y-scroll.gap-y-1(v-if="data.results.diseases")
.letter.flex.items-center.font-bold.text-base Некоторые инфекционные и паразитарные болезни
.checkbox.flex.gap-x-2.items-center(v-for="disease in data.results.diseases")
q-checkbox(
dense,
v-model="selected",
:val="disease",
:style="{border: 'none', width: '16px', height: '16px'}"
)
q-checkbox(dense, v-model="protocolData[data.state]", :val="disease")
.name.font-semibold.text-smm {{ disease.label }}
.name.font-medium.text-smm {{ disease.text }}
</template>
@@ -53,6 +49,7 @@
import BaseButton from "@/components/base/BaseButton.vue";
import BaseInput from "@/components/base/BaseInput.vue";
import MedicalFormWrapper from "@/pages/newMedicalCard/components/MedicalFormWrapper.vue";
import { mapState } from "vuex";
export default {
name: "ClinicalForm",
@@ -61,9 +58,13 @@ export default {
data() {
return {
change: false,
selected: [{ id: 0, label: "В00.09", text: "Простой герпес" }],
};
},
computed: {
...mapState({
protocolData: (state) => state.medical.protocolData,
}),
},
methods: {
openCard() {
this.change = true;
@@ -72,6 +73,14 @@ export default {
this.change = false;
},
},
watch: {
fillInspection: {
immediate: true,
handler(newVal) {
if (newVal) this.change = false;
},
},
},
};
</script>

View File

@@ -9,7 +9,7 @@
)
.disease-body.flex
.flex.flex-col.gap-y-17px.w-full(v-if="fillInspection || change")
.flex.-ml-2
.flex.-ml-2(v-if="data.key === 'disease'")
q-checkbox.text-smm.font-medium(v-model="data.results.checked" label="Без особенностей" size="36px")
.textarea.flex.w-full
base-input.w-full(
@@ -78,14 +78,19 @@ export default {
immediate: true,
handler(newVal) {
if (newVal) {
this.change = true;
this.change = false;
this.modelValue = null;
} else {
this.change = false;
this.modelValue = this.state;
}
},
},
modelValue: {
immediate: true,
handler(value) {
this.protocolData[this.data.state] = value;
},
},
},
};
</script>

View File

@@ -8,13 +8,13 @@
)
.protocol-body.flex.flex-col
.flex.gap-x-4(:style="{height: change || fillInspection ? '300px' : ''}")
.flex.flex-col.gap-y-1(:class="{'open-textarea': change || fillInspection}")
.flex.flex-col.gap-y-1.overflow-y-auto(:class="{'open-textarea': change || fillInspection}")
.tag-wrap.flex.gap-x-1.gap-y-1(v-if="!fillInspection")
.tag.flex.items-center.px-3.text-smm(
v-for="tag in data.results.tags",
v-for="tag in protocolData[data.state]",
:key="tag.id"
:class="{'pointer': change || fillInspection}"
) {{tag.label}}
) {{tag}}
base-input.px-3(v-if="change || fillInspection", type="textarea", autogrow, borderless, placeholder="Введите жалобу...")
.filter.flex.flex-col.gap-y-4.relative(v-if="change || fillInspection")
.flex.gap-x-2
@@ -36,17 +36,17 @@
:style="{width: '40px', height: '40px', color: 'var(--font-grey-color)'}",
padding="0"
)
.field.flex.flex-col.overflow-y-scroll(v-if="data.results.complaints")
.checkbox.flex.flex-col(v-for="complaint in textSorting(data.results.complaints)")
.field.flex.flex-col.overflow-y-scroll(v-if="data.results.tags")
.checkbox.flex.flex-col(v-for="complaint in textSorting(data.results.tags)")
.letter.flex.items-center.font-bold.justify-center {{ complaint.sym }}
.line.flex.gap-x-4.h-9.items-center(v-for="name in complaint?.array")
.line.flex.gap-x-4.h-9.items-center(:key="name.id", v-for="name in complaint.array")
q-checkbox(
dense,
v-model="selected",
:val="name?.label",
v-model="protocolData[data.state]",
:val="name",
:style="{border: 'none', width: '16px', height: '16px'}"
)
.name.flex.items-center.font-medium.text-smm {{ name?.label }}
.name.flex.items-center.font-medium.text-smm {{ name }}
.flex.h-10.w-10.absolute.right-4.bottom-4
q-btn(color="primary", dense, padding="4px 12px")
q-icon(name="app:icon-plus", size="17px")
@@ -60,6 +60,7 @@
import BaseButton from "@/components/base/BaseButton.vue";
import BaseInput from "@/components/base/BaseInput.vue";
import MedicalFormWrapper from "@/pages/newMedicalCard/components/MedicalFormWrapper.vue";
import { mapState } from "vuex";
export default {
name: "MedicalFormTag",
@@ -68,24 +69,30 @@ export default {
data() {
return {
change: false,
selected: [],
};
},
computed: {
...mapState({
protocolData: (state) => state.medical.protocolData,
}),
},
methods: {
textSorting(arr) {
let srt = [];
let sortArr = [];
this.abc.forEach((letter) => {
arr.forEach((str) => {
let finded = srt.find((obj) => obj.sym === letter);
if (str.label[0] === letter) {
let finded = sortArr.find((obj) => obj.sym === letter);
if (str[0] === letter) {
if (!finded) {
srt.push({ sym: letter, array: [{ label: str.label }] });
} else if (finded.sym === letter)
finded.array.push({ label: str.label });
sortArr.push({
sym: letter,
array: [str],
});
} else if (finded.sym === letter) finded.array.push(str);
}
});
});
return srt;
return sortArr;
},
openCard() {
this.change = true;

View File

@@ -22,7 +22,6 @@
:style="{width: '40px', height: '40px', color: 'var(--font-grey-color)'}",
padding="0"
)
div(v-for="form in protocolForms", :key="form.key", v-if="inspection || fillInspection")
component(v-bind:is="form.component", :data="form", :fill-inspection="fillInspection", :abc="abc")
.protocol.flex.justify-between.p-6(v-if="fillInspection")
@@ -44,6 +43,8 @@ import MainFactorsForm from "@/pages/newMedicalCard/components/InitialInspection
import ToothFormulaForm from "@/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue";
import { protocolForms } from "@/pages/newMedicalCard/utils/medicalConfig.js";
import ClinicalForm from "./Forms/ClinicalForm.vue";
import { mapGetters, mapState } from "vuex";
export default {
name: "MedicalProtocolsInspection",
components: {
@@ -101,6 +102,14 @@ export default {
],
};
},
computed: {
...mapState({
protocolData: (state) => state.medical.protocolData,
}),
...mapGetters({
protocolDataGet: "getInitProtocol",
}),
},
};
</script>

View File

@@ -601,21 +601,12 @@ export const protocolForms = [
state: "complaints",
results: {
tags: [
{ id: 1, label: "Боль при приеме сладкой пищи" },
{ id: 2, label: "Жжение языка" },
{ id: 3, label: "Кровоточивость десен" },
{ id: 4, label: "Лечение у ортодонта не проводилось" },
{ id: 5, label: "Ранее зубы лечили в ЛПУ" },
{ id: 6, label: "Удаление зуба" },
],
complaints: [
{ id: 1, label: "Ранее зубы лечили в ЛПУ" },
{ id: 2, label: "Жжение языка" },
{ id: 3, label: "Кровоточивость десен" },
{ id: 4, label: "Лечение у ортодонта не проводилось" },
{ id: 5, label: "Кровоточивость зуба" },
{ id: 6, label: "Боль при приеме сладкой пищи" },
{ id: 7, label: "Удаление зуба" },
"Боль при приеме сладкой пищи",
"Жжение языка",
"Кровоточивость десен",
"Лечение у ортодонта не проводилось",
"Ранее зубы лечили в ЛПУ",
"Удаление зуба",
],
},
},
@@ -626,13 +617,11 @@ export const protocolForms = [
state: "anamnesis",
results: {
tags: [
{ id: 1, label: "Ребенок на боль в зубах не жаловался" },
{ id: 2, label: "Ранее зубы лечили в ЛПУ" },
],
complaints: [
{ id: 1, label: "Лечение у ортодонта не проводилось" },
{ id: 2, label: "Налет появился год назад" },
{ id: 3, label: "Ребенок отказывается от еды" },
"Ребенок на боль в зубах не жаловался",
"Ранее зубы лечили в ЛПУ",
"Лечение у ортодонта не проводилось",
"Налет появился год назад",
"Ребенок отказывается от еды",
],
},
},
@@ -642,12 +631,12 @@ export const protocolForms = [
key: "illnesses",
state: "illnesses",
results: {
tags: [{ id: 1, label: "Стоматит в 2022" }],
complaints: [
{ id: 1, label: "Абсцесс Броди" },
{ id: 2, label: "Абсцесс мягких тканей" },
{ id: 3, label: "Абсцесс печени" },
{ id: 4, label: "Авитаминоз" },
tags: [
"Стоматит в 2022",
"Абсцесс Броди",
"Абсцесс мягких тканей",
"Абсцесс печени",
"Авитаминоз",
],
},
},
@@ -658,15 +647,13 @@ export const protocolForms = [
state: "medications",
results: {
tags: [
{ id: 1, label: "Цитрамон" },
{ id: 2, label: "Нафтизин" },
],
complaints: [
{ id: 1, label: "А-Пар " },
{ id: 2, label: "А-Церумен" },
{ id: 3, label: "Абаджио" },
{ id: 4, label: "Багомед" },
{ id: 5, label: "Багомед плюс" },
"Цитрамон",
"Нафтизин",
"А-Пар ",
"А-Церумен",
"Абаджио",
"Багомед",
"Багомед плюс",
],
},
},
@@ -761,14 +748,12 @@ export const protocolForms = [
state: "inspection",
results: {
tags: [
{ id: 1, label: "Без особенностей" },
{ id: 2, label: "Гематома на щеке" },
{ id: 3, label: "Киста в глазу" },
],
complaints: [
{ id: 1, label: "Красные пятна на языке" },
{ id: 2, label: "Фингал под глазом" },
{ id: 3, label: "Гематома на щеке" },
"Без особенностей",
"Гематома на щеке",
"Киста в глазу",
"Красные пятна на языке",
"Фингал под глазом",
"Гематома на щеке",
],
},
},
@@ -779,14 +764,12 @@ export const protocolForms = [
state: "cavity",
results: {
tags: [
{ id: 1, label: "Кариес" },
{ id: 2, label: "Отек десны" },
{ id: 3, label: "2 искусственных зуба" },
],
complaints: [
{ id: 1, label: "Без особенностей" },
{ id: 2, label: "Громадная язва" },
{ id: 3, label: "Кариес" },
"Кариес",
"Отек десны",
"2 искусственных зуба",
"Без особенностей",
"Громадная язва",
"Кариес",
],
},
},
@@ -1230,6 +1213,15 @@ export const protocolForms = [
if (roundedVal >= 6 && roundedVal <= 10) return "var(--border-red-color)";
},
},
{
title: "Предварительный диагноз",
component: "DiseaseForm",
key: "preliminary",
state: "preliminary",
results: {
text: "Средний кариес 36-го зуба (II класс по Блэку)",
},
},
{
title: "План обследования",
component: "MedicalFormTag",
@@ -1240,11 +1232,7 @@ export const protocolForms = [
{ id: 1, label: "Общий анализ крови" },
{ id: 2, label: "Консультация узкого специалиста" },
{ id: 3, label: "2 искусственных зуба" },
],
complaints: [
{ id: 1, label: "Биохимический анализ крови" },
{ id: 2, label: "Консультация узкого специалиста" },
{ id: 3, label: "Общий анализ крови" },
{ id: 4, label: "Биохимический анализ крови" },
],
},
},

View File

@@ -326,11 +326,26 @@ const getters = {
},
getProtocolData() {
return {
complaints: ["Боль при приеме сладкой пищи"],
anamnesis: [
"Ребенок на боль в зубах не жаловался",
"Ранее зубы лечили в ЛПУ",
],
illnesses: ["Стоматит в 2022"],
medications: ["Цитрамон", "Нафтизин"],
inspection: ["Без особенностей", "Гематома на щеке", "Киста в глазу"],
cavity: ["Кариес", "Отек десны", "2 искусственных зуба"],
survey: [
"Общий анализ крови",
"Консультация узкого специалиста",
"2 искусственных зуба",
],
bite: "distal bite",
hygieneIndex: 2,
KPUIndex: 6.1,
disease:
"Пациенту 20 лет. Неделю назад металлокерамический мостовидный протез с опорами на зубы 4.3 и 4.6 зафиксирован на временный цемент. Во время ортопедического лечения интактные зубы 4.3 и 4.6 были препарированы под местной анестезией, после препарирования зубы были защищены временным пластмассовым мостовидным протезом, боли в это время пациент не ощущал. Ноющая боль появилась на второй день после фиксации металлокерамического зубного протеза на временный цемент, интенсивность боли постепенно нарастает, усиливается от холодного. Пациент точно указывает, что боль локализуется в области зуба 4.3",
preliminary: "Средний кариес 36-го зуба (II класс по Блэку)",
thermometry: {
cold: {
value: 22,
@@ -353,10 +368,18 @@ const getters = {
lacticBite: toothFormula.state.lacticBite,
formula: toothFormula.state.formula,
},
clinical: [{ id: 0, label: "В00.09", text: "Простой герпес" }],
};
},
getInitProtocol() {
return {
complaints: [],
anamnesis: [],
illnesses: [],
medications: [],
inspection: [],
cavity: [],
survey: [],
bite: null,
hygieneIndex: null,
KPUIndex: null,
@@ -379,10 +402,12 @@ const getters = {
},
},
disease: null,
preliminary: null,
toothFormula: {
lacticBite: toothFormula.stateInit.lacticBite,
formula: toothFormula.stateInit.formula,
},
clinical: [],
};
},
};