From 2f6a11b3831ffbebc0dc9ddb08057ef9c58c9672 Mon Sep 17 00:00:00 2001 From: Tamara Slosarek Date: Thu, 10 Oct 2024 11:56:20 +0200 Subject: [PATCH] refactor(scripts): add constant for whole consult text --- scripts/analyze.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/analyze.py b/scripts/analyze.py index 00e21d79..a5fca73c 100644 --- a/scripts/analyze.py +++ b/scripts/analyze.py @@ -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', @@ -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):