From 0a5634bb590fcf3935adfc8439022c0d51d2d652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D1=80=D0=BE=D0=B4=D0=B8=D0=BD=20=D0=A0=D0=BE?= =?UTF-8?q?=D0=BC=D0=B0=D0=BD?= Date: Tue, 5 Nov 2019 19:40:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BE=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5/=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5/=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D1=81=D0=BC=D0=BE=D1=82=D1=80=20=D0=BF=D0=B0=D1=86=D0=B8=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=B0.=20=D0=A7=D0=B0=D1=81=D1=82=D1=8C=20=D1=82?= =?UTF-8?q?=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=20=D0=BF=D1=80=D0=B8=D1=91=D0=BC?= =?UTF-8?q?=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 224 ++++++++-- mods/db.py | 41 +- res/icons/female.png | Bin 0 -> 375 bytes res/icons/male.png | Bin 0 -> 394 bytes res/ui/edit_patient_win.glade | 664 ++++++++++++++++++++++++++++ res/ui/error_win.glade | 36 ++ res/ui/female_patient_row.glade | 62 +++ res/ui/info_win.glade | 36 ++ res/ui/main_win.glade | 50 ++- res/ui/male_patient_row.glade | 61 +++ res/ui/new_patient_win.glade | 749 ++++++++++++++++++++++++-------- res/ui/open_patient_win.glade | 624 ++++++++++++++++++++++++++ res/ui/warn_win.glade | 36 ++ 13 files changed, 2359 insertions(+), 224 deletions(-) create mode 100644 res/icons/female.png create mode 100644 res/icons/male.png create mode 100644 res/ui/edit_patient_win.glade create mode 100644 res/ui/error_win.glade create mode 100644 res/ui/female_patient_row.glade create mode 100644 res/ui/info_win.glade create mode 100644 res/ui/male_patient_row.glade create mode 100644 res/ui/open_patient_win.glade create mode 100644 res/ui/warn_win.glade diff --git a/app.py b/app.py index 96751e3..bcaab78 100644 --- a/app.py +++ b/app.py @@ -2,14 +2,35 @@ import gi import os gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GObject -from mods.db import Patient, store_patient_index, search_patients, db +from mods.db import Patient, store_patient_index, update_patient_index, search_patients, db from datetime import date import peewee +gender_dict = { + 'male': 'Мужской', + 'female': 'Женский' + } +doc_type_dict = { + 'passport': 'Паспорт', + 'birth_cert': 'Св.о рождении', + 'foreign_passport': 'Паспорт иностранца' + } +# Variables resource_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'res') ui_dir = os.path.join(resource_dir, 'ui') +icon_dir = os.path.join(resource_dir, 'icons') main_win_file = os.path.join(ui_dir, 'main_win.glade') new_patient_win_file = os.path.join(ui_dir, 'new_patient_win.glade') +open_patient_win_file = os.path.join(ui_dir, 'open_patient_win.glade') +edit_patient_win_file = os.path.join(ui_dir, 'edit_patient_win.glade') +male_patient_row_file = os.path.join(ui_dir, 'male_patient_row.glade') +female_patient_row_file = os.path.join(ui_dir, 'female_patient_row.glade') +gender_ui_str = {} +with open(male_patient_row_file, 'r') as f: + gender_ui_str['male'] = f.read() +with open(female_patient_row_file, 'r') as f: + gender_ui_str['female'] = f.read() +############ builder = Gtk.Builder() @@ -30,10 +51,21 @@ class PatientRow(Gtk.ListBoxRow): @GObject.Property def db_id(self): return self._db_id - @db_id.setter - def my_custom_property(self, value): + def db_id_setter(self, value): self._db_id = value + @GObject.Property + def fio(self): + return self._fio + @fio.setter + def fio_setter(self, value): + self._fio = value + @GObject.Property + def birth_date(self): + return self._birth_date + @birth_date.setter + def birth_date_setter(self, value): + self._birth_date = value class MainWinHandler: def main_win_close(self, *args): @@ -41,9 +73,21 @@ class MainWinHandler: def show_new_patient_win(self, button): new_patient_win = create_new_patient_win() new_patient_win.show_all() + def show_open_patient_win(self, button): + pl = builder.get_object('patient_list') + row = pl.get_selected_row() + open_patient_win = create_open_patient_win(row.props.db_id) + open_patient_win.show_all() + def patient_list_selected(self, *a): + button = builder.get_object('patient_open_button') + button.set_sensitive(True) + def patient_list_unselected(self, *a): + button = builder.get_object('patient_open_button') + button.set_sensitive(False) def patient_filter_changed(self, filter_widget): pl = builder.get_object('patient_list') pl.unselect_all() + self.patient_list_unselected() pl.invalidate_filter() '''pl = builder.get_object('patient_list') for r in pl.get_children(): @@ -59,14 +103,26 @@ class MainWinHandler: pl.show_all()''' def build_patient_row(patient): + b = Gtk.Builder() + b.add_from_string(gender_ui_str[patient.gender]) + win = b.get_object('win') + box = b.get_object('patient_box') + icon = b.get_object('icon') + icon.set_from_file(os.path.join(icon_dir, f'{patient.gender}.png')) + fio = f'{" ".join([patient.last_name, patient.first_name, patient.middle_name])}' + b.get_object('fio').set_text(fio) + birth_date = patient.birth_date + b.get_object('birth_date').set_text(birth_date.strftime('%d.%m.%Y')) + win.remove(win.get_children()[0]) row = PatientRow() row.props.db_id = patient.id - label = Gtk.Label(f'{" ".join([patient.last_name, patient.first_name, patient.middle_name])}, {patient.birth_date}', xalign=0) - row.add(label) + row.props.fio = fio + row.props.birth_date = birth_date + row.add(box) return row def patient_sort_func(row1, row2, *a): - text1 = row1.get_children()[0].get_text() - text2 = row2.get_children()[0].get_text() + text1 = row1.props.fio + text2 = row2.props.fio return (text1 > text2) - (text1 < text2) def patient_filter_func(row): fstr = builder.get_object('patient_filter').get_text().strip() @@ -94,6 +150,130 @@ def show_msg(text, sec_text='', level='info'): w.run() w.close() +def get_patient_win_values(b): + l_name = b.get_object('last_name').get_text().replace(' ', '') + f_name = b.get_object('first_name').get_text().replace(' ', '') + m_name = b.get_object('middle_name').get_text().replace(' ', '') + if '' in (l_name, f_name): + show_msg('Не указаны имя или фамилия', 'Данные поля должны быть заполнены', level='warn') + return None + try: + birth_d = int(b.get_object('birth_day').get_text()) + if birth_d < 1 or birth_d > 31: + return show_msg('Неверный день месяца', 'Укажите число в диапазоне 1-31', level='warn') + birth_m = int(b.get_object('birth_month').get_text()) + if birth_m < 1 or birth_m > 12: + show_msg('Неверный номер месяца', 'Укажите число в диапазоне 1-12', level='warn') + return None + birth_y = int(b.get_object('birth_year').get_text()) + except ValueError: + show_msg('Неверно указана дата рождения', 'Все поля даты должны быть заполнены', level='warn') + return None + gender = b.get_object('gender').get_active_id() + if not gender: + show_msg('Не выбран пол', level='warn') + return None + birth_date = date(birth_y, birth_m, birth_d) + doc_type = b.get_object('doc_type').get_active_id() + doc_serial = b.get_object('doc_serial').get_text() + doc_number = b.get_object('doc_number').get_text() + policy_number = b.get_object('policy_number').get_text() + policy_company = b.get_object('policy_company').get_text() + snils_number = b.get_object('snils_number').get_text() + notes_buffer = b.get_object('notes_buffer') + notes_start = notes_buffer.get_start_iter() + notes_end = notes_buffer.get_end_iter() + notes = notes_buffer.get_text(notes_start, notes_end, True) + return { + 'last_name': l_name, + 'first_name': f_name, + 'middle_name': m_name, + 'gender': gender, + 'birth_date': birth_date, + 'doc_type': doc_type, + 'doc_serial': doc_serial, + 'doc_number': doc_number, + 'policy_number': policy_number, + 'policy_company': policy_company, + 'snils_number': snils_number, + 'notes': notes + } +def set_patient_values(patient_id, b, edit=False): + pat = Patient.select().where(Patient.id == patient_id).get() + b.get_object('last_name').set_text(pat.last_name) + b.get_object('first_name').set_text(pat.first_name) + b.get_object('middle_name').set_text(pat.middle_name) + if not edit: + b.get_object('gender').set_text(gender_dict[pat.gender]) + else: + b.get_object('gender').set_active_id(pat.gender) + if not edit: + b.get_object('birth_date').set_text(pat.birth_date.strftime('%d.%m.%Y')) + else: + b.get_object('birth_day').set_text(str(pat.birth_date.day)) + b.get_object('birth_month').set_text(str(pat.birth_date.month)) + b.get_object('birth_year').set_text(str(pat.birth_date.year)) + if not edit: + b.get_object('doc_type').set_text(doc_type_dict[pat.doc_type] if pat.doc_type else '') + elif pat.doc_type: + b.get_object('doc_type').set_active_id(pat.doc_type) + b.get_object('doc_serial').set_text(pat.doc_serial) + b.get_object('doc_number').set_text(pat.doc_number) + b.get_object('policy_number').set_text(pat.policy_number) + b.get_object('policy_company').set_text(pat.policy_company) + b.get_object('snils_number').set_text(pat.snils_number) + b.get_object('notes_buffer').set_text(pat.notes) + +def create_open_patient_win(patient_id): + b = Gtk.Builder() + class OpenPatientWinHandler: + def show_edit_patient_win(self, *a): + edit_patient_win = create_edit_patient_win(patient_id) + w.destroy() + edit_patient_win.show_all() + b.add_from_file(open_patient_win_file) + b.connect_signals(OpenPatientWinHandler()) + w = b.get_object('open_patient_window') + # db_id = b.get_object('db_id') + # db_id.set_text(str(patient_id)) + set_patient_values(patient_id, b) + return w + +def create_edit_patient_win(patient_id): + b = Gtk.Builder() + class EditPatientWinHandler: + def edit_patient_win_close(self, *args): + w.destroy() + open_patient_win = create_open_patient_win(patient_id) + open_patient_win.show_all() + def only_digits(self, entry): + text = entry.get_text() + text = ''.join(filter(lambda x: x.isdigit(), text)) + entry.set_text(text) + def save_patient(self, *args): + values = get_patient_win_values(b) + if not values: + return + with db.atomic(): + try: + Patient.update(**values).where(Patient.id == patient_id).execute() + except peewee.IntegrityError: + return show_msg('Данный пациент уже существует', 'Другой пациент с указанными фамилией, именем\nи датой рождения уже есть с базе данных', level='warn') + patient = Patient.select().where(Patient.id == patient_id).get() + update_patient_index(patient) + cur_row = list(filter(lambda x: x.props.db_id == patient_id, patient_list.get_children()))[0] + patient_list.remove(cur_row) + row = build_patient_row(patient) + patient_list.add(row) + patient_list.select_row(row) + patient_list.show_all() + b.get_object('edit_patient_window').close() + b.add_from_file(edit_patient_win_file) + b.connect_signals(EditPatientWinHandler()) + w = b.get_object('edit_patient_window') + set_patient_values(patient_id, b, edit=True) + return w + def create_new_patient_win(): b = Gtk.Builder() class NewPatienWinHandler: @@ -102,34 +282,12 @@ def create_new_patient_win(): text = ''.join(filter(lambda x: x.isdigit(), text)) entry.set_text(text) def save_patient(self, *args): - l_name = b.get_object('last_name').get_text().replace(' ', '') - f_name = b.get_object('first_name').get_text().replace(' ', '') - m_name = b.get_object('middle_name').get_text().replace(' ', '') - if '' in (l_name, f_name): - return show_msg('Не указаны имя или фамилия', 'Данные поля должны быть заполнены', level='warn') - try: - birth_d = int(b.get_object('birth_day').get_text()) - if birth_d < 1 or birth_d > 31: - return show_msg('Неверный день месяца', 'Укажите число в диапазоне 1-31', level='warn') - birth_m = int(b.get_object('birth_month').get_text()) - if birth_m < 1 or birth_m > 12: - return show_msg('Неверный номер месяца', 'Укажите число в диапазоне 1-12', level='warn') - birth_y = int(b.get_object('birth_year').get_text()) - except ValueError: - return show_msg('Неверно указана дата рождения', 'Все поля даты должны быть заполнены', level='warn') - gender = b.get_object('gender').get_active_id() - if not gender: - return show_msg('Не выбран пол', level='warn') - birth_date = date(birth_y, birth_m, birth_d) + values = get_patient_win_values(b) + if not values: + return with db.atomic(): try: - patient = Patient.create( - last_name=l_name, - first_name=f_name, - middle_name=m_name, - birth_date=birth_date, - gender=gender - ) + patient = Patient.create(**values) except peewee.IntegrityError: return show_msg('Данный пациент уже существует', 'Пациент с указанными фамилией, именем\nи датой рождения уже есть с базе данных', level='warn') store_patient_index(patient) diff --git a/mods/db.py b/mods/db.py index c85a51c..219b891 100644 --- a/mods/db.py +++ b/mods/db.py @@ -1,6 +1,6 @@ import os from peewee import Model, CharField, BigAutoField, DateTimeField, IntegerField, fn, Field, Expression, TextField, ForeignKeyField, DateField -from playhouse.sqlite_ext import SqliteExtDatabase, FTS5Model, AutoIncrementField, SearchField, RowIDField +from playhouse.sqlite_ext import CSqliteExtDatabase, FTS5Model, AutoIncrementField, SearchField, RowIDField var_dir = os.path.join(os.path.abspath(os.environ['HOME']), '.eldoc') db_dir = os.path.join(var_dir, 'db') @@ -11,7 +11,7 @@ if not os.path.exists(var_dir): if not os.path.exists(db_dir): os.mkdir(db_dir) -db = SqliteExtDatabase(db_file, pragmas={ +db = CSqliteExtDatabase(db_file, pragmas={ 'journal_mode': 'wal', 'cache_size': -1 * 64000, # 64MB 'foreign_keys': 'on', @@ -34,12 +34,40 @@ class Patient(BaseModel): middle_name = TextField(null=True) birth_date = DateField() gender = CharField(6) + doc_type = CharField(32, null=True) + doc_serial = TextField(null=True) + doc_number = TextField(null=True) + policy_number = TextField(null=True) + policy_company = TextField(null=True) + snils_number = TextField(null=True) + notes = TextField(null=True) Patient.add_index( Patient.index(Patient.last_name, Patient.first_name, Patient.birth_date, unique=True) ) +class Reception(BaseModel): + id = AutoIncrementField() + patient = ForeignKeyField(Patient, backref='receptions', on_delete='CASCADE') + time = DateTimeField() +class Diagnosis(BaseModel): + id = AutoIncrementField() + code = CharField() + title = TextField() + description = TextField(null=True) +class ReceptionDiagnosis(BaseModel): + id = AutoIncrementField() + reception = ForeignKeyField(Reception, backref='reception_diagnosisses', on_delete='CASCADE') + diagnosis = ForeignKeyField(Diagnosis, backref='reception_diagnosisses', on_delete='CASCADE') +class ReceptionAnamnesis(BaseModel): + id = AutoIncrementField() + reception = ForeignKeyField(Reception, backref='reception_anamnesisses', on_delete='CASCADE') + text = TextField() +class AnamnesisTemplate(BaseModel): + id = AutoIncrementField() + text = TextField() class PatientIndex(BaseFTSModel): rowid = RowIDField() fio = SearchField() + def search_patients(q): with db.atomic(): return (Patient.select() @@ -58,6 +86,15 @@ def store_patient_index(pat): PatientIndex.fio: ' '.join(fio_list) } ).execute() +def update_patient_index(pat): + fio_list = [pat.last_name, pat.first_name] + if pat.middle_name: + fio_list.append(pat.middle_name) + PatientIndex.update( + { + PatientIndex.fio: ' '.join(fio_list) + } + ).where(PatientIndex.rowid == pat.id).execute() db.connect() db.create_tables([ diff --git a/res/icons/female.png b/res/icons/female.png new file mode 100644 index 0000000000000000000000000000000000000000..93c35091b3b97f3ea0b6c074944792d6637a79fd GIT binary patch literal 375 zcmV--0f_#IP)sm6~sam1O*XEqZqMHqm2(>6@4EY@lBFW z@dXq+D-o=l7;@f?9Zp&4=C zw@mBozjfSq8)mo3X7^kjRZIZfY%Q^kso<~-eisPd zruNmhV|nIG + + + + + + False + True + + + + True + False + True + + + True + True + True + top + True + + + + True + False + document-save-symbolic + + + + + + + + + True + False + vertical + + + True + False + patient_data + + + False + True + 0 + + + + + True + False + + + True + False + vertical + + + True + False + + + 200 + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + vertical + 5 + + + True + True + Фамилия + + + False + True + 0 + + + + + True + True + Имя + + + False + True + 1 + + + + + True + True + Отчество + + + False + True + 2 + + + + + + + + + True + False + ФИО + + + + + False + True + 0 + + + + + True + False + vertical + + + 100 + 40 + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + + Мужской + Женский + + + + + + + + True + False + Пол + + + + + False + True + 0 + + + + + 40 + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + + + True + True + 2 + 3 + digits + + + + False + True + 0 + + + + + True + False + . + + + False + True + 1 + + + + + True + True + 2 + 3 + digits + + + + False + True + 2 + + + + + True + False + . + + + False + True + 3 + + + + + True + True + 4 + 5 + digits + + + + False + True + 4 + + + + + True + False + г. + + + False + True + 5 + + + + + + + + + True + False + Дата рождения + + + + + False + True + 1 + + + + + False + 0 + 0 + + + False + True + 2 + + + + + True + True + 1 + + + + + True + True + 0 + + + + + page0 + Основное + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 12 + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + + Паспорт + Св.о рождении + Паспорт иностранца + + + + + + + + True + False + Вид документа + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + + + True + True + Серия удостоверяющего документа + 10 + 11 + Серия + + + False + True + 0 + + + + + True + True + Номер удостоверяющего документа + 20 + 21 + Номер + + + False + True + 1 + + + + + + + + + True + False + Серия и номер + + + + + False + True + 1 + + + + + + + + + True + False + Удостоверение личности + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + vertical + + + True + True + Номер полиса + Номер полиса + Номер полиса + + + False + True + 0 + + + + + True + True + Страховая компания + Страховая компания + + + False + True + 1 + + + + + + + + + True + False + Полис + + + + + False + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + True + Номер + + + + + + + True + False + СНИЛС + + + + + False + True + 2 + + + + + page1 + Документы + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + True + never + in + + + True + True + word + notes_buffer + + + + + + + + + True + False + Заметки + + + + + page2 + Дополнительно + 2 + + + + + False + True + 1 + + + + + + diff --git a/res/ui/error_win.glade b/res/ui/error_win.glade new file mode 100644 index 0000000..e3c3d07 --- /dev/null +++ b/res/ui/error_win.glade @@ -0,0 +1,36 @@ + + + + + + False + Ошибка + True + center + dialog + True + True + center + error + close + + + False + vertical + 2 + + + False + True + end + + + False + False + 0 + + + + + + diff --git a/res/ui/female_patient_row.glade b/res/ui/female_patient_row.glade new file mode 100644 index 0000000..ee78483 --- /dev/null +++ b/res/ui/female_patient_row.glade @@ -0,0 +1,62 @@ + + + + + + False + False + + + + + + True + False + + + True + False + + + False + True + 0 + + + + + True + False + label + 0 + + + + + + + True + True + 1 + + + + + True + False + 5 + label + + + + + + False + True + 2 + + + + + + diff --git a/res/ui/info_win.glade b/res/ui/info_win.glade new file mode 100644 index 0000000..b5a6201 --- /dev/null +++ b/res/ui/info_win.glade @@ -0,0 +1,36 @@ + + + + + + False + popup + Информация + True + center + dialog + True + True + center + close + + + False + vertical + 2 + + + False + True + end + + + False + False + 0 + + + + + + diff --git a/res/ui/main_win.glade b/res/ui/main_win.glade index 41ad06c..ccb17e6 100644 --- a/res/ui/main_win.glade +++ b/res/ui/main_win.glade @@ -7,6 +7,7 @@ ElDoc 800 500 + accessories-character-map @@ -48,7 +49,7 @@ Создать Создать True - gtk-add + list-add False @@ -102,11 +103,12 @@ True False - icons + both True False + Добавить пациента Добавить True gtk-add @@ -118,12 +120,15 @@ - + True + False False - Изменить + Открыть карточку пациента + Открыть True - gtk-edit + gtk-open + False @@ -141,6 +146,7 @@ True False + False @@ -149,10 +155,24 @@ - + True False - True + 3 + 3 + 3 + 3 + + + True + False + + + True + True + 0 + + True @@ -162,6 +182,22 @@ False + + False + True + 1 + + + + + True + False + + + True + True + 2 + diff --git a/res/ui/male_patient_row.glade b/res/ui/male_patient_row.glade new file mode 100644 index 0000000..1674df2 --- /dev/null +++ b/res/ui/male_patient_row.glade @@ -0,0 +1,61 @@ + + + + + + False + False + + + + + + True + False + + + True + False + + + False + True + 0 + + + + + True + False + label + 0 + + + + + + True + True + 1 + + + + + True + False + 5 + label + + + + + + False + True + 2 + + + + + + diff --git a/res/ui/new_patient_win.glade b/res/ui/new_patient_win.glade index b3fe46e..fb77fc2 100644 --- a/res/ui/new_patient_win.glade +++ b/res/ui/new_patient_win.glade @@ -2,135 +2,135 @@ + False True - 600 - 500 - dialog - True - True - + True False Новый пациент True - gtk-save True True True - True top True + + + True + False + document-save-symbolic + + - + True False + vertical - - 200 + True False - 0 - - - True - False - 5 - 12 - 5 - - - True - False - vertical - 5 - - - True - True - Фамилия - - - False - False - 0 - - - - - True - True - Имя - - - False - True - 1 - - - - - True - True - Отчество - - - False - True - 2 - - - - - - - - - True - False - ФИО - - + patient_data - 5 - 5 + False + True + 0 - - 40 + True False - 0 - + True False - 5 - 12 - 5 + vertical True False - + + 200 True - True - 2 - 3 - digits - + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + vertical + 5 + + + True + True + Фамилия + + + False + True + 0 + + + + + True + True + Имя + + + False + True + 1 + + + + + True + True + Отчество + + + False + True + 2 + + + + + + + + + True + False + ФИО + + False @@ -139,125 +139,510 @@ - + True False - . + vertical + + + 100 + 40 + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + + Мужской + Женский + + + + + + + + True + False + Пол + + + + + False + True + 0 + + + + + 40 + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + + + True + True + 2 + 3 + digits + + + + False + True + 0 + + + + + True + False + . + + + False + True + 1 + + + + + True + True + 2 + 3 + digits + + + + False + True + 2 + + + + + True + False + . + + + False + True + 3 + + + + + True + True + 4 + 5 + digits + + + + False + True + 4 + + + + + True + False + г. + + + False + True + 5 + + + + + + + + + True + False + Дата рождения + + + + + False + True + 1 + + - False + True True 1 - - - True - True - 2 - 3 - digits - - - - False - True - 2 - - - - - True - False - . - - - False - True - 3 - - - - - True - True - 4 - 5 - digits - - - - False - True - 4 - - - - - True - False - г. - - - False - True - 5 - - + + True + True + 0 + + + page0 + Основное + - - - True - False - Дата рождения - - - - - 5 - 130 - - - - - 100 - 40 - True - False - 0 - + True False - 5 - 12 - 5 + vertical - + True False - - Мужской - Женский - + 5 + 5 + 5 + 5 + 0 + + + True + False + 12 + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + + Паспорт + Св.о рождении + Паспорт иностранца + + + + + + + + True + False + Вид документа + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + + + True + True + Серия удостоверяющего документа + 10 + 11 + Серия + + + False + True + 0 + + + + + True + True + Номер удостоверяющего документа + 20 + 21 + Номер + + + False + True + 1 + + + + + + + + + True + False + Серия и номер + + + + + False + True + 1 + + + + + + + + + True + False + Удостоверение личности + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + vertical + + + True + True + Номер полиса + Номер полиса + + + False + True + 0 + + + + + True + True + Страховая компания + Страховая компания + + + False + True + 1 + + + + + + + + + True + False + Полис + + + + + False + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + True + Номер + + + + + + + True + False + СНИЛС + + + + + False + True + 2 + + + + + page1 + Документы + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + True + never + in + + + True + True + word + notes_buffer + + + + + + + + + True + False + Заметки - - - - True - False - Пол - + + page2 + Дополнительно + 2 + - 214 - 5 + False + True + 1 diff --git a/res/ui/open_patient_win.glade b/res/ui/open_patient_win.glade new file mode 100644 index 0000000..e6d7fcd --- /dev/null +++ b/res/ui/open_patient_win.glade @@ -0,0 +1,624 @@ + + + + + + + False + True + + + True + False + True + + + True + True + True + top + True + + + + True + False + document-edit-symbolic + + + + + + + + + True + False + vertical + + + True + False + vertical + + + True + False + patient_data + + + False + True + 0 + + + + + True + False + + + True + False + + + 200 + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + vertical + 5 + + + True + False + 0 + + + False + True + 0 + + + + + True + False + 0 + + + False + True + 1 + + + + + True + False + 0 + + + False + True + 2 + + + + + + + + + True + False + ФИО + + + + + False + True + 0 + + + + + True + False + vertical + + + 100 + 40 + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + 0 + + + + + + + True + False + Пол + + + + + False + True + 0 + + + + + 40 + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + + + True + False + + + False + True + 0 + + + + + True + False + г. + + + False + True + 5 + + + + + + + + + True + False + Дата рождения + 0 + + + + + False + True + 1 + + + + + + + + True + True + 1 + + + + + page0 + Основное + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + 5 + + + True + False + 3 + 3 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + 15 + 0 + + + + + + + True + False + Вид документа + + + + + False + True + 0 + + + + + True + False + 3 + 3 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + 10 + + + True + False + 10 + 0 + + + False + True + 0 + + + + + True + False + 18 + 0 + + + False + True + 1 + + + + + + + + + True + False + Серия и номер + 15 + + + + + False + True + 1 + + + + + + + + + True + False + Удостоверение личности + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + vertical + + + True + False + 0 + + + False + True + 0 + + + + + True + False + 0 + + + False + True + 1 + + + + + + + + + True + False + Полис + + + + + False + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + False + 0 + + + + + + + True + False + СНИЛС + + + + + False + True + 2 + + + + + page1 + Документы + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 12 + 5 + + + True + True + never + in + + + True + True + False + word + notes_buffer + + + + + + + + + True + False + Заметки + + + + + page2 + Дополнительно + 2 + + + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 12 + + + 400 + 150 + True + False + + + + + + + True + False + Приёмы + + + + + False + True + 2 + + + + + + diff --git a/res/ui/warn_win.glade b/res/ui/warn_win.glade new file mode 100644 index 0000000..76916e6 --- /dev/null +++ b/res/ui/warn_win.glade @@ -0,0 +1,36 @@ + + + + + + False + Предупреждение + True + center + dialog + True + True + center + warning + close + + + False + vertical + 2 + + + False + True + end + + + False + False + 0 + + + + + +