Skip to content

Commit

Permalink
Fix formatting for assertions without nccn_guideline
Browse files Browse the repository at this point in the history
  • Loading branch information
susannasiebert committed Jun 19, 2020
1 parent 98ba619 commit 49cd95f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion civicpy/civic.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ def csq(self, include_status=None):
"",
"&".join([acmg_code.code for acmg_code in assertion.acmg_codes]),
str(assertion.amp_level or ''),
"{} (v{})".format(assertion.nccn_guideline, assertion.nccn_guideline_version),
assertion.format_nccn_guideline(),
str(assertion.fda_regulatory_approval or ''),
str(assertion.fda_companion_test or ''),
]))
Expand Down Expand Up @@ -824,6 +824,12 @@ def evidence(self):
def hpo_ids(self):
return [x.hpo_id for x in self.phenotypes if x.hpo_id]

def format_nccn_guideline(self):
if self.nccn_guideline is None:
return ""
else:
return "{} (v{})".format(self.nccn_guideline, self.nccn_guideline_version)


class User(CivicRecord):

Expand Down

0 comments on commit 49cd95f

Please sign in to comment.