Список справочников
This commit is contained in:
parent
1b0f6bd6c9
commit
ead0ec5f58
118
app.py
118
app.py
|
@ -2,16 +2,12 @@ import gi
|
||||||
import os
|
import os
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '3.0')
|
||||||
from gi.repository import Gtk, GObject, Gdk
|
from gi.repository import Gtk, GObject, Gdk
|
||||||
from mods.db import Patient, Reception, store_patient_index, update_patient_index, search_patients, db
|
from mods.db import store_patient_index, update_patient_index, search_patients, dbo
|
||||||
from datetime import date, datetime, timedelta, time
|
from mods.settings import s_get_reception_list, s_set_reception_list
|
||||||
|
from mods.catalogs import add_catalog
|
||||||
|
from datetime import date, datetime, timedelta
|
||||||
import peewee
|
import peewee
|
||||||
|
|
||||||
# FIXME: временно
|
|
||||||
DAY_START = time(8,0)
|
|
||||||
DAY_END = time(13,0)
|
|
||||||
TIME_INTERVAL = timedelta(minutes=30)
|
|
||||||
#
|
|
||||||
|
|
||||||
gender_dict = {
|
gender_dict = {
|
||||||
'male': 'Мужской',
|
'male': 'Мужской',
|
||||||
'female': 'Женский'
|
'female': 'Женский'
|
||||||
|
@ -30,10 +26,14 @@ 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')
|
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')
|
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')
|
male_patient_row_file = os.path.join(ui_dir, 'male_patient_row.glade')
|
||||||
|
reception_list_settings_win_file = os.path.join(ui_dir, 'reception_list_settings.glade')
|
||||||
female_patient_row_file = os.path.join(ui_dir, 'female_patient_row.glade')
|
female_patient_row_file = os.path.join(ui_dir, 'female_patient_row.glade')
|
||||||
reception_row_file = os.path.join(ui_dir, 'reception_row.glade')
|
reception_row_file = os.path.join(ui_dir, 'reception_row.glade')
|
||||||
with open(reception_row_file, 'r') as f:
|
with open(reception_row_file, 'r') as f:
|
||||||
reception_row_ui_str = f.read()
|
reception_row_ui_str = f.read()
|
||||||
|
catalog_row_file = os.path.join(ui_dir, 'catalog_list_row.glade')
|
||||||
|
with open(catalog_row_file, 'r') as f:
|
||||||
|
catalog_row_ui_str = f.read()
|
||||||
gender_ui_str = {}
|
gender_ui_str = {}
|
||||||
with open(male_patient_row_file, 'r') as f:
|
with open(male_patient_row_file, 'r') as f:
|
||||||
gender_ui_str['male'] = f.read()
|
gender_ui_str['male'] = f.read()
|
||||||
|
@ -44,11 +44,12 @@ with open(female_patient_row_file, 'r') as f:
|
||||||
builder = Gtk.Builder()
|
builder = Gtk.Builder()
|
||||||
|
|
||||||
def get_reception_timelist(rec_date):
|
def get_reception_timelist(rec_date):
|
||||||
dstart = datetime(rec_date.year, rec_date.month, rec_date.day, DAY_START.hour, DAY_START.minute)
|
s = s_get_reception_list()
|
||||||
dend = datetime(rec_date.year, rec_date.month, rec_date.day, DAY_END.hour, DAY_END.minute)
|
dstart = datetime(rec_date.year, rec_date.month, rec_date.day, s.day_start[0], s.day_start[1])
|
||||||
|
dend = datetime(rec_date.year, rec_date.month, rec_date.day, s.day_end[0], s.day_end[1])
|
||||||
work_day_minutes_total = (dend.hour - dstart.hour) * 60 + dend.minute - dstart.minute
|
work_day_minutes_total = (dend.hour - dstart.hour) * 60 + dend.minute - dstart.minute
|
||||||
shift_minutes_range = range(0, work_day_minutes_total, int(TIME_INTERVAL.seconds / 60))
|
shift_minutes_range = range(0, work_day_minutes_total, s.interval)
|
||||||
return [(dstart + timedelta(minutes=x)).time() for x in shift_minutes_range]
|
return [dstart + timedelta(minutes=x) for x in shift_minutes_range]
|
||||||
|
|
||||||
class PatientFilter:
|
class PatientFilter:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -103,9 +104,31 @@ class ReceptionRow(Gtk.ListBoxRow):
|
||||||
def scheduled_setter(self, value):
|
def scheduled_setter(self, value):
|
||||||
self._scheduled = value
|
self._scheduled = value
|
||||||
|
|
||||||
|
class CatalogRow(Gtk.ListBoxRow):
|
||||||
|
@GObject.Property
|
||||||
|
def db_id(self):
|
||||||
|
return self._db_id
|
||||||
|
@db_id.setter
|
||||||
|
def db_id_setter(self, value):
|
||||||
|
self._db_id = value
|
||||||
|
|
||||||
class MainWinHandler:
|
class MainWinHandler:
|
||||||
def main_win_close(self, *args):
|
def main_win_close(self, *args):
|
||||||
Gtk.main_quit()
|
Gtk.main_quit()
|
||||||
|
def set_reception_list_today(self, *a):
|
||||||
|
cal = builder.get_object('reception_cal')
|
||||||
|
d = datetime.now()
|
||||||
|
cal.select_month(d.month - 1, d.year)
|
||||||
|
cal.select_day(d.day)
|
||||||
|
redraw_reception_list(d)
|
||||||
|
def change_reception_list_day(self, *a):
|
||||||
|
cal = builder.get_object('reception_cal')
|
||||||
|
cal_date = cal.get_date()
|
||||||
|
d = datetime(cal_date.year, cal_date.month + 1, cal_date.day)
|
||||||
|
redraw_reception_list(d)
|
||||||
|
def show_reception_list_settings_win(self, button):
|
||||||
|
reception_list_settings_win = create_reception_list_settings_win()
|
||||||
|
reception_list_settings_win.show_all()
|
||||||
def show_new_patient_win(self, button):
|
def show_new_patient_win(self, button):
|
||||||
new_patient_win = create_new_patient_win()
|
new_patient_win = create_new_patient_win()
|
||||||
new_patient_win.show_all()
|
new_patient_win.show_all()
|
||||||
|
@ -138,6 +161,18 @@ class MainWinHandler:
|
||||||
pl.add(build_patient_row(p))
|
pl.add(build_patient_row(p))
|
||||||
pl.show_all()'''
|
pl.show_all()'''
|
||||||
|
|
||||||
|
def build_catalog_row(catalog):
|
||||||
|
b = Gtk.Builder()
|
||||||
|
b.add_from_string(catalog_row_ui_str)
|
||||||
|
win = b.get_object('win')
|
||||||
|
box = b.get_object('catalog_box')
|
||||||
|
b.get_object('name').set_text(catalog.name)
|
||||||
|
row = CatalogRow()
|
||||||
|
row.props.db_id = catalog.id
|
||||||
|
win.remove(win.get_children()[0])
|
||||||
|
row.add(box)
|
||||||
|
return row
|
||||||
|
|
||||||
def build_reception_row(reception_datetime):
|
def build_reception_row(reception_datetime):
|
||||||
b = Gtk.Builder()
|
b = Gtk.Builder()
|
||||||
b.add_from_string(reception_row_ui_str)
|
b.add_from_string(reception_row_ui_str)
|
||||||
|
@ -145,10 +180,12 @@ def build_reception_row(reception_datetime):
|
||||||
box = b.get_object('reception_box')
|
box = b.get_object('reception_box')
|
||||||
b.get_object('hour').set_text(reception_datetime.strftime('%H'))
|
b.get_object('hour').set_text(reception_datetime.strftime('%H'))
|
||||||
b.get_object('minute').set_text(reception_datetime.strftime('%M'))
|
b.get_object('minute').set_text(reception_datetime.strftime('%M'))
|
||||||
reception = Reception.select().where(Reception.time == reception_datetime)
|
with dbo.db.atomic():
|
||||||
|
reception = dbo._Reception.select().where(dbo._Reception.time == reception_datetime) # @UndefinedVariable
|
||||||
row = ReceptionRow()
|
row = ReceptionRow()
|
||||||
if len(reception):
|
if len(reception):
|
||||||
row.props.scheduled = True
|
row.props.scheduled = True
|
||||||
|
row.props.db_id = reception.id
|
||||||
reception_cont = b.get_object('reception_cont')
|
reception_cont = b.get_object('reception_cont')
|
||||||
reception_cont.props.border_width = 2
|
reception_cont.props.border_width = 2
|
||||||
reception_cont.override_background_color(Gtk.StateFlags(0), Gdk.RGBA(red=0.5, green=0.7, blue=0.5, alpha=1.0))
|
reception_cont.override_background_color(Gtk.StateFlags(0), Gdk.RGBA(red=0.5, green=0.7, blue=0.5, alpha=1.0))
|
||||||
|
@ -194,8 +231,11 @@ def patient_filter_func(row):
|
||||||
def redraw_reception_list(selected_date):
|
def redraw_reception_list(selected_date):
|
||||||
reception_timelist = get_reception_timelist(selected_date)
|
reception_timelist = get_reception_timelist(selected_date)
|
||||||
reception_list = builder.get_object('reception_list')
|
reception_list = builder.get_object('reception_list')
|
||||||
|
for c in reception_list.get_children():
|
||||||
|
reception_list.remove(c)
|
||||||
for d in reception_timelist:
|
for d in reception_timelist:
|
||||||
reception_list.add(build_reception_row(d))
|
reception_list.add(build_reception_row(d))
|
||||||
|
reception_list.show_all()
|
||||||
|
|
||||||
builder.add_from_file(main_win_file)
|
builder.add_from_file(main_win_file)
|
||||||
builder.connect_signals(MainWinHandler())
|
builder.connect_signals(MainWinHandler())
|
||||||
|
@ -205,9 +245,15 @@ redraw_reception_list(datetime.now())
|
||||||
patient_list = builder.get_object('patient_list')
|
patient_list = builder.get_object('patient_list')
|
||||||
patient_list.set_sort_func(patient_sort_func)
|
patient_list.set_sort_func(patient_sort_func)
|
||||||
patient_list.set_filter_func(patient_filter_func)
|
patient_list.set_filter_func(patient_filter_func)
|
||||||
with db.atomic():
|
with dbo.db.atomic():
|
||||||
for p in Patient.select():
|
for p in dbo._Patient.select(): # @UndefinedVariable
|
||||||
patient_list.add(build_patient_row(p))
|
patient_list.add(build_patient_row(p))
|
||||||
|
#####
|
||||||
|
catalog_list = builder.get_object('catalog_list')
|
||||||
|
|
||||||
|
with dbo.db.atomic():
|
||||||
|
for c in dbo._Catalog.select(): # @UndefinedVariable
|
||||||
|
catalog_list.add(build_catalog_row(c))
|
||||||
|
|
||||||
def show_msg(text, sec_text='', level='info'):
|
def show_msg(text, sec_text='', level='info'):
|
||||||
msg_win_file = os.path.join(ui_dir, f'{level}_win.glade')
|
msg_win_file = os.path.join(ui_dir, f'{level}_win.glade')
|
||||||
|
@ -267,8 +313,9 @@ def get_patient_win_values(b):
|
||||||
'snils_number': snils_number,
|
'snils_number': snils_number,
|
||||||
'notes': notes
|
'notes': notes
|
||||||
}
|
}
|
||||||
def set_patient_values(patient_id, b, edit=False):
|
def set_patient_win_values(patient_id, b, edit=False):
|
||||||
pat = Patient.select().where(Patient.id == patient_id).get()
|
with dbo.db.atomic():
|
||||||
|
pat = dbo._Patient.select().where(dbo._Patient.id == patient_id).get() # @UndefinedVariable
|
||||||
b.get_object('last_name').set_text(pat.last_name)
|
b.get_object('last_name').set_text(pat.last_name)
|
||||||
b.get_object('first_name').set_text(pat.first_name)
|
b.get_object('first_name').set_text(pat.first_name)
|
||||||
b.get_object('middle_name').set_text(pat.middle_name)
|
b.get_object('middle_name').set_text(pat.middle_name)
|
||||||
|
@ -305,7 +352,7 @@ def create_open_patient_win(patient_id):
|
||||||
w = b.get_object('open_patient_window')
|
w = b.get_object('open_patient_window')
|
||||||
# db_id = b.get_object('db_id')
|
# db_id = b.get_object('db_id')
|
||||||
# db_id.set_text(str(patient_id))
|
# db_id.set_text(str(patient_id))
|
||||||
set_patient_values(patient_id, b)
|
set_patient_win_values(patient_id, b)
|
||||||
return w
|
return w
|
||||||
|
|
||||||
def create_edit_patient_win(patient_id):
|
def create_edit_patient_win(patient_id):
|
||||||
|
@ -323,12 +370,12 @@ def create_edit_patient_win(patient_id):
|
||||||
values = get_patient_win_values(b)
|
values = get_patient_win_values(b)
|
||||||
if not values:
|
if not values:
|
||||||
return
|
return
|
||||||
with db.atomic():
|
with dbo.db.atomic():
|
||||||
try:
|
try:
|
||||||
Patient.update(**values).where(Patient.id == patient_id).execute()
|
dbo._Patient.update(**values).where(dbo._Patient.id == patient_id).execute() # @UndefinedVariable
|
||||||
except peewee.IntegrityError:
|
except peewee.IntegrityError:
|
||||||
return show_msg('Данный пациент уже существует', 'Другой пациент с указанными фамилией, именем\nи датой рождения уже есть с базе данных', level='warn')
|
return show_msg('Данный пациент уже существует', 'Другой пациент с указанными фамилией, именем\nи датой рождения уже есть с базе данных', level='warn')
|
||||||
patient = Patient.select().where(Patient.id == patient_id).get()
|
patient = dbo._Patient.select().where(dbo._Patient.id == patient_id).get() # @UndefinedVariable
|
||||||
update_patient_index(patient)
|
update_patient_index(patient)
|
||||||
cur_row = list(filter(lambda x: x.props.db_id == patient_id, patient_list.get_children()))[0]
|
cur_row = list(filter(lambda x: x.props.db_id == patient_id, patient_list.get_children()))[0]
|
||||||
patient_list.remove(cur_row)
|
patient_list.remove(cur_row)
|
||||||
|
@ -340,7 +387,7 @@ def create_edit_patient_win(patient_id):
|
||||||
b.add_from_file(edit_patient_win_file)
|
b.add_from_file(edit_patient_win_file)
|
||||||
b.connect_signals(EditPatientWinHandler())
|
b.connect_signals(EditPatientWinHandler())
|
||||||
w = b.get_object('edit_patient_window')
|
w = b.get_object('edit_patient_window')
|
||||||
set_patient_values(patient_id, b, edit=True)
|
set_patient_win_values(patient_id, b, edit=True)
|
||||||
return w
|
return w
|
||||||
|
|
||||||
def create_new_patient_win():
|
def create_new_patient_win():
|
||||||
|
@ -354,9 +401,9 @@ def create_new_patient_win():
|
||||||
values = get_patient_win_values(b)
|
values = get_patient_win_values(b)
|
||||||
if not values:
|
if not values:
|
||||||
return
|
return
|
||||||
with db.atomic():
|
with dbo.db.atomic():
|
||||||
try:
|
try:
|
||||||
patient = Patient.create(**values)
|
patient = dbo._Patient.create(**values) # @UndefinedVariable
|
||||||
except peewee.IntegrityError:
|
except peewee.IntegrityError:
|
||||||
return show_msg('Данный пациент уже существует', 'Пациент с указанными фамилией, именем\nи датой рождения уже есть с базе данных', level='warn')
|
return show_msg('Данный пациент уже существует', 'Пациент с указанными фамилией, именем\nи датой рождения уже есть с базе данных', level='warn')
|
||||||
store_patient_index(patient)
|
store_patient_index(patient)
|
||||||
|
@ -370,6 +417,29 @@ def create_new_patient_win():
|
||||||
w = b.get_object('new_patient_window')
|
w = b.get_object('new_patient_window')
|
||||||
return w
|
return w
|
||||||
|
|
||||||
|
def create_reception_list_settings_win():
|
||||||
|
b = Gtk.Builder()
|
||||||
|
class ReceptionListSettingsHandler:
|
||||||
|
def save_settings(self, *a):
|
||||||
|
start_hour = int(b.get_object('start_hour').get_value())
|
||||||
|
start_minute = int(b.get_object('start_minute').get_value())
|
||||||
|
end_hour = int(b.get_object('end_hour').get_value())
|
||||||
|
end_minute = int(b.get_object('end_minute').get_value())
|
||||||
|
interval = int(b.get_object('interval').get_value())
|
||||||
|
s_set_reception_list([start_hour, start_minute], [end_hour, end_minute], interval)
|
||||||
|
redraw_reception_list(datetime.now())
|
||||||
|
b.get_object('reception_list_settings_win').close()
|
||||||
|
b.add_from_file(reception_list_settings_win_file)
|
||||||
|
b.connect_signals(ReceptionListSettingsHandler())
|
||||||
|
s = s_get_reception_list()
|
||||||
|
b.get_object('start_hour').set_value(s.day_start[0])
|
||||||
|
b.get_object('start_minute').set_value(s.day_start[1])
|
||||||
|
b.get_object('end_hour').set_value(s.day_end[0])
|
||||||
|
b.get_object('end_minute').set_value(s.day_end[1])
|
||||||
|
b.get_object('interval').set_value(s.interval)
|
||||||
|
w = b.get_object('reception_list_settings_win')
|
||||||
|
return w
|
||||||
|
|
||||||
main_win = builder.get_object('main_window')
|
main_win = builder.get_object('main_window')
|
||||||
main_win.show_all()
|
main_win.show_all()
|
||||||
Gtk.main()
|
Gtk.main()
|
||||||
|
|
183
mods/db.py
183
mods/db.py
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
from peewee import Model, CharField, BigAutoField, DateTimeField, IntegerField, fn, Field, Expression, TextField, ForeignKeyField, DateField, TimeField
|
from peewee import Model, CharField, DateTimeField, TextField, ForeignKeyField, DateField
|
||||||
from playhouse.sqlite_ext import CSqliteExtDatabase, FTS5Model, AutoIncrementField, SearchField, RowIDField
|
from playhouse.sqlite_ext import CSqliteExtDatabase, FTS5Model, AutoIncrementField, SearchField, RowIDField, JSONField
|
||||||
|
|
||||||
var_dir = os.path.join(os.path.abspath(os.environ['HOME']), '.eldoc')
|
var_dir = os.path.join(os.path.abspath(os.environ['HOME']), '.eldoc')
|
||||||
db_dir = os.path.join(var_dir, 'db')
|
db_dir = os.path.join(var_dir, 'db')
|
||||||
|
@ -11,98 +11,121 @@ if not os.path.exists(var_dir):
|
||||||
if not os.path.exists(db_dir):
|
if not os.path.exists(db_dir):
|
||||||
os.mkdir(db_dir)
|
os.mkdir(db_dir)
|
||||||
|
|
||||||
db = CSqliteExtDatabase(db_file, pragmas={
|
class DBO:
|
||||||
'journal_mode': 'wal',
|
def __init__(self):
|
||||||
'cache_size': -1 * 64000, # 64MB
|
self.db = CSqliteExtDatabase(db_file, pragmas={
|
||||||
'foreign_keys': 'on',
|
'journal_mode': 'wal',
|
||||||
'ignore_check_constraints': 'off',
|
'cache_size': -1 * 64000, # 64MB
|
||||||
'synchronous': 'off'})
|
'foreign_keys': 'on',
|
||||||
|
'ignore_check_constraints': 'off',
|
||||||
class BaseModel(Model):
|
'synchronous': 'off'})
|
||||||
'Базовая таблица'
|
class BaseModel(Model):
|
||||||
class Meta:
|
'Базовая таблица'
|
||||||
database = db
|
class Meta:
|
||||||
class BaseFTSModel(FTS5Model):
|
database = self.db
|
||||||
class Meta:
|
class BaseFTSModel(FTS5Model):
|
||||||
database = db
|
class Meta:
|
||||||
options = {'tokenize': 'porter'}
|
database = self.db
|
||||||
|
options = {'tokenize': 'porter'}
|
||||||
class Patient(BaseModel):
|
class Patient(BaseModel):
|
||||||
id = AutoIncrementField()
|
id = AutoIncrementField()
|
||||||
last_name = TextField()
|
last_name = TextField()
|
||||||
first_name = TextField()
|
first_name = TextField()
|
||||||
middle_name = TextField(null=True)
|
middle_name = TextField(null=True)
|
||||||
birth_date = DateField()
|
birth_date = DateField()
|
||||||
gender = CharField(6)
|
gender = CharField(6)
|
||||||
doc_type = CharField(32, null=True)
|
doc_type = CharField(32, null=True)
|
||||||
doc_serial = TextField(null=True)
|
doc_serial = TextField(null=True)
|
||||||
doc_number = TextField(null=True)
|
doc_number = TextField(null=True)
|
||||||
policy_number = TextField(null=True)
|
policy_number = TextField(null=True)
|
||||||
policy_company = TextField(null=True)
|
policy_company = TextField(null=True)
|
||||||
snils_number = TextField(null=True)
|
snils_number = TextField(null=True)
|
||||||
notes = TextField(null=True)
|
notes = TextField(null=True)
|
||||||
Patient.add_index(
|
class Catalog(BaseModel):
|
||||||
Patient.index(Patient.last_name, Patient.first_name, Patient.birth_date, unique=True)
|
id = AutoIncrementField()
|
||||||
)
|
system_id = TextField(null=True)
|
||||||
class Reception(BaseModel):
|
name = TextField()
|
||||||
id = AutoIncrementField()
|
class CatalogRecord(BaseModel):
|
||||||
patient = ForeignKeyField(Patient, backref='receptions', on_delete='CASCADE')
|
id = AutoIncrementField()
|
||||||
time = DateTimeField()
|
catalog = ForeignKeyField(Catalog, backref='catalog_records', on_delete='CASCADE')
|
||||||
class Diagnosis(BaseModel):
|
text = TextField()
|
||||||
id = AutoIncrementField()
|
class CatalogRecordIndex(BaseFTSModel):
|
||||||
code = CharField()
|
rowid = RowIDField()
|
||||||
title = TextField()
|
text = SearchField()
|
||||||
description = TextField(null=True)
|
class Reception(BaseModel):
|
||||||
class ReceptionDiagnosis(BaseModel):
|
id = AutoIncrementField()
|
||||||
id = AutoIncrementField()
|
patient = ForeignKeyField(Patient, backref='receptions', on_delete='CASCADE')
|
||||||
reception = ForeignKeyField(Reception, backref='reception_diagnosisses', on_delete='CASCADE')
|
time = DateTimeField()
|
||||||
diagnosis = ForeignKeyField(Diagnosis, backref='reception_diagnosisses', on_delete='CASCADE')
|
class ReceptionDiagnosis(BaseModel):
|
||||||
class ReceptionAnamnesis(BaseModel):
|
id = AutoIncrementField()
|
||||||
id = AutoIncrementField()
|
reception = ForeignKeyField(Reception, backref='reception_diagnosisses', on_delete='CASCADE')
|
||||||
reception = ForeignKeyField(Reception, backref='reception_anamnesisses', on_delete='CASCADE')
|
diagnosis = ForeignKeyField(CatalogRecord, backref='reception_diagnosisses', on_delete='CASCADE')
|
||||||
text = TextField()
|
class ReceptionAnamnesis(BaseModel):
|
||||||
class AnamnesisTemplate(BaseModel):
|
id = AutoIncrementField()
|
||||||
id = AutoIncrementField()
|
reception = ForeignKeyField(Reception, backref='reception_anamnesisses', on_delete='CASCADE')
|
||||||
text = TextField()
|
text = TextField()
|
||||||
class PatientIndex(BaseFTSModel):
|
class PatientIndex(BaseFTSModel):
|
||||||
rowid = RowIDField()
|
rowid = RowIDField()
|
||||||
fio = SearchField()
|
fio = SearchField()
|
||||||
|
### Настройки
|
||||||
|
class Settings(BaseModel):
|
||||||
|
key = TextField()
|
||||||
|
val = JSONField()
|
||||||
|
###
|
||||||
|
self._Patient = Patient
|
||||||
|
self._Catalog = Catalog
|
||||||
|
self._CatalogRecord = CatalogRecord
|
||||||
|
self._CatalogRecordIndex = CatalogRecordIndex
|
||||||
|
self._Reception = Reception
|
||||||
|
self._ReceptionDiagnosis = ReceptionDiagnosis
|
||||||
|
self._ReceptionAnamnesis = ReceptionAnamnesis
|
||||||
|
self._PatientIndex = PatientIndex
|
||||||
|
self._Settings = Settings
|
||||||
|
self.db.connect()
|
||||||
|
def create(self):
|
||||||
|
self._Patient.add_index(
|
||||||
|
self._Patient.index(self._Patient.last_name, self._Patient.first_name, self._Patient.birth_date, unique=True)
|
||||||
|
)
|
||||||
|
self.db.create_tables([
|
||||||
|
self._Patient,
|
||||||
|
self._PatientIndex,
|
||||||
|
self._Catalog,
|
||||||
|
self._CatalogRecord,
|
||||||
|
self._CatalogRecordIndex,
|
||||||
|
self._Reception,
|
||||||
|
self._ReceptionDiagnosis,
|
||||||
|
self._ReceptionAnamnesis,
|
||||||
|
self._Settings
|
||||||
|
])
|
||||||
|
|
||||||
def search_patients(q):
|
def search_patients(q):
|
||||||
with db.atomic():
|
with dbo.db.atomic():
|
||||||
return (Patient.select()
|
return (dbo._Patient.select()
|
||||||
.join(
|
.join(
|
||||||
PatientIndex,
|
dbo._PatientIndex,
|
||||||
on=(Patient.id == PatientIndex.rowid))
|
on=(dbo._Patient.id == dbo._PatientIndex.rowid))
|
||||||
.where(PatientIndex.match(q))
|
.where(dbo._PatientIndex.match(q))
|
||||||
.order_by(PatientIndex.bm25()))
|
.order_by(dbo._PatientIndex.bm25()))
|
||||||
def store_patient_index(pat):
|
def store_patient_index(pat):
|
||||||
fio_list = [pat.last_name, pat.first_name]
|
fio_list = [pat.last_name, pat.first_name]
|
||||||
if pat.middle_name:
|
if pat.middle_name:
|
||||||
fio_list.append(pat.middle_name)
|
fio_list.append(pat.middle_name)
|
||||||
PatientIndex.insert(
|
dbo._PatientIndex.insert(
|
||||||
{
|
{
|
||||||
PatientIndex.rowid: pat.id,
|
dbo._PatientIndex.rowid: pat.id,
|
||||||
PatientIndex.fio: ' '.join(fio_list)
|
dbo._PatientIndex.fio: ' '.join(fio_list)
|
||||||
}
|
}
|
||||||
).execute()
|
).execute()
|
||||||
def update_patient_index(pat):
|
def update_patient_index(pat):
|
||||||
fio_list = [pat.last_name, pat.first_name]
|
fio_list = [pat.last_name, pat.first_name]
|
||||||
if pat.middle_name:
|
if pat.middle_name:
|
||||||
fio_list.append(pat.middle_name)
|
fio_list.append(pat.middle_name)
|
||||||
PatientIndex.update(
|
dbo._PatientIndex.update(
|
||||||
{
|
{
|
||||||
PatientIndex.fio: ' '.join(fio_list)
|
dbo._PatientIndex.fio: ' '.join(fio_list)
|
||||||
}
|
}
|
||||||
).where(PatientIndex.rowid == pat.id).execute()
|
).where(dbo._PatientIndex.rowid == pat.id).execute()
|
||||||
|
|
||||||
db.connect()
|
|
||||||
db.create_tables([
|
dbo = DBO()
|
||||||
Patient,
|
dbo.create()
|
||||||
PatientIndex,
|
|
||||||
Reception,
|
|
||||||
Diagnosis,
|
|
||||||
ReceptionDiagnosis,
|
|
||||||
ReceptionAnamnesis,
|
|
||||||
AnamnesisTemplate
|
|
||||||
])
|
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
from mods.db import dbo
|
||||||
|
|
||||||
|
# Имена ключей параметров
|
||||||
|
S_KEY_RECEPTION_LIST = 'reception_list'
|
||||||
|
S_RECEPTION_LIST_DAY_START = 'day_start'
|
||||||
|
S_RECEPTION_LIST_DAY_END = 'day_end'
|
||||||
|
S_RECEPTION_LIST_INTERVAL = 'interval'
|
||||||
|
|
||||||
|
# Получение параметров
|
||||||
|
def s_get_reception_list():
|
||||||
|
class RLSettings:
|
||||||
|
day_start = None
|
||||||
|
day_end = None
|
||||||
|
interval = None
|
||||||
|
s = dbo._Settings.get(dbo._Settings.key == S_KEY_RECEPTION_LIST).val # @UndefinedVariable
|
||||||
|
o = RLSettings()
|
||||||
|
o.day_start = s[S_RECEPTION_LIST_DAY_START]
|
||||||
|
o.day_end = s[S_RECEPTION_LIST_DAY_END]
|
||||||
|
o.interval = s[S_RECEPTION_LIST_INTERVAL]
|
||||||
|
return o
|
||||||
|
# Установка параметров
|
||||||
|
def s_set_reception_list(dstart, dend, interval):
|
||||||
|
v = {
|
||||||
|
S_RECEPTION_LIST_DAY_START: dstart,
|
||||||
|
S_RECEPTION_LIST_DAY_END: dend,
|
||||||
|
S_RECEPTION_LIST_INTERVAL: interval
|
||||||
|
}
|
||||||
|
with dbo.db.atomic():
|
||||||
|
q = dbo._Settings.select().where(dbo._Settings.key == S_KEY_RECEPTION_LIST) # @UndefinedVariable
|
||||||
|
if not len(q):
|
||||||
|
dbo._Settings.create(key=S_KEY_RECEPTION_LIST, val=v) # @UndefinedVariable
|
||||||
|
else:
|
||||||
|
dbo._Settings.update(val=v).where(dbo._Settings.key == S_KEY_RECEPTION_LIST).execute() # @UndefinedVariable
|
||||||
|
|
||||||
|
### Инициализация начальных значений параметров
|
||||||
|
# Начальный график приёмов
|
||||||
|
with dbo.db.atomic():
|
||||||
|
q = dbo._Settings.select().where(dbo._Settings.key == S_KEY_RECEPTION_LIST) # @UndefinedVariable
|
||||||
|
if not len(q):
|
||||||
|
s_set_reception_list([8,0], [17,0], 30)
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.22.1 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.20"/>
|
||||||
|
<object class="GtkWindow" id="win">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="decorated">False</property>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="catalog_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">label</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="scale" value="2"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
|
@ -6,11 +6,13 @@
|
||||||
<object class="GtkWindow" id="edit_patient_window">
|
<object class="GtkWindow" id="edit_patient_window">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="modal">True</property>
|
<property name="modal">True</property>
|
||||||
|
<property name="window_position">center</property>
|
||||||
<signal name="destroy" handler="edit_patient_win_close" swapped="no"/>
|
<signal name="destroy" handler="edit_patient_win_close" swapped="no"/>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="header">
|
<object class="GtkHeaderBar" id="header">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="title" translatable="yes">Изменение данных пациента</property>
|
||||||
<property name="show_close_button">True</property>
|
<property name="show_close_button">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
|
@ -212,6 +214,7 @@
|
||||||
<object class="GtkEntry" id="birth_day">
|
<object class="GtkEntry" id="birth_day">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">День</property>
|
||||||
<property name="max_length">2</property>
|
<property name="max_length">2</property>
|
||||||
<property name="width_chars">3</property>
|
<property name="width_chars">3</property>
|
||||||
<property name="input_purpose">digits</property>
|
<property name="input_purpose">digits</property>
|
||||||
|
@ -239,6 +242,7 @@
|
||||||
<object class="GtkEntry" id="birth_month">
|
<object class="GtkEntry" id="birth_month">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Месяц</property>
|
||||||
<property name="max_length">2</property>
|
<property name="max_length">2</property>
|
||||||
<property name="width_chars">3</property>
|
<property name="width_chars">3</property>
|
||||||
<property name="input_purpose">digits</property>
|
<property name="input_purpose">digits</property>
|
||||||
|
@ -266,6 +270,7 @@
|
||||||
<object class="GtkEntry" id="birth_year">
|
<object class="GtkEntry" id="birth_year">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Год</property>
|
||||||
<property name="max_length">4</property>
|
<property name="max_length">4</property>
|
||||||
<property name="width_chars">5</property>
|
<property name="width_chars">5</property>
|
||||||
<property name="input_purpose">digits</property>
|
<property name="input_purpose">digits</property>
|
||||||
|
|
|
@ -70,6 +70,30 @@
|
||||||
<property name="homogeneous">True</property>
|
<property name="homogeneous">True</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparatorToolItem">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Настройки</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="stock_id">gtk-preferences</property>
|
||||||
|
<signal name="clicked" handler="show_reception_list_settings_win" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
@ -78,14 +102,90 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox" id="reception_list">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hscrollbar_policy">never</property>
|
||||||
|
<property name="shadow_type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkViewport">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBox" id="reception_list">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCalendar" id="reception_cal">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<signal name="day-selected" handler="change_reception_list_day" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolbar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="toolbar_style">both</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Сегодня</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="stock_id">gtk-refresh</property>
|
||||||
|
<signal name="clicked" handler="set_reception_list_today" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="pack_type">end</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">2</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
@ -143,13 +243,27 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox" id="patient_list">
|
<object class="GtkScrolledWindow">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">True</property>
|
||||||
<signal name="row-selected" handler="patient_list_selected" swapped="no"/>
|
<property name="hscrollbar_policy">never</property>
|
||||||
|
<property name="shadow_type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkViewport">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBox" id="patient_list">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<signal name="row-selected" handler="patient_list_selected" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -183,7 +297,7 @@
|
||||||
<signal name="changed" handler="patient_filter_changed" swapped="no"/>
|
<signal name="changed" handler="patient_filter_changed" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -214,6 +328,131 @@
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="catalog_page">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolbar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="toolbar_style">both</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Создать</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="stock_id">gtk-add</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Переименовать</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="stock_id">gtk-index</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="shadow_type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkViewport">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBox" id="catalog_list">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="margin_left">3</property>
|
||||||
|
<property name="margin_right">3</property>
|
||||||
|
<property name="margin_top">3</property>
|
||||||
|
<property name="margin_bottom">3</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFixed">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSearchEntry" id="catalog_filter">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="primary_icon_name">edit-find-symbolic</property>
|
||||||
|
<property name="primary_icon_activatable">False</property>
|
||||||
|
<property name="primary_icon_sensitive">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFixed">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">page2</property>
|
||||||
|
<property name="title" translatable="yes">Справочники</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<object class="GtkWindow" id="new_patient_window">
|
<object class="GtkWindow" id="new_patient_window">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="modal">True</property>
|
<property name="modal">True</property>
|
||||||
|
<property name="window_position">center</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="header">
|
<object class="GtkHeaderBar" id="header">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -212,6 +213,7 @@
|
||||||
<object class="GtkEntry" id="birth_day">
|
<object class="GtkEntry" id="birth_day">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">День</property>
|
||||||
<property name="max_length">2</property>
|
<property name="max_length">2</property>
|
||||||
<property name="width_chars">3</property>
|
<property name="width_chars">3</property>
|
||||||
<property name="input_purpose">digits</property>
|
<property name="input_purpose">digits</property>
|
||||||
|
@ -239,6 +241,7 @@
|
||||||
<object class="GtkEntry" id="birth_month">
|
<object class="GtkEntry" id="birth_month">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Месяц</property>
|
||||||
<property name="max_length">2</property>
|
<property name="max_length">2</property>
|
||||||
<property name="width_chars">3</property>
|
<property name="width_chars">3</property>
|
||||||
<property name="input_purpose">digits</property>
|
<property name="input_purpose">digits</property>
|
||||||
|
@ -266,6 +269,7 @@
|
||||||
<object class="GtkEntry" id="birth_year">
|
<object class="GtkEntry" id="birth_year">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Год</property>
|
||||||
<property name="max_length">4</property>
|
<property name="max_length">4</property>
|
||||||
<property name="width_chars">5</property>
|
<property name="width_chars">5</property>
|
||||||
<property name="input_purpose">digits</property>
|
<property name="input_purpose">digits</property>
|
||||||
|
|
|
@ -6,10 +6,12 @@
|
||||||
<object class="GtkWindow" id="open_patient_window">
|
<object class="GtkWindow" id="open_patient_window">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="modal">True</property>
|
<property name="modal">True</property>
|
||||||
|
<property name="window_position">center</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="open_patient_bar">
|
<object class="GtkHeaderBar" id="open_patient_bar">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="title" translatable="yes">Данные пациента</property>
|
||||||
<property name="show_close_button">True</property>
|
<property name="show_close_button">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
|
|
Loading…
Reference in New Issue