diff --git a/api/reports/handle_func.py b/api/reports/handle_func.py index dec93c107e..4950ab81e1 100644 --- a/api/reports/handle_func.py +++ b/api/reports/handle_func.py @@ -16,6 +16,7 @@ def patologistology_buh(data): "purpose": "", "service_code": "", "doctor_fio": "", + "date_confirm": "", } match_keys = { "Полис ОМС": "polis", @@ -34,6 +35,7 @@ def patologistology_buh(data): tmp_data["direction"] = i.direction_id tmp_data["fin_source"] = i.iss_finsource_title tmp_data["doctor_fio"] = f"{i.doctor_family} {i.doctor_name} {i.doctor_patronymic}" + tmp_data["date_confirm"] = i.date_confirm if i.date_confirm else "-" tmp_data["price_category"] = i.iss_price_category tmp_data["hospital"] = i.hosp_title tmp_data["visit_date"] = i.char_visit_date diff --git a/api/reports/sql_func.py b/api/reports/sql_func.py index 10182ac8ed..55a7819dca 100644 --- a/api/reports/sql_func.py +++ b/api/reports/sql_func.py @@ -24,7 +24,8 @@ def report_buh_gistology(directions): dpif.title as field_title, udpf.family as doctor_family, udpf.name as doctor_name, - udpf.patronymic as doctor_patronymic + udpf.patronymic as doctor_patronymic, + to_char(directions_issledovaniya.time_confirmation AT TIME ZONE %(tz)s, 'DD.MM.YYYY') AS date_confirm FROM directions_issledovaniya LEFT JOIN directions_napravleniya dn on directions_issledovaniya.napravleniye_id = dn.id LEFT JOIN hospitals_hospitals hh on dn.hospital_id = hh.id diff --git a/api/reports/structure_sheet.py b/api/reports/structure_sheet.py index 9012ba3072..b86d4fd26f 100644 --- a/api/reports/structure_sheet.py +++ b/api/reports/structure_sheet.py @@ -26,6 +26,7 @@ def patologistology_buh_base(ws1): ('Код мед услуги и категория сложности', 35), ('Направление', 30), ('Врач', 30), + ('Подтверждено', 30), ] for idx, column in enumerate(columns, 1): ws1.cell(row=4, column=idx).value = column[0] @@ -77,6 +78,7 @@ def patologistology_buh_data(ws1, data): ws1.cell(row=r, column=11).value = f"{service_code} - {service_title}" ws1.cell(row=r, column=12).value = res["direction"] ws1.cell(row=r, column=13).value = res["doctor_fio"] + ws1.cell(row=r, column=14).value = res["date_confirm"] rows = ws1[f'A{r}:L{r}'] for row in rows: