Skip to content

Commit

Permalink
Merge pull request #4623 from mikhailprivalov/fix_accomponementDiag
Browse files Browse the repository at this point in the history
если осложнения и сопутствующие пустые и несвязные
  • Loading branch information
urchinpro authored Jan 12, 2025
2 parents 6e61ed8 + e8ca2e7 commit 809add7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions forms/forms106.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,7 @@ def form_02(request_data):


def check_section_param(objs, styles_obj, section, tbl_specification, cda_titles):
default_empty_table_data = Paragraph("", styles_obj[section.get("style")])
if section.get("Spacer"):
height_spacer = section.get("spacer_data")
objs.append(Spacer(1, height_spacer * mm))
Expand All @@ -1342,14 +1343,18 @@ def check_section_param(objs, styles_obj, section, tbl_specification, cda_titles
objs.append(tbl_specification.get("operation"))
elif section.get("type") == "Движение":
objs.append(Paragraph(tbl_specification.get("transfers"), styles_obj[section.get("style")]))

elif section.get("type") == "Сопутствующие":
objs.append(tbl_specification.get("Сопутствующие"))
objs.append(tbl_specification.get("Сопутствующие") if tbl_specification.get("Сопутствующие") else default_empty_table_data)

elif section.get("type") == "Осложнения":
objs.append(tbl_specification.get("Осложнения"))
objs.append(tbl_specification.get("Осложнения") if tbl_specification.get("Осложнения") else default_empty_table_data)

elif section.get("type") == "в.э.-Сопутствующие табл":
objs.append(tbl_specification.get("в.э.-Сопутствующие табл"))
objs.append(tbl_specification.get("в.э.-Сопутствующие табл") if tbl_specification.get("в.э.-Сопутствующие табл") else default_empty_table_data)

elif section.get("type") == "в.э.-Осложнения табл":
objs.append(tbl_specification.get("в.э.-Осложнения табл"))
objs.append(tbl_specification.get("в.э.-Осложнения табл") if tbl_specification.get("в.э.-Осложнения табл") else default_empty_table_data)
elif section.get("text"):
cda_titles_sec = section.get("cdaTitles")
data_cda = [cda_titles.get(i) for i in cda_titles_sec if cda_titles.get(i)]
Expand Down

0 comments on commit 809add7

Please sign in to comment.