From e8f4add6b9de5c5df98c43bdd6f17caa28c9f839 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: Fri, 13 Dec 2019 21:07:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=87=D0=B0=D0=BB=D0=BE=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=D0=BA=D0=B0=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=BF=D1=80=D0=B8=D1=91=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mods/db.py | 4 +- res/ui/new_reception_win.glade | 1 + res/ui/open_reception_win.glade | 813 ++++++++++++++++++++++++++++++++ 3 files changed, 817 insertions(+), 1 deletion(-) create mode 100644 res/ui/open_reception_win.glade diff --git a/mods/db.py b/mods/db.py index a12825b..06400fd 100644 --- a/mods/db.py +++ b/mods/db.py @@ -1,5 +1,5 @@ import os -from peewee import Model, CharField, DateTimeField, TextField, ForeignKeyField, DateField, fn +from peewee import Model, CharField, DateTimeField, TextField, ForeignKeyField, DateField, fn, BooleanField from playhouse.sqlite_ext import CSqliteExtDatabase, FTS5Model, AutoIncrementField, SearchField, RowIDField, JSONField import platform @@ -73,6 +73,7 @@ class Reception(BaseModel): id = AutoIncrementField() patient = ForeignKeyField(Patient, backref='receptions', on_delete='CASCADE') time = DateTimeField() + attended = BooleanField(default=False) class ReceptionDiagnosis(BaseModel): id = AutoIncrementField() reception = ForeignKeyField(Reception, backref='reception_diagnosisses', on_delete='CASCADE') @@ -94,6 +95,7 @@ Patient.add_index( ) Catalog.add_index(Catalog.index(fn.lower(Catalog.name), unique=True, name='catalog_name_unique')) ListRecord.add_index(ListRecord.index(ListRecord.list, fn.lower(ListRecord.text), unique=True, name='listrec_unique')) +db.connect() db.create_tables([ Patient, PatientIndex, diff --git a/res/ui/new_reception_win.glade b/res/ui/new_reception_win.glade index 6366ccc..1c564ed 100644 --- a/res/ui/new_reception_win.glade +++ b/res/ui/new_reception_win.glade @@ -129,6 +129,7 @@ True False gtk-index + 3 diff --git a/res/ui/open_reception_win.glade b/res/ui/open_reception_win.glade new file mode 100644 index 0000000..431857a --- /dev/null +++ b/res/ui/open_reception_win.glade @@ -0,0 +1,813 @@ + + + + + + + 800 + 600 + False + True + center + dialog + + + True + False + True + + + True + True + True + + + True + False + document-save-symbolic + + + + + + + True + False + + + 1 + + + + + + + True + False + vertical + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 5 + 5 + 5 + 12 + + + True + False + + + + + + + True + False + Пациент + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 5 + 5 + 5 + 12 + + + True + False + + + + + + + True + False + Дата и время приёма + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 5 + 5 + 5 + 12 + + + True + False + + + True + True + in + + + True + False + + + True + False + + + + + + + True + True + 0 + + + + + True + False + vertical + + + True + False + + + True + True + 0 + + + + + True + True + True + + + True + False + gtk-index + 3 + + + + + False + True + 1 + + + + + True + False + + + True + True + 2 + + + + + False + True + 1 + + + + + + + + + True + False + Анамнез + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 5 + 5 + 5 + 12 + + + True + False + + + True + True + in + + + True + False + + + True + False + + + + + + + True + True + 0 + + + + + True + False + vertical + + + True + False + + + True + True + 0 + + + + + True + True + True + + + True + False + gtk-index + 3 + + + + + False + True + 1 + + + + + True + False + + + True + True + 2 + + + + + False + True + 1 + + + + + + + + + True + False + Осмотр + + + + + True + True + 1 + + + + + True + True + 1 + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 5 + 5 + 5 + 12 + + + True + False + + + True + True + in + + + True + False + + + True + False + + + + + + + True + True + 0 + + + + + True + False + vertical + + + True + False + + + True + True + 0 + + + + + True + True + True + + + True + False + gtk-index + 3 + + + + + False + True + 1 + + + + + True + False + + + True + True + 2 + + + + + False + True + 1 + + + + + + + + + True + False + Диагноз + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 5 + 5 + 5 + 12 + + + True + False + + + True + True + in + + + True + False + + + True + False + + + + + + + True + True + 0 + + + + + True + False + vertical + + + True + False + + + True + True + 0 + + + + + True + True + True + + + True + False + gtk-index + 3 + + + + + False + True + 1 + + + + + True + False + + + True + True + 2 + + + + + False + True + 1 + + + + + + + + + True + False + Медикаменты + + + + + True + True + 1 + + + + + True + True + 2 + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 5 + 5 + 5 + 12 + + + True + False + + + True + True + in + + + True + False + + + True + False + + + + + + + True + True + 0 + + + + + True + False + vertical + + + True + False + + + True + True + 0 + + + + + True + True + True + + + True + False + gtk-index + 3 + + + + + False + True + 1 + + + + + True + False + + + True + True + 2 + + + + + False + True + 1 + + + + + + + + + True + False + Процедуры + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + False + 5 + 5 + 5 + 5 + 12 + + + True + True + in + + + True + True + notes_buffer + + + + + + + + + True + False + Заметки + + + + + True + True + 1 + + + + + True + True + 3 + + + + + +