import { ruleLengthValue, ruleEmailValue } from "@/shared/utils/rulesInputs"; export const baseDataForm = [ { dataLabel: "Личные данные", dataKey: "personalData", fields: [ { key: "last_name", label: "Фамилия", type: "text", }, { key: "first_name", label: "Имя", type: "text", }, { key: "patronymic", label: "Отчество", type: "text", }, { key: "gender", label: "Пол", type: "select", }, { key: "birth_date", label: "Дата рождения", type: "date", }, { key: "photo", label: "Фото", type: "avatar", }, ], }, { dataLabel: "Адрес регистрации", dataKey: "registrationAddress", fields: [ { key: "region", label: "Регион", type: "text", }, { key: "city", label: "Город", type: "text", }, { key: "street", label: "Улица", type: "text", }, { key: "house_number", label: "Дом", type: "text", rules: [(val) => !/^[\W0]/.test(val)], }, { key: "apartment_number", label: "Квартира", type: "text", rules: [(val) => !/^[\W0]/.test(val)], }, ], }, { dataLabel: "Адрес проживания", dataKey: "residenceAddress", fields: [ { key: "region", label: "Регион", type: "text", }, { key: "city", label: "Город", type: "text", }, { key: "street", label: "Улица", type: "text", }, { key: "house_number", label: "Дом", type: "text", rules: [(val) => !/^[\W0]/.test(val)], }, { key: "apartment_number", label: "Квартира", type: "text", rules: [(val) => !/^[\W0]/.test(val)], }, ], }, ]; export const mapNetworks = { VK: { title: "VK", icon: "app:icon-vk", network: "VK", }, TELEGRAM: { title: "Telegram", icon: "app:icon-tg", network: "TELEGRAM", }, GMAIL: { title: "Gmail", icon: "app:icon-google", network: "GMAIL", }, SLACK: { title: "Slack", icon: "app:icon-slack", network: "SLACK", markerLink: "slack", }, DISCORD: { title: "Discord", icon: "app:icon-discord", network: "DISCORD", }, VIBER: { title: "Viber", icon: "wifi_calling_3", network: "VIBER", }, WHATS_APP: { title: "WhatsApp", icon: "call", network: "WHATS_APP", }, }; export const contactsDataForm = { phones: { title: "Телефон", fieldName: "Телефон", kind: "PHONE", rules: [(val) => ruleLengthValue(val, 18)], inputMask: "+7 (###) ###-##-##", }, emails: { title: "Почта", fieldName: "Email", rules: [(val) => ruleEmailValue(val)], kind: "EMAIL", }, networks: { title: "Социальные сети", fieldName: "Соцсеть", }, }; export const genderOptions = [ { id: "MALE", label: "Мужской", }, { id: "WOMEN", label: "Женский", }, ]; export const headerMenuItem = [ { title: "Общая информация", id: "basic", component: "MedicalBaseInfo", }, { title: "Журнал посещений", id: "session-log", component: "SessionLog", }, { title: "Планы лечения", id: "treatment-plans", component: "TreatmentPlans", }, { title: "Статистика", id: "statistics", component: "Statistics", }, { title: "История контактов", id: "contact-history", component: "ContactHistory", }, ]; export const baseInfoMenu = [ { title: "Основные данные", id: "basic-data", component: "MedicalBasicDataWrapper", }, { title: "Протоколы первичного осмотра", id: "protocols", component: "Protocols", }, { title: "Доверенное лицо", id: "trusted-person", component: "TrustedPerson", }, { title: "Аллергии", id: "allergies", component: "MedicalAllergiesWrapper", }, { title: "Состояние здоровья", id: "health-status", component: "HealthStatus", }, { title: "История болезней", id: "medical-history", component: "MedicalHistory", }, { title: "Зубная формула", id: "dental-formula", component: "DentalFormula", }, ]; export const baseInsuranceForm = [ { insuranceLabel: "ДМС", insuranceKey: "insuranceDMS", fields: [ { key: "series", label: "Серия", type: "text", inputMask: "####", }, { key: "number", label: "Номер", type: "text", inputMask: "####-####-####", }, { key: "photo", label: "Фото ДМС", type: "avatar", }, ], }, { insuranceLabel: "ОМС", insuranceKey: "insuranceOMS", fields: [ { key: "series", label: "Серия", type: "text", inputMask: "####", }, { key: "number", label: "Номер", type: "text", inputMask: "####-####-####", }, { key: "photo", label: "Фото ОМС", type: "avatar", }, ], }, { insuranceLabel: "Категория льготы", insuranceKey: "benefit", discount: "discount", fields: [ { key: "name", label: "Категория", type: "select", }, { key: "photo", label: "Документы", type: "avatar", }, ], }, ]; export const routesDictionary = { "/clients": "Клиенты", "/calendar": "Календарь", "/medical-card": "Медкарта", }; export const documentForm = [ { dataLabel: "Паспорт", dataKey: "passport", fields: [ { key: "series", label: "Серия", type: "text", inputMask: "####", checkField: (field) => { return field.length === 4; }, errorMessage: { title: "Ошибка валидации", message: "Серия паспорта заполнена неправильно", }, }, { key: "number", label: "Номер", type: "text", inputMask: "######", checkField: (field) => { return field.length === 6; }, errorMessage: { title: "Ошибка валидации", message: "Номер паспорта заполнен неправильно", }, }, { key: "issued_by_org", label: "Кем выдан", type: "text", }, { key: "issued_by_org_code", label: "Код подраздел.", type: "text", inputMask: "###-###", checkField: (field) => { return field.length === 7; }, errorMessage: { title: "Ошибка валидации", message: "Код подразделения заполнен неправильно", }, }, { key: "issued_by_date", label: "Дата выдачи", type: "date", }, { key: "photo", label: "Фото паспорта", type: "photo", }, ], }, { dataLabel: "СНИЛС", dataKey: "insurance_number", fields: [ { key: "insurance_number", label: "Номер СНИЛС", type: "text", inputMask: "###-###-### ##", checkField: (field) => { return field.length === 14; }, errorMessage: { title: "Ошибка валидации", message: "СНИЛС заполнен неправильно", }, }, { key: "photo_insurance_number", label: "Фото СНИЛС", type: "photo", }, ], }, { dataLabel: "ИНН", dataKey: "tax_identification_number", fields: [ { key: "tax_identification_number", label: "Номер ИНН", type: "text", inputMask: "############", checkField: (field) => { return field.length === 12; }, errorMessage: { title: "Ошибка валидации", message: "ИНН заполнен неправильно", }, }, { key: "photo_tax_identification_number", label: "Фото ИНН", type: "photo", }, ], }, ];