Skip to content

Commit

Permalink
add 3 levels dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightbridge-KS committed May 24, 2024
1 parent 2d05ac9 commit 5fb3d1c
Show file tree
Hide file tree
Showing 6 changed files with 301 additions and 140 deletions.
3 changes: 1 addition & 2 deletions designcter/_designTemp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
design_template = {
"cter_gen": """Exam: {exam_name} {protocol_name_line}
{phase_design_text}
"cter_gen": """Exam: {exam_name}{protocol_name_line}{phase_design_line}
Contrast route: {contrast_text}
NPO time: {NPO_time_text}
eGFR ({eGFR_date_text}): {eGFR_value_text}
Expand Down
6 changes: 5 additions & 1 deletion designcter/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ def design_ct(protocol_id: str,
):

protocol = protocols[protocol_id]
# Protocol Name Line
ptc_nm = protocol['protocol_name']
protocol_name_line = "" if ptc_nm is None else f"\nProtocol name: {ptc_nm}"
# Phase Design Line
pdt = protocol["phase_design_text"]
phase_design_line = "" if pdt is None else f"\n{pdt.strip()}"

str_design = design_template["cter_gen"].format(
exam_name = protocol["exam_name"],
protocol_name_line = protocol_name_line,
phase_design_text = protocol["phase_design_text"].strip(),
phase_design_line = phase_design_line,
contrast_text = protocol["contrast_text"],
NPO_time_text = NPO_time,
eGFR_date_text = eGFR_date,
Expand Down
Loading

0 comments on commit 5fb3d1c

Please sign in to comment.