Skip to content

Commit

Permalink
refactor(scripts): add constant for whole consult text
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Oct 10, 2024
1 parent 584d269 commit 2f6a11b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from common.write_data import write_data, write_log

CONSULT_TEXT = 'consult your pharmacist or doctor'
WHOLE_CONSULT_TEXT = '{} for more information.'.format(CONSULT_TEXT)
RED_TEXT = 'not be the right medication'
NOT_RED_TEXTS = [
'if more than this dose is needed',
Expand Down Expand Up @@ -141,8 +142,7 @@ def should_be_yellow(annotations):
YELLOW_IMPLICATION_TEXTS,
)) or (
# Special case: no other recommendation given
annotations['recommendation'] == \
'consult your pharmacist or doctor for more information.'
annotations['recommendation'] == WHOLE_CONSULT_TEXT
)

def should_be_green(annotations):
Expand Down

0 comments on commit 2f6a11b

Please sign in to comment.