Example #1
0
 def get_clinical_text(self):
     if not self.is_complete():
         return CTV_DICTLIST_INCOMPLETE
     tto_qol = self.get_tto_qol()
     rs_qol = self.get_rs_qol()
     mean_qol = mean([tto_qol, rs_qol])
     return [{
         "content":  u"Quality of life: time trade-off {}, rating scale {},"
                     " mean {}.".format(
                         ws.number_to_dp(tto_qol, DP),
                         ws.number_to_dp(rs_qol, DP),
                         ws.number_to_dp(mean_qol, DP)
                     )
     }]
Example #2
0
 def get_task_html(self):
     tto_qol = self.get_tto_qol()
     rs_qol = self.get_rs_qol()
     mean_qol = mean([tto_qol, rs_qol])
     h = u"""
         <div class="summary">
             <table class="summary">
     """
     h += self.get_is_complete_tr()
     h += tr("Mean QoL", answer(ws.number_to_dp(mean_qol, DP, default=None),
                                formatter_answer=identity))
     h += u"""
             </table>
         </div>
         <div class="explanation">
             Quality of life (QoL) has anchor values of 0 (none) and 1
             (perfect health), and can be asked about in several ways.
         </div>
         <table class="taskdetail">
             <tr>
                 <th width="33%">Scale</th>
                 <th width="33%">Answer</th>
                 <td width="33%">Implied QoL</th>
             </tr>
     """
     h += tr(WSTRING("qolbasic_tto_q_s"),
             answer(ws.number_to_dp(self.tto, DP, default=None)),
             answer(ws.number_to_dp(tto_qol, DP, default=None),
                    formatter_answer=identity))
     h += tr(WSTRING("qolbasic_rs_q_s"),
             answer(ws.number_to_dp(self.rs, DP, default=None)),
             answer(ws.number_to_dp(rs_qol, DP, default=None),
                    formatter_answer=identity))
     h += u"""
         </table>
     """
     return h
Example #3
0
 def scoreOverall(self):
     values = []
     for q in range(1, Rand36.NQUESTIONS + 1):
         values.append(self.recode(q))
     return mean(values)
Example #4
0
 def scoreGeneralHealth(self):
     return mean([self.recode(1), self.recode(33), self.recode(34),
                  self.recode(35), self.recode(36)])
Example #5
0
 def scorePain(self):
     return mean([self.recode(21), self.recode(22)])
Example #6
0
 def scoreSocialFunctioning(self):
     return mean([self.recode(20), self.recode(32)])
Example #7
0
 def scoreEmotionalWellbeing(self):
     return mean([self.recode(24), self.recode(25), self.recode(26),
                  self.recode(28), self.recode(30)])
Example #8
0
 def scoreEnergy(self):
     return mean([self.recode(23), self.recode(27), self.recode(29),
                  self.recode(31)])
Example #9
0
 def scoreRoleLimitationsEmotional(self):
     return mean([self.recode(17), self.recode(18), self.recode(19)])
Example #10
0
 def scoreRoleLimitationsPhysical(self):
     return mean([self.recode(13), self.recode(14), self.recode(15),
                  self.recode(16)])
Example #11
0
 def scorePhysicalFunctioning(self):
     return mean([self.recode(3), self.recode(4), self.recode(5),
                  self.recode(6), self.recode(7), self.recode(8),
                  self.recode(9), self.recode(10), self.recode(11),
                  self.recode(12)])