Skip to content

Commit

Permalink
fix report - date confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
urchinpro committed Oct 16, 2024
1 parent 1712a67 commit 98e4641
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/reports/handle_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def patologistology_buh(data):
"purpose": "",
"service_code": "",
"doctor_fio": "",
"date_confirm": "",
}
match_keys = {
"Полис ОМС": "polis",
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion api/reports/sql_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions api/reports/structure_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 98e4641

Please sign in to comment.