From 297f11952b22e6aae99cfcc4e9f90206b2f4fce3 Mon Sep 17 00:00:00 2001 From: dderbentsov Date: Sun, 17 Sep 2023 14:10:31 +0300 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=20=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D1=80=D1=8B=D0=B5=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/oldCalendar/TheCalendar.vue | 189 ----- .../components/CalendarBackground.vue | 59 -- .../components/CalendarClockColumn.vue | 63 -- .../oldCalendar/components/CalendarColumn.vue | 259 ------- .../CalendarColumnHeaderCheckbox.vue | 42 -- .../components/CalendarDeleteModal.vue | 78 --- .../components/CalendarEventCard.vue | 348 ---------- .../CalendarEventDescriptionCard.vue | 214 ------ .../components/CalendarFormAddEvent.vue | 648 ------------------ .../oldCalendar/components/CalendarHeader.vue | 124 ---- .../components/CalendarLayoutSwitch.vue | 52 -- .../components/CalendarSchedule.vue | 424 ------------ .../components/CalendarSidebar.vue | 113 --- .../components/CalendarSidebarEvent.vue | 82 --- .../components/CalendarSidebarTeammate.vue | 86 --- src/pages/oldCalendar/utils/statusesConfig.js | 44 -- src/pages/oldMedicalCard/TheMedicalCard.vue | 13 - .../components/MedicalBaseData.vue | 92 --- .../components/MedicalCardHeader.vue | 29 - .../components/MedicalCardWrapper.vue | 429 ------------ .../components/MedicalDentalFormula.vue | 50 -- .../components/MedicalFormulaTable.vue | 48 -- .../components/MedicalIdentityDocuments.vue | 47 -- .../components/MedicalPolicyDocuments.vue | 93 --- .../oldMedicalCard/utils/medicalConfig.js | 449 ------------ .../utils/wrapperMedicalCard.js | 226 ------ 26 files changed, 4301 deletions(-) delete mode 100644 src/pages/oldCalendar/TheCalendar.vue delete mode 100644 src/pages/oldCalendar/components/CalendarBackground.vue delete mode 100644 src/pages/oldCalendar/components/CalendarClockColumn.vue delete mode 100644 src/pages/oldCalendar/components/CalendarColumn.vue delete mode 100644 src/pages/oldCalendar/components/CalendarColumnHeaderCheckbox.vue delete mode 100644 src/pages/oldCalendar/components/CalendarDeleteModal.vue delete mode 100644 src/pages/oldCalendar/components/CalendarEventCard.vue delete mode 100644 src/pages/oldCalendar/components/CalendarEventDescriptionCard.vue delete mode 100644 src/pages/oldCalendar/components/CalendarFormAddEvent.vue delete mode 100644 src/pages/oldCalendar/components/CalendarHeader.vue delete mode 100644 src/pages/oldCalendar/components/CalendarLayoutSwitch.vue delete mode 100644 src/pages/oldCalendar/components/CalendarSchedule.vue delete mode 100644 src/pages/oldCalendar/components/CalendarSidebar.vue delete mode 100644 src/pages/oldCalendar/components/CalendarSidebarEvent.vue delete mode 100644 src/pages/oldCalendar/components/CalendarSidebarTeammate.vue delete mode 100644 src/pages/oldCalendar/utils/statusesConfig.js delete mode 100644 src/pages/oldMedicalCard/TheMedicalCard.vue delete mode 100644 src/pages/oldMedicalCard/components/MedicalBaseData.vue delete mode 100644 src/pages/oldMedicalCard/components/MedicalCardHeader.vue delete mode 100644 src/pages/oldMedicalCard/components/MedicalCardWrapper.vue delete mode 100644 src/pages/oldMedicalCard/components/MedicalDentalFormula.vue delete mode 100644 src/pages/oldMedicalCard/components/MedicalFormulaTable.vue delete mode 100644 src/pages/oldMedicalCard/components/MedicalIdentityDocuments.vue delete mode 100644 src/pages/oldMedicalCard/components/MedicalPolicyDocuments.vue delete mode 100644 src/pages/oldMedicalCard/utils/medicalConfig.js delete mode 100644 src/pages/oldMedicalCard/utils/wrapperMedicalCard.js diff --git a/src/pages/oldCalendar/TheCalendar.vue b/src/pages/oldCalendar/TheCalendar.vue deleted file mode 100644 index 6a6fd5b..0000000 --- a/src/pages/oldCalendar/TheCalendar.vue +++ /dev/null @@ -1,189 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarBackground.vue b/src/pages/oldCalendar/components/CalendarBackground.vue deleted file mode 100644 index 9c87afc..0000000 --- a/src/pages/oldCalendar/components/CalendarBackground.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarClockColumn.vue b/src/pages/oldCalendar/components/CalendarClockColumn.vue deleted file mode 100644 index 0441973..0000000 --- a/src/pages/oldCalendar/components/CalendarClockColumn.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarColumn.vue b/src/pages/oldCalendar/components/CalendarColumn.vue deleted file mode 100644 index 2ec213f..0000000 --- a/src/pages/oldCalendar/components/CalendarColumn.vue +++ /dev/null @@ -1,259 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarColumnHeaderCheckbox.vue b/src/pages/oldCalendar/components/CalendarColumnHeaderCheckbox.vue deleted file mode 100644 index 8ec28e7..0000000 --- a/src/pages/oldCalendar/components/CalendarColumnHeaderCheckbox.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarDeleteModal.vue b/src/pages/oldCalendar/components/CalendarDeleteModal.vue deleted file mode 100644 index d59ee3c..0000000 --- a/src/pages/oldCalendar/components/CalendarDeleteModal.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarEventCard.vue b/src/pages/oldCalendar/components/CalendarEventCard.vue deleted file mode 100644 index 18c8d51..0000000 --- a/src/pages/oldCalendar/components/CalendarEventCard.vue +++ /dev/null @@ -1,348 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarEventDescriptionCard.vue b/src/pages/oldCalendar/components/CalendarEventDescriptionCard.vue deleted file mode 100644 index 51ac05f..0000000 --- a/src/pages/oldCalendar/components/CalendarEventDescriptionCard.vue +++ /dev/null @@ -1,214 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarFormAddEvent.vue b/src/pages/oldCalendar/components/CalendarFormAddEvent.vue deleted file mode 100644 index f88d92c..0000000 --- a/src/pages/oldCalendar/components/CalendarFormAddEvent.vue +++ /dev/null @@ -1,648 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarHeader.vue b/src/pages/oldCalendar/components/CalendarHeader.vue deleted file mode 100644 index 42547ac..0000000 --- a/src/pages/oldCalendar/components/CalendarHeader.vue +++ /dev/null @@ -1,124 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarLayoutSwitch.vue b/src/pages/oldCalendar/components/CalendarLayoutSwitch.vue deleted file mode 100644 index 762f6e6..0000000 --- a/src/pages/oldCalendar/components/CalendarLayoutSwitch.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarSchedule.vue b/src/pages/oldCalendar/components/CalendarSchedule.vue deleted file mode 100644 index e5e63c3..0000000 --- a/src/pages/oldCalendar/components/CalendarSchedule.vue +++ /dev/null @@ -1,424 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarSidebar.vue b/src/pages/oldCalendar/components/CalendarSidebar.vue deleted file mode 100644 index 65535d6..0000000 --- a/src/pages/oldCalendar/components/CalendarSidebar.vue +++ /dev/null @@ -1,113 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarSidebarEvent.vue b/src/pages/oldCalendar/components/CalendarSidebarEvent.vue deleted file mode 100644 index 310c7f1..0000000 --- a/src/pages/oldCalendar/components/CalendarSidebarEvent.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/components/CalendarSidebarTeammate.vue b/src/pages/oldCalendar/components/CalendarSidebarTeammate.vue deleted file mode 100644 index e9ed9b5..0000000 --- a/src/pages/oldCalendar/components/CalendarSidebarTeammate.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - - - diff --git a/src/pages/oldCalendar/utils/statusesConfig.js b/src/pages/oldCalendar/utils/statusesConfig.js deleted file mode 100644 index cc13253..0000000 --- a/src/pages/oldCalendar/utils/statusesConfig.js +++ /dev/null @@ -1,44 +0,0 @@ -export const statusesConfig = [ - { - id: 0, - label: "Планируется прием", - value: "PLANNED", - color: "var(--default-white)", - }, - { - id: 1, - label: "Отменил", - value: "CANCELED", - color: "var(--bg-event-grey-color)", - }, - { - id: 2, - label: "Ожидается прием", - value: "EXPECTED", - color: "var(--bg-event-yellow-color)", - }, - { - id: 3, - label: "Опаздывает", - value: "LATE", - color: "var(--bg-event-orange-color)", - }, - { - id: 4, - label: "Идет прием", - value: "RECEPTION", - color: "var(--bg-event-blue-color)", - }, - { - id: 5, - label: "Прием завершен", - value: "COMPLETED", - color: "var(--bg-event-green-color)", - }, - { - id: 6, - label: "Не пришел", - value: "DID_NOT_COME", - color: "var(--bg-event-red-color)", - }, -]; diff --git a/src/pages/oldMedicalCard/TheMedicalCard.vue b/src/pages/oldMedicalCard/TheMedicalCard.vue deleted file mode 100644 index da36529..0000000 --- a/src/pages/oldMedicalCard/TheMedicalCard.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/src/pages/oldMedicalCard/components/MedicalBaseData.vue b/src/pages/oldMedicalCard/components/MedicalBaseData.vue deleted file mode 100644 index 627e887..0000000 --- a/src/pages/oldMedicalCard/components/MedicalBaseData.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - - - diff --git a/src/pages/oldMedicalCard/components/MedicalCardHeader.vue b/src/pages/oldMedicalCard/components/MedicalCardHeader.vue deleted file mode 100644 index 43b271b..0000000 --- a/src/pages/oldMedicalCard/components/MedicalCardHeader.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/src/pages/oldMedicalCard/components/MedicalCardWrapper.vue b/src/pages/oldMedicalCard/components/MedicalCardWrapper.vue deleted file mode 100644 index 6692a78..0000000 --- a/src/pages/oldMedicalCard/components/MedicalCardWrapper.vue +++ /dev/null @@ -1,429 +0,0 @@ - - - - - diff --git a/src/pages/oldMedicalCard/components/MedicalDentalFormula.vue b/src/pages/oldMedicalCard/components/MedicalDentalFormula.vue deleted file mode 100644 index 01e5908..0000000 --- a/src/pages/oldMedicalCard/components/MedicalDentalFormula.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - diff --git a/src/pages/oldMedicalCard/components/MedicalFormulaTable.vue b/src/pages/oldMedicalCard/components/MedicalFormulaTable.vue deleted file mode 100644 index 9f4f9ed..0000000 --- a/src/pages/oldMedicalCard/components/MedicalFormulaTable.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - - - diff --git a/src/pages/oldMedicalCard/components/MedicalIdentityDocuments.vue b/src/pages/oldMedicalCard/components/MedicalIdentityDocuments.vue deleted file mode 100644 index 51a400d..0000000 --- a/src/pages/oldMedicalCard/components/MedicalIdentityDocuments.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - diff --git a/src/pages/oldMedicalCard/components/MedicalPolicyDocuments.vue b/src/pages/oldMedicalCard/components/MedicalPolicyDocuments.vue deleted file mode 100644 index 9a013d4..0000000 --- a/src/pages/oldMedicalCard/components/MedicalPolicyDocuments.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - diff --git a/src/pages/oldMedicalCard/utils/medicalConfig.js b/src/pages/oldMedicalCard/utils/medicalConfig.js deleted file mode 100644 index 0651b97..0000000 --- a/src/pages/oldMedicalCard/utils/medicalConfig.js +++ /dev/null @@ -1,449 +0,0 @@ -export const medicalDetailConfig = { - gendersList: [ - { - id: "1", - label: "Мужской", - value: "MALE", - }, - { - id: "2", - label: "Женский", - value: "WOMEN", - }, - ], - policiesList: [ - { - id: "1", - label: "Полис ОМС", - value: "OMS", - }, - { - id: "2", - label: "Полис ДМС", - value: "DMS", - }, - ], - identity_document: { - height: 316, - title: "Паспортные данные", - fields: [ - { - label: "number_series", - title: "Серия и номер", - type: "text", - mask: "#### ######", - copy: true, - }, - { - label: "issued_by_org", - title: "Выдан", - type: "textarea", - }, - { - label: "issued_by_org_code", - title: "Код подразделения", - type: "text", - mask: "###-###", - }, - { - label: "issued_by_date", - title: "Дата выдачи", - type: "date", - }, - ], - }, - registration_address: { - height: 85, - title: "Адрес регистрации", - fields: [ - { - label: "registration_address", - title: "Полный адрес", - type: "textarea", - }, - ], - }, - temporary_address: { - height: 85, - title: "Адрес проживания", - fields: [ - { - label: "temporary_address", - title: "Полный адрес", - type: "textarea", - }, - ], - }, - snils: { - height: 85, - title: "СНИЛС", - fields: [ - { - label: "insurance_number", - title: "Номер", - type: "text", - mask: "###-###-### ##", - copy: true, - }, - ], - }, - policy: { - height: 162, - title: "ПОЛИС", - fields: [ - { - label: "policy_series", - title: "Серия", - type: "text", - mask: "####", - }, - { - label: "policy_number", - title: "Номер", - type: "text", - mask: "#######", - }, - ], - }, - policy_organization: { - height: 85, - title: "Страховая организация", - fields: [ - { - label: "policy_organization", - title: "Название", - type: "text", - }, - ], - }, - additional: { - height: 218, - title: "Дополнительная информация", - fields: [ - { - icon: "icon-person", - label: "name_confidant", - title: "Доверенное лицо", - type: "text", - }, - { - icon: "icon-phone", - label: "phone_confidant", - title: "", - type: "text", - mask: "+7 (###) ###-##-##", - }, - { - label: "benefit_code", - title: "Код категории льготы", - type: "text", - mask: "###", - }, - ], - }, - agreement_form: { - height: 121, - title: - "Информированное добровольное согласие на виды медицинских вмешательств, включенные в Перечень определенных видов медицинских вмешательств:", - fields: [ - { - label: "agreement", - title: "Получено", - type: "radio", - items: [ - { - id: "1", - label: "Да", - value: true, - }, - { - id: "2", - label: "Нет", - value: false, - }, - ], - }, - { - label: "agreement_date", - title: "Дата", - type: "date", - }, - ], - }, - dental_indications: { - complaints: "Жалобы", - allergic: "Аллергологический анамнез", - past_diseases: "Перенесённые и сопутствующие заболевания", - medications_taken: "Принимаемые лекарственные препараты", - thermometry: "Термометрия (по показаниям)", - tonometry: "Тонометрия, ЧСС (по показаниям)", - disease_progress: "Развитие настоящего заболевания", - visual_examination: "Внешний осмотр", - oral_examination: "Осмотр преддверия и полости рта", - dental_formula: "Зубная формула", - dental_bite: "Прикус", - hygiene_index: "Индекс гигиены", - dmf_index: "Индекс КПУ", - diagnostic_findings: "Предварительный диагноз", - icd_code: "Код МКБ-10", - survey_plan: "План обследования", - survey_data: "Данные обследования", - clinical_diagnosis: "Клинический диагноз", - treatment_plan: "План лечения", - treatment_protocol: "Протокол лечения", - }, -}; - -export const dentalСonditionMap = [ - { - name: "К", - discription: "кариес", - }, - { - name: "П", - discription: "пульпит", - }, - { - name: "Пт", - discription: "периодонтит", - }, - { - name: "Д", - discription: "дефект", - }, - { - name: "Пл", - discription: "пломба", - }, - { - name: "Ик", - discription: "искусственная коронка", - }, - { - name: "Из", - discription: "искусственный зуб", - }, - { - name: "В", - discription: "вкладка", - }, - { - name: "И", - discription: "имплантат", - }, - { - name: "Кз", - discription: "корень зуба", - }, - { - name: "О", - discription: "отсутствующий зуб", - }, -]; - -export const mobilityMap = [ - { id: 1, label: "I" }, - { id: 2, label: "II" }, - { id: 3, label: "III" }, -]; - -export const formulaDataMap = [ - { - name: "upperJaw", - rowMap: [ - { - label: "Подвижность", - name: "tooth_mobility", - }, - { - label: "Cостояние зубов", - name: "dental_condition", - }, - { - label: "Верхняя челюсть", - name: "tooth_number", - }, - ], - columns: [ - { - tooth_number: 18, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 17, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 16, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 15, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 14, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 13, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 12, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 11, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 21, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 22, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 23, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 24, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 25, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 26, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 27, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 28, - dental_condition: "", - tooth_mobility: "", - }, - ], - }, - { - name: "lowerJaw", - rowMap: [ - { - label: "Нижняя челюсть", - name: "tooth_number", - }, - { - label: "Cостояние зубов", - name: "dental_condition", - }, - { - label: "Подвижность", - name: "tooth_mobility", - }, - ], - columns: [ - { - tooth_number: 48, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 47, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 46, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 45, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 44, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 43, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 42, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 41, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 31, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 32, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 33, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 34, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 35, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 36, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 37, - dental_condition: "", - tooth_mobility: "", - }, - { - tooth_number: 38, - dental_condition: "", - tooth_mobility: "", - }, - ], - }, -]; diff --git a/src/pages/oldMedicalCard/utils/wrapperMedicalCard.js b/src/pages/oldMedicalCard/utils/wrapperMedicalCard.js deleted file mode 100644 index ab6455a..0000000 --- a/src/pages/oldMedicalCard/utils/wrapperMedicalCard.js +++ /dev/null @@ -1,226 +0,0 @@ -import { fetchWrapper } from "@/shared/fetchWrapper"; -import moment from "moment"; -export function requestCreateMedicalCard(entry, key, id) { - const url = `medical_card/${key}/create/`; - let arrayValue; - if (["tonometry", "dental_bite", "dmf_index"].includes(key)) { - arrayValue = entry.split(","); - } - switch (key) { - case "complaints": - case "medications_taken": - case "disease_progress": - case "visual_examination": - case "diagnostic_findings": - case "survey_plan": - case "treatment_plan": - case "treatment_protocol": - return fetchWrapper.post(url, { - title: entry, - description: entry, - medical_history: id, - }); - case "thermometry": - return fetchWrapper.post(url, { - title: entry, - temperature: Number(entry), - medical_history: id, - }); - case "tonometry": - return fetchWrapper.post(url, { - title: entry, - sys: Number(arrayValue[0]), - dia: Number(arrayValue[1]), - pul: Number(arrayValue[2]), - medical_history: id, - }); - case "dental_bite": - return fetchWrapper.post(url, { - custom: arrayValue[0], - physiological: arrayValue[1], - abnormal: arrayValue[2], - medical_history: id, - }); - case "dmf_index": - return fetchWrapper.post(url, { - caries: Number(arrayValue[0]), - filling: Number(arrayValue[1]), - remote: Number(arrayValue[2]), - medical_history: id, - }); - case "clinical_diagnosis": - return fetchWrapper.post(url, { - title: entry, - description: "string", - medical_history: id, - icd10: id, - }); - case "dental_formula": - return fetchWrapper.post(url, { - ...entry, - tooth_mobility: entry.tooth_mobility ? entry.tooth_mobility.label : "", - tooth_number: entry.tooth_number, - medical_history: id, - }); - case "registration_address": - return fetchWrapper.post(`general/address/create/`, { - ...entry, - person: id, - registration_flg: true, - }); - case "temporary_address": - return fetchWrapper.post(`general/address/create/`, { - ...entry, - person: id, - temporary_registration_flg: true, - }); - case "identity_document": - return fetchWrapper.post(`general/identity_document/create/`, { - ...entry, - person: id, - }); - case "insurance_policy": - return fetchWrapper.post(`general/insurance_policy/create/`, { - ...entry, - title: "string", - person: id, - }); - } -} - -export function requestUpdateMedicalCard(entry, key, id) { - const url = `medical_card/${key}/${id}/update/`; - let arrayValue; - if (["tonometry", "dental_bite", "dmf_index"].includes(key)) { - arrayValue = entry.split(","); - } - switch (key) { - case "complaints": - case "medications_taken": - case "disease_progress": - case "visual_examination": - case "diagnostic_findings": - case "survey_plan": - case "treatment_plan": - case "treatment_protocol": - return fetchWrapper.post(url, { - title: entry, - description: entry, - }); - case "thermometry": - return fetchWrapper.post(url, { - title: entry, - temperature: Number(entry), - }); - case "tonometry": - return fetchWrapper.post(url, { - title: entry, - sys: Number(arrayValue[0]), - dia: Number(arrayValue[1]), - pul: Number(arrayValue[2]), - }); - case "dental_bite": - return fetchWrapper.post(url, { - custom: entry, - physiological: entry, - abnormal: entry, - }); - case "dmf_index": - return fetchWrapper.post(url, { - caries: Number(entry), - filling: Number(entry), - remote: Number(entry), - }); - case "clinical_diagnosis": - return fetchWrapper.post(url, { - title: entry, - description: "string", - icd10: id, - }); - case "dental_formula": - return fetchWrapper.post(url, { - ...entry, - tooth_mobility: entry.tooth_mobility ? entry.tooth_mobility.label : "", - tooth_number: entry.tooth_number, - }); - case "registration_address": - return fetchWrapper.post(`general/address/${id}/update/`, { - ...entry, - registration_flg: true, - }); - case "temporary_address": - return fetchWrapper.post(`general/address/${id}/update/`, { - ...entry, - temporary_registration_flg: true, - }); - case "identity_document": - return fetchWrapper.post(`general/identity_document/${id}/update/`, { - ...entry, - }); - case "insurance_policy": - return fetchWrapper.post(`general/insurance_policy/${id}/update/`, { - ...entry, - title: "string", - }); - case "person": - return fetchWrapper.post(`general/person/${id}/update/`, { - ...entry, - }); - } -} - -export function getRequestDataPerson(person, dental) { - const dataPersonRequest = { - identity_document: { - issued_by_org: person.issued_by_org, - issued_by_org_code: person.issued_by_org_code, - issued_by_date: moment(person.issued_by_date).format("YYYY-MM-DD"), - number: person.number_series.split(" ")[1], - series: person.number_series.split(" ")[0], - }, - registration_address: { - full_address: person.registration_address, - }, - temporary_address: { - full_address: person.temporary_address, - }, - insurance_policy: { - series: person.policy_series, - number: person.policy_number, - organization: person.policy_organization, - }, - person: { - insurance_number: person.insurance_number, - benefit_code: person.benefit_code, - allergic: dental.allergic, - }, - agreement: { - agreement: person.agreement, - }, - }; - return dataPersonRequest; -} -export function getDentalEntiesValue(data, key) { - switch (key) { - case "complaints": - case "medications_taken": - case "disease_progress": - case "visual_examination": - case "diagnostic_findings": - case "survey_plan": - case "treatment_plan": - case "treatment_protocol": - case "clinical_diagnosis": - return data?.description; - case "thermometry": - return `${data?.temperature}`; - case "tonometry": - return `${data?.sys},${data?.dia},${data?.pul}`; - case "dental_bite": - return `${data?.custom},${data?.physiological},${data?.abnormal}`; - case "dmf_index": - return data["index_calculation"]; - case "hygiene_index": - return data["index_calculation"]; - } -}