File size: 3,035 Bytes
1c8ab04 80452b7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
from summ_utils import get_osid, map_terms
from headline_utils import get_condition
def get_headline(status,phase,osid, sid,condition):
if status =='Recruiting':
headline = "Initiation of " + \
'/'.join(phase.lower().split('|')) + ' '+ \
"trial " + \
get_osid(osid,sid)+ \
"for " + \
get_condition(condition) + \
" reported"
return map_terms(headline)
elif status == 'Active, not recruiting':
headline = "Planned " + \
'/'.join(phase.lower().split('|')) + ' '+ \
"trial " + \
get_osid(osid,sid)+ \
"for " + \
get_condition(condition) + \
" reported"
return map_terms(headline)
elif status =='Completed':
headline = "Completion of " + \
'/'.join(phase.lower().split('|')) + ' '+ \
"trial " + \
get_osid(osid,sid)+ \
"for " + \
get_condition(condition) + \
" reported"
return map_terms(headline)
elif status =='Terminated':
headline = "Termination of " + \
'/'.join(phase.lower().split('|')) + ' '+ \
"trial " + \
get_osid(osid,sid)+ \
"for " + \
get_condition(condition) + \
" reported"
return map_terms(headline)
elif status =='Withdrawn':
headline = "Withdrawal of " + \
'/'.join(phase.lower().split('|')) + ' '+ \
"trial " +\
get_osid(osid,sid)+ \
"for " + \
get_condition(condition) + \
" reported"
return map_terms(headline)
elif status =='Suspension':
headline = "Suspension of " + \
'/'.join(phase.lower().split('|')) + ' '+ \
"trial " +\
get_osid(osid,sid)+ \
"for " + \
get_condition(condition) + \
" reported"
return headline
else:
headline = "Ongoing " + \
'/'.join(phase.lower().split('|')) + ' '+ \
"trial " +\
get_osid(osid,sid)+ \
"for " + \
get_condition(condition) + \
" reported"
return map_terms(headline)
|